| Home · All Classes · All Namespaces · Modules · Functions · Files

dbus-tube-channel.h

    00001
    00022 #ifndef _TelepathyQt_dbus_tube_channel_h_HEADER_GUARD_
    00023 #define _TelepathyQt_dbus_tube_channel_h_HEADER_GUARD_
    00024
    00025 #ifndef IN_TP_QT_HEADER
    00026 #error IN_TP_QT_HEADER
    00027 #endif
    00028
    00029 #include <TelepathyQt/TubeChannel>
    00030
    00031 namespace Tp
    00032 {
    00033
    00034 class TP_QT_EXPORT DBusTubeChannel : public TubeChannel
    00035 {
    00036     Q_OBJECT
    00037     Q_DISABLE_COPY(DBusTubeChannel)
    00038
    00039 public:
    00040     static const Feature FeatureCore;
    00041     static const Feature FeatureBusNameMonitoring;
    00042
    00043     static DBusTubeChannelPtr create(const ConnectionPtr &connection,
    00044             const QString &objectPath, const QVariantMap &immutableProperties);
    00045
    00046     virtual ~DBusTubeChannel();
    00047
    00048     QString serviceName() const;
    00049
    00050     bool supportsRestrictingToCurrentUser() const;
    00051
    00052     QHash<QString, Tp::ContactPtr> contactsForBusNames() const;
    00053
    00054     QString address() const;
    00055
    00056 protected:
    00057     DBusTubeChannel(const ConnectionPtr &connection, const QString &objectPath,
    00058             const QVariantMap &immutableProperties);
    00059
    00060 Q_SIGNALS:
    00061     void busNameAdded(const QString &busName, const Tp::ContactPtr &contact);
    00062     void busNameRemoved(const QString &busName, const Tp::ContactPtr &contact);
    00063
    00064 private Q_SLOTS:
    00065     TP_QT_NO_EXPORT void onRequestAllPropertiesFinished(Tp::PendingOperation*);
    00066     TP_QT_NO_EXPORT void onRequestPropertyDBusNamesFinished(Tp::PendingOperation *op);
    00067     TP_QT_NO_EXPORT void onDBusNamesChanged(const Tp::DBusTubeParticipants &added, const Tp::UIntList &removed);
    00068     TP_QT_NO_EXPORT void onContactsRetrieved(const QUuid &uuid, const QList<Tp::ContactPtr> &contacts);
    00069     TP_QT_NO_EXPORT void onQueueCompleted();
    00070
    00071 private:
    00072     TP_QT_NO_EXPORT void setAddress(const QString &address);
    00073
    00074     struct Private;
    00075     friend struct PendingDBusTubeConnection;
    00076     friend struct Private;
    00077     Private *mPriv;
    00078
    00079 };
    00080
    00081 } // Tp
    00082
    00083 #endif