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_operations_h_HEADER_GUARD_
00023 #define _TelepathyQt4_cli_pending_operations_h_HEADER_GUARD_
00024
00025 #ifndef IN_TELEPATHY_QT4_HEADER
00026 #error IN_TELEPATHY_QT4_HEADER
00027 #endif
00028
00029 #include <QObject>
00030
00031 #include <TelepathyQt4/Client/PendingOperation>
00032
00033 namespace Telepathy
00034 {
00035 namespace Client
00036 {
00037
00038
00042 class PendingSuccess : public PendingOperation
00043 {
00044 Q_OBJECT
00045 Q_DISABLE_COPY(PendingSuccess)
00046
00047 public:
00048 PendingSuccess(QObject* parent)
00049 : PendingOperation(parent)
00050 {
00051 setFinished();
00052 }
00053 };
00054
00055
00060 class PendingFailure : public PendingOperation
00061 {
00062 Q_OBJECT
00063 Q_DISABLE_COPY(PendingFailure)
00064
00065 public:
00066 PendingFailure(QObject* parent, const QString& name,
00067 const QString& message)
00068 : PendingOperation(parent)
00069 {
00070 setFinishedWithError(name, message);
00071 }
00072
00073 PendingFailure(QObject* parent, const QDBusError& error)
00074 : PendingOperation(parent)
00075 {
00076 setFinishedWithError(error);
00077 }
00078 };
00079
00080
00089 class PendingVoidMethodCall : public PendingOperation
00090 {
00091 Q_OBJECT
00092 Q_DISABLE_COPY(PendingVoidMethodCall)
00093
00094 public:
00103 PendingVoidMethodCall(QObject* parent, QDBusPendingCall call);
00104
00105 private Q_SLOTS:
00106 void watcherFinished(QDBusPendingCallWatcher*);
00107
00108 private:
00109
00110 struct Private;
00111 Private *mPriv;
00112 };
00113
00114
00115 }
00116 }
00117
00118 #endif