MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9
   Home · All Classes · All Namespaces · Modules · Functions · Files

pending-operation.h

00001 
00023 #ifndef _TelepathyQt4_pending_operation_h_HEADER_GUARD_
00024 #define _TelepathyQt4_pending_operation_h_HEADER_GUARD_
00025 
00026 #ifndef IN_TELEPATHY_QT4_HEADER
00027 #error IN_TELEPATHY_QT4_HEADER
00028 #endif
00029 
00030 #include <TelepathyQt4/Global>
00031 #include <TelepathyQt4/RefCounted>
00032 #include <TelepathyQt4/SharedPtr>
00033 
00034 #include <QObject>
00035 
00036 class QDBusError;
00037 class QDBusPendingCall;
00038 class QDBusPendingCallWatcher;
00039 
00040 namespace Tp
00041 {
00042 
00043 class ReadinessHelper;
00044 
00045 class TELEPATHY_QT4_EXPORT PendingOperation : public QObject
00046 {
00047     Q_OBJECT
00048     Q_DISABLE_COPY(PendingOperation)
00049 
00050 public:
00051     virtual ~PendingOperation();
00052 
00053     SharedPtr<RefCounted> object() const;
00054 
00055     bool isFinished() const;
00056 
00057     bool isValid() const;
00058 
00059     bool isError() const;
00060     QString errorName() const;
00061     QString errorMessage() const;
00062 
00063 Q_SIGNALS:
00064     void finished(Tp::PendingOperation *operation);
00065 
00066 protected:
00067     PendingOperation(const SharedPtr<RefCounted> &object);
00068 
00069 protected Q_SLOTS:
00070     void setFinished();
00071     void setFinishedWithError(const QString &name, const QString &message);
00072     void setFinishedWithError(const QDBusError &error);
00073 
00074 private Q_SLOTS:
00075     TELEPATHY_QT4_NO_EXPORT void emitFinished();
00076 
00077 private:
00078     friend class ContactManager;
00079     friend class ReadinessHelper;
00080 
00081     struct Private;
00082     friend struct Private;
00083     Private *mPriv;
00084 };
00085 
00086 } // Tp
00087 
00088 #endif

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