Home · All Classes · All Namespaces · Modules · Functions · Files
pending-contacts.h
00001 
00023 #ifndef _TelepathyQt4_pending_contacts_h_HEADER_GUARD_
00024 #define _TelepathyQt4_pending_contacts_h_HEADER_GUARD_
00025 
00026 #ifndef IN_TELEPATHY_QT4_HEADER
00027 #error IN_TELEPATHY_QT4_HEADER
00028 #endif
00029 
00030 #include <TelepathyQt4/PendingOperation>
00031 
00032 #include <QHash>
00033 #include <QList>
00034 #include <QMap>
00035 #include <QSet>
00036 #include <QStringList>
00037 
00038 #include <TelepathyQt4/Types>
00039 #include <TelepathyQt4/Contact>
00040 
00041 namespace Tp
00042 {
00043 
00044 class ContactManager;
00045 
00046 class TELEPATHY_QT4_EXPORT PendingContacts : public PendingOperation
00047 {
00048     Q_OBJECT
00049     Q_DISABLE_COPY(PendingContacts);
00050 
00051 public:
00052     ~PendingContacts();
00053 
00054     ContactManagerPtr manager() const;
00055     Features 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<ContactPtr> contactsToUpgrade() const;
00065 
00066     QList<ContactPtr> contacts() const;
00067     UIntList invalidHandles() const;
00068     QStringList validIdentifiers() const;
00069     QHash<QString, QPair<QString, QString> > invalidIdentifiers() const;
00070 
00071 private Q_SLOTS:
00072     TELEPATHY_QT4_NO_EXPORT void onAttributesFinished(Tp::PendingOperation *);
00073     TELEPATHY_QT4_NO_EXPORT void onRequestHandlesFinished(Tp::PendingOperation *);
00074     TELEPATHY_QT4_NO_EXPORT void onReferenceHandlesFinished(Tp::PendingOperation *);
00075     TELEPATHY_QT4_NO_EXPORT void onNestedFinished(Tp::PendingOperation *);
00076     TELEPATHY_QT4_NO_EXPORT void onInspectHandlesFinished(QDBusPendingCallWatcher *);
00077 
00078 private:
00079     friend class ContactManager;
00080 
00081     // If errorName is non-empty, these will fail instantly
00082     TELEPATHY_QT4_NO_EXPORT PendingContacts(const ContactManagerPtr &manager, const UIntList &handles,
00083             const Features &features,
00084             const Features &missingFeatures,
00085             const QStringList &interfaces,
00086             const QMap<uint, ContactPtr> &satisfyingContacts,
00087             const QSet<uint> &otherContacts,
00088             const QString &errorName = QString(),
00089             const QString &errorMessage = QString());
00090     TELEPATHY_QT4_NO_EXPORT PendingContacts(const ContactManagerPtr &manager, const QStringList &identifiers,
00091             const Features &features,
00092             const QString &errorName = QString(),
00093             const QString &errorMessage = QString());
00094     TELEPATHY_QT4_NO_EXPORT PendingContacts(const ContactManagerPtr &manager, const QList<ContactPtr> &contacts,
00095             const Features &features,
00096             const QString &errorName = QString(),
00097             const QString &errorMessage = QString());
00098 
00099     TELEPATHY_QT4_NO_EXPORT void allAttributesFetched();
00100 
00101     struct Private;
00102     friend struct Private;
00103     Private *mPriv;
00104 };
00105 
00106 } // Tp
00107 
00108 #endif


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.6.5