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

simple-pending-operations.h

00001 
00023 #ifndef _TelepathyQt4_pending_operations_h_HEADER_GUARD_
00024 #define _TelepathyQt4_pending_operations_h_HEADER_GUARD_
00025 
00026 #ifndef IN_TELEPATHY_QT4_HEADER
00027 #error IN_TELEPATHY_QT4_HEADER
00028 #endif
00029 
00030 #include <QObject>
00031 
00032 #include <TelepathyQt4/PendingOperation>
00033 
00034 namespace Tp
00035 {
00036 
00037 class TELEPATHY_QT4_EXPORT PendingSuccess : public PendingOperation
00038 {
00039     Q_OBJECT
00040     Q_DISABLE_COPY(PendingSuccess)
00041 
00042 public:
00043     PendingSuccess(const SharedPtr<RefCounted> &object)
00044         : PendingOperation(object)
00045     {
00046         setFinished();
00047     }
00048 };
00049 
00050 class TELEPATHY_QT4_EXPORT PendingFailure : public PendingOperation
00051 {
00052     Q_OBJECT
00053     Q_DISABLE_COPY(PendingFailure)
00054 
00055 public:
00056     PendingFailure(const QString &name, const QString &message,
00057             const SharedPtr<RefCounted> &object)
00058         : PendingOperation(object)
00059     {
00060         setFinishedWithError(name, message);
00061     }
00062 
00063     PendingFailure(const QDBusError &error,
00064             const SharedPtr<RefCounted> &object)
00065         : PendingOperation(object)
00066     {
00067         setFinishedWithError(error);
00068     }
00069 };
00070 
00071 class TELEPATHY_QT4_EXPORT PendingVoid : public PendingOperation
00072 {
00073     Q_OBJECT
00074     Q_DISABLE_COPY(PendingVoid)
00075 
00076 public:
00077     PendingVoid(QDBusPendingCall call, const SharedPtr<RefCounted> &object);
00078 
00079 private Q_SLOTS:
00080     TELEPATHY_QT4_NO_EXPORT void watcherFinished(QDBusPendingCallWatcher*);
00081 
00082 private:
00083     struct Private;
00084     friend struct Private;
00085     Private *mPriv;
00086 };
00087 
00088 class TELEPATHY_QT4_EXPORT PendingComposite : public PendingOperation
00089 {
00090     Q_OBJECT
00091     Q_DISABLE_COPY(PendingComposite)
00092 
00093 public:
00094     PendingComposite(const QList<PendingOperation*> &operations, const SharedPtr<RefCounted> &object);
00095     PendingComposite(const QList<PendingOperation*> &operations, bool failOnFirstError,
00096             const SharedPtr<RefCounted> &object);
00097     ~PendingComposite();
00098 
00099 private Q_SLOTS:
00100     TELEPATHY_QT4_NO_EXPORT void onOperationFinished(Tp::PendingOperation *);
00101 
00102 private:
00103     struct Private;
00104     friend struct Private;
00105     Private *mPriv;
00106 };
00107 
00108 } // Tp
00109 
00110 #endif

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