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

abstract-interface.h

    00001
    00023 #ifndef _TelepathyQt_abstract_interface_h_HEADER_GUARD_
    00024 #define _TelepathyQt_abstract_interface_h_HEADER_GUARD_
    00025
    00026 #ifndef IN_TP_QT_HEADER
    00027 #error IN_TP_QT_HEADER
    00028 #endif
    00029
    00030 #include <TelepathyQt/Global>
    00031
    00032 #include <QDBusAbstractInterface>
    00033
    00034 namespace Tp
    00035 {
    00036
    00037 class DBusProxy;
    00038 class PendingVariant;
    00039 class PendingOperation;
    00040 class PendingVariantMap;
    00041
    00042 class TP_QT_EXPORT AbstractInterface : public QDBusAbstractInterface
    00043 {
    00044     Q_OBJECT
    00045     Q_DISABLE_COPY(AbstractInterface)
    00046
    00047 public:
    00048     virtual ~AbstractInterface();
    00049
    00050     bool isValid() const;
    00051     QString invalidationReason() const;
    00052     QString invalidationMessage() const;
    00053
    00054     void setMonitorProperties(bool monitorProperties);
    00055     bool isMonitoringProperties() const;
    00056
    00057 Q_SIGNALS:
    00058     void propertiesChanged(const QVariantMap &changedProperties,
    00059             const QStringList &invalidatedProperties);
    00060
    00061 protected Q_SLOTS:
    00062     virtual void invalidate(Tp::DBusProxy *proxy,
    00063             const QString &error, const QString &message);
    00064
    00065 protected:
    00066     AbstractInterface(DBusProxy *proxy, const QLatin1String &interface);
    00067     AbstractInterface(const QString &busName, const QString &path,
    00068             const QLatin1String &interface, const QDBusConnection &connection,
    00069             QObject *parent);
    00070
    00071     PendingVariant *internalRequestProperty(const QString &name) const;
    00072     PendingOperation *internalSetProperty(const QString &name, const QVariant &newValue);
    00073     PendingVariantMap *internalRequestAllProperties() const;
    00074
    00075 private Q_SLOTS:
    00076     TP_QT_NO_EXPORT void onPropertiesChanged(const QString &interface,
    00077             const QVariantMap &changedProperties,
    00078             const QStringList &invalidatedProperties);
    00079
    00080 private:
    00081     struct Private;
    00082     friend struct Private;
    00083     Private *mPriv;
    00084 };
    00085
    00086 } // Tp
    00087
    00088 #endif