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_operation_h_HEADER_GUARD_
00023 #define _TelepathyQt4_cli_pending_operation_h_HEADER_GUARD_
00024
00025 #ifndef IN_TELEPATHY_QT4_HEADER
00026 #error IN_TELEPATHY_QT4_HEADER
00027 #endif
00028
00029 #include <QObject>
00030
00031 class QDBusError;
00032 class QDBusPendingCall;
00033 class QDBusPendingCallWatcher;
00034
00035 namespace Telepathy
00036 {
00037 namespace Client
00038 {
00039
00063 class PendingOperation : public QObject
00064 {
00065 Q_OBJECT
00066 Q_DISABLE_COPY(PendingOperation)
00067
00068 public:
00069 virtual ~PendingOperation();
00070
00082 bool isFinished() const;
00083
00095 bool isValid() const;
00096
00108 bool isError() const;
00109
00117 QString errorName() const;
00118
00126 QString errorMessage() const;
00127
00128 Q_SIGNALS:
00136 void finished(Telepathy::Client::PendingOperation* operation);
00137
00138 protected:
00144 PendingOperation(QObject* parent);
00145
00150 void setFinished();
00151
00159 void setFinishedWithError(const QString& name, const QString& message);
00160
00167 void setFinishedWithError(const QDBusError& error);
00168
00169 private Q_SLOTS:
00170 void emitFinished();
00171
00172 private:
00173 struct Private;
00174 Private *mPriv;
00175 };
00176
00177
00178 }
00179 }
00180
00181 #endif