00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _TelepathyQt4_cli_pending_contacts_h_HEADER_GUARD_
00023 #define _TelepathyQt4_cli_pending_contacts_h_HEADER_GUARD_
00024
00025 #ifndef IN_TELEPATHY_QT4_HEADER
00026 #error IN_TELEPATHY_QT4_HEADER
00027 #endif
00028
00029 #include <TelepathyQt4/Client/PendingOperation>
00030
00031 #include <QList>
00032 #include <QMap>
00033 #include <QSet>
00034 #include <QSharedPointer>
00035 #include <QStringList>
00036
00037 #include <TelepathyQt4/Types>
00038 #include <TelepathyQt4/Client/Contact>
00039
00040 namespace Telepathy
00041 {
00042 namespace Client
00043 {
00044
00045 class ContactManager;
00046
00047 class PendingContacts : public PendingOperation
00048 {
00049 Q_OBJECT
00050
00051 public:
00052 ~PendingContacts();
00053
00054 ContactManager *manager() const;
00055 QSet<Contact::Feature> features() const;
00056
00057 bool isForHandles() const;
00058 UIntList handles() const;
00059
00060 bool isForIdentifiers() const;
00061 QStringList identifiers() const;
00062
00063 bool isUpgrade() const;
00064 QList<QSharedPointer<Contact> > contactsToUpgrade() const;
00065
00066 QList<QSharedPointer<Contact> > contacts() const;
00067 UIntList invalidHandles() const;
00068
00069 private Q_SLOTS:
00070 void onAttributesFinished(Telepathy::Client::PendingOperation *);
00071 void onHandlesFinished(Telepathy::Client::PendingOperation *);
00072 void onNestedFinished(Telepathy::Client::PendingOperation *);
00073
00074 private:
00075 Q_DISABLE_COPY(PendingContacts);
00076
00077 PendingContacts(ContactManager *manager, const UIntList &handles,
00078 const QSet<Contact::Feature> &features,
00079 const QMap<uint, QSharedPointer<Contact> > &satisfyingContacts);
00080 PendingContacts(ContactManager *manager, const QStringList &identifiers,
00081 const QSet<Contact::Feature> &features);
00082 PendingContacts(ContactManager *manager, const QList<QSharedPointer<Contact> > &contacts,
00083 const QSet<Contact::Feature> &features);
00084
00085 void allAttributesFetched();
00086
00087 struct Private;
00088 friend struct Private;
00089 friend class ContactManager;
00090 Private *mPriv;
00091 };
00092
00093 }
00094 }
00095
00096 #endif