• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

propertyadaptor.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2008, 2009 Nokia Corporation.
00003  *
00004  * Contact: Marius Vollmer <marius.vollmer@nokia.com>
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public License
00008  * version 2.1 as published by the Free Software Foundation.
00009  *
00010  * This program is distributed in the hope that it will be useful, but
00011  * WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00013  * Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00018  * 02110-1301 USA
00019  *
00020  */
00021 
00022 #ifndef PROPERTYADAPTOR_H
00023 #define PROPERTYADAPTOR_H
00024 
00025 #include <QObject>
00026 #include <QDBusAbstractAdaptor>
00027 #include <QDBusMessage>
00028 #include <QDBusConnection>
00029 #include <QSet>
00030 #include <QString>
00031 #include <QDBusServiceWatcher>
00032 #define DBUS_INTERFACE "org.maemo.contextkit.Property"
00033 
00034 namespace ContextProvider {
00035 
00036 class PropertyPrivate;
00037 
00038 class PropertyAdaptor: public QDBusAbstractAdaptor
00039 {
00040     Q_OBJECT
00041     Q_CLASSINFO("D-Bus Interface", "org.maemo.contextkit.Property")
00042 
00043 public:
00044     PropertyAdaptor(PropertyPrivate* property, QDBusConnection *connection);
00045     QString objectPath() const;
00046     void forgetClients();
00047 
00048 public Q_SLOTS:
00049     void Subscribe(const QDBusMessage& msg, QVariantList& values, quint64& timestamp);
00050     void Unsubscribe(const QDBusMessage& msg);
00051     void Get(QVariantList& values, quint64& timestamp);
00052 
00053 Q_SIGNALS:
00054     void ValueChanged(const QVariantList &values, const quint64& timestamp);
00055 
00056 private Q_SLOTS:
00057     void onClientExited(const QString&);
00058     void onValueChanged(QVariantList values, quint64 timestamp);
00059 
00060 private:
00061     PropertyPrivate *propertyPrivate; 
00062     QDBusConnection *connection; 
00063     QSet<QString> clientServiceNames; 
00064     QDBusServiceWatcher serviceWatcher; 
00065 
00066 };
00067 
00068 } // namespace ContextProvider
00069 
00070 #endif

Generated on Sun Jun 1 2014 17:31:06 for libcontextprovider by  doxygen 1.7.1