00001
00023 #ifndef _TelepathyQt4_pending_channel_h_HEADER_GUARD_
00024 #define _TelepathyQt4_pending_channel_h_HEADER_GUARD_
00025
00026 #ifndef IN_TELEPATHY_QT4_HEADER
00027 #error IN_TELEPATHY_QT4_HEADER
00028 #endif
00029
00030 #include <TelepathyQt4/Channel>
00031 #include <TelepathyQt4/PendingOperation>
00032
00033 #include <QString>
00034 #include <QVariantMap>
00035
00036 #include <QDBusPendingCallWatcher>
00037
00038 namespace Tp
00039 {
00040
00041 class Connection;
00042 class HandledChannelNotifier;
00043
00044 class TELEPATHY_QT4_EXPORT PendingChannel : public PendingOperation
00045 {
00046 Q_OBJECT
00047 Q_DISABLE_COPY(PendingChannel)
00048
00049 public:
00050 ~PendingChannel();
00051
00052 ConnectionPtr connection() const;
00053
00054 bool yours() const;
00055
00056 const QString &channelType() const;
00057
00058 uint targetHandleType() const;
00059
00060 uint targetHandle() const;
00061
00062 QVariantMap immutableProperties() const;
00063
00064 ChannelPtr channel() const;
00065
00066 HandledChannelNotifier *handledChannelNotifier() const;
00067
00068 private Q_SLOTS:
00069 TELEPATHY_QT4_NO_EXPORT void onConnectionCreateChannelFinished(
00070 QDBusPendingCallWatcher *watcher);
00071 TELEPATHY_QT4_NO_EXPORT void onConnectionEnsureChannelFinished(
00072 QDBusPendingCallWatcher *watcher);
00073 TELEPATHY_QT4_NO_EXPORT void onChannelReady(Tp::PendingOperation *op);
00074
00075 TELEPATHY_QT4_NO_EXPORT void onHandlerError(const QString &errorName,
00076 const QString &errorMessage);
00077 TELEPATHY_QT4_NO_EXPORT void onHandlerChannelReceived(
00078 const Tp::ChannelPtr &channel);
00079 TELEPATHY_QT4_NO_EXPORT void onAccountCreateChannelFinished(
00080 Tp::PendingOperation *op);
00081
00082 private:
00083 friend class Account;
00084 friend class ConnectionLowlevel;
00085
00086 TELEPATHY_QT4_NO_EXPORT PendingChannel(const ConnectionPtr &connection,
00087 const QString &errorName, const QString &errorMessage);
00088 TELEPATHY_QT4_NO_EXPORT PendingChannel(const ConnectionPtr &connection,
00089 const QVariantMap &request, bool create, int timeout = -1);
00090 TELEPATHY_QT4_NO_EXPORT PendingChannel(const AccountPtr &account,
00091 const QVariantMap &request, const QDateTime &userActionTime,
00092 bool create);
00093 TELEPATHY_QT4_NO_EXPORT PendingChannel(const QString &errorName,
00094 const QString &errorMessage);
00095
00096 struct Private;
00097 friend struct Private;
00098 Private *mPriv;
00099 };
00100
00101 }
00102
00103 #endif