Changeset View
Changeset View
Standalone View
Standalone View
libkdepim/job/personsearchjob.h
Show All 24 Lines | |||||
#include "kdepim_export.h" | #include "kdepim_export.h" | ||||
#include <KJob> | #include <KJob> | ||||
#include <Akonadi/Collection> | #include <Akonadi/Collection> | ||||
#include <libkdepim/ldap/ldapclientsearch.h> | #include <libkdepim/ldap/ldapclientsearch.h> | ||||
#include "person.h" | #include "person.h" | ||||
#include <QSharedPointer> | |||||
class ExpandGroupJob; | |||||
typedef QSharedPointer<ExpandGroupJob> ExpandGroupJobPtr; | |||||
class KDEPIM_EXPORT PersonSearchJob : public KJob | class KDEPIM_EXPORT PersonSearchJob : public KJob | ||||
{ | { | ||||
Q_OBJECT | Q_OBJECT | ||||
public: | public: | ||||
explicit PersonSearchJob(const QString &searchString, QObject* parent = 0); | explicit PersonSearchJob(const QString &searchString, QObject* parent = 0); | ||||
virtual ~PersonSearchJob(); | virtual ~PersonSearchJob(); | ||||
virtual void start(); | virtual void start(); | ||||
Show All 9 Lines | |||||
private Q_SLOTS: | private Q_SLOTS: | ||||
void onCollectionsReceived(const Akonadi::Collection::List &); | void onCollectionsReceived(const Akonadi::Collection::List &); | ||||
void onCollectionsFetched(KJob *); | void onCollectionsFetched(KJob *); | ||||
void onLDAPSearchData(const QList<KLDAP::LdapResultObject> &); | void onLDAPSearchData(const QList<KLDAP::LdapResultObject> &); | ||||
void onLDAPSearchDone(); | void onLDAPSearchDone(); | ||||
void updatePersonCollection(const Person &person); | void updatePersonCollection(const Person &person); | ||||
void modifyResult(KJob *job); | void modifyResult(KJob *job); | ||||
void onGroupFound(QString name, QList<KLDAP::LdapObject> members); | |||||
private: | |||||
bool isGroup(KLDAP::LdapObject object) const; | |||||
private: | private: | ||||
QString mSearchString; | QString mSearchString; | ||||
QHash<QString, Person> mMatches; | QHash<QString, Person> mMatches; | ||||
KLDAP::LdapClientSearch mLdapSearch; | KLDAP::LdapClientSearch mLdapSearch; | ||||
bool mCollectionSearchDone; | bool mCollectionSearchDone; | ||||
bool mLdapSearchDone; | bool mLdapSearchDone; | ||||
QHash<QString, ExpandGroupJobPtr> mExpandGroupJobs; | |||||
}; | }; | ||||
#endif | #endif |