Home · All Classes · All Namespaces · Modules · Functions · Files
pending-handles.h
00001 
00023 #ifndef _TelepathyQt4_pending_handles_h_HEADER_GUARD_
00024 #define _TelepathyQt4_pending_handles_h_HEADER_GUARD_
00025 
00026 #ifndef IN_TELEPATHY_QT4_HEADER
00027 #error IN_TELEPATHY_QT4_HEADER
00028 #endif
00029 
00030 #include <TelepathyQt4/Constants>
00031 #include <TelepathyQt4/PendingOperation>
00032 #include <TelepathyQt4/Types>
00033 
00034 #include <QHash>
00035 #include <QString>
00036 #include <QStringList>
00037 
00038 #include <TelepathyQt4/Types>
00039 
00040 namespace Tp
00041 {
00042 
00043 class PendingHandles;
00044 class ReferencedHandles;
00045 
00046 class TELEPATHY_QT4_EXPORT PendingHandles : public PendingOperation
00047 {
00048     Q_OBJECT
00049     Q_DISABLE_COPY(PendingHandles)
00050 
00051 public:
00052     ~PendingHandles();
00053 
00054     ConnectionPtr connection() const;
00055 
00056     HandleType handleType() const;
00057 
00058     bool isRequest() const;
00059 
00060     bool isReference() const;
00061 
00062     const QStringList &namesRequested() const;
00063 
00064     QStringList validNames() const;
00065 
00066     QHash<QString, QPair<QString, QString> > invalidNames() const;
00067 
00068     const UIntList &handlesToReference() const;
00069 
00070     ReferencedHandles handles() const;
00071 
00072     UIntList invalidHandles() const;
00073 
00074 private Q_SLOTS:
00075     TELEPATHY_QT4_NO_EXPORT void onRequestHandlesFinished(QDBusPendingCallWatcher *watcher);
00076     TELEPATHY_QT4_NO_EXPORT void onHoldHandlesFinished(QDBusPendingCallWatcher *watcher);
00077     TELEPATHY_QT4_NO_EXPORT void onRequestHandlesFallbackFinished(QDBusPendingCallWatcher *watcher);
00078     TELEPATHY_QT4_NO_EXPORT void onHoldHandlesFallbackFinished(QDBusPendingCallWatcher *watcher);
00079 
00080 private:
00081     friend class ConnectionLowlevel;
00082 
00083     TELEPATHY_QT4_NO_EXPORT PendingHandles(const ConnectionPtr &connection, HandleType handleType,
00084             const QStringList &names);
00085     TELEPATHY_QT4_NO_EXPORT PendingHandles(const ConnectionPtr &connection, HandleType handleType,
00086             const UIntList &handles, const UIntList &alreadyHeld, const UIntList &notYetHeld);
00087     TELEPATHY_QT4_NO_EXPORT PendingHandles(const QString &errorName, const QString &errorMessage);
00088 
00089     struct Private;
00090     friend struct Private;
00091     Private *mPriv;
00092 };
00093 
00094 } // Tp
00095 
00096 #endif


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