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

property.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2008 Nokia Corporation.
00003  *
00004  * Contact: Marius Vollmer <marius.vollmer@nokia.com>
00005  *
00006  * This library 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 library 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 library; 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 PROPERTY_H
00023 #define PROPERTY_H
00024 
00025 #include <QObject>
00026 #include <QString>
00027 #include <QStringList>
00028 #include <QDBusConnection>
00029 #include <QHash>
00030 #include <QVariant>
00031 
00032 namespace ContextProvider {
00033 
00034 class Service;
00035 
00036 class PropertyPrivate;
00037 class ServiceBackend;
00038 
00039 class Property : public QObject
00040 {
00041     Q_OBJECT
00042 
00043 public:
00044     explicit Property(Service &service, const QString &key, QObject *parent = 0);
00045     explicit Property(const QString &key, QObject *parent = 0);
00046     virtual ~Property();
00047 
00048     QString key() const;
00049     bool isSet() const;
00050 
00051     void setValue(const QVariant &v);
00052     QVariant value();
00053     void unsetValue();
00054 
00055 private:
00056     PropertyPrivate *priv; 
00057     void init(ServiceBackend *serviceBackend, const QString &key);
00058 
00059 Q_SIGNALS:
00063     void firstSubscriberAppeared(const QString &key);
00064 
00069     void lastSubscriberDisappeared(const QString &key);
00070 };
00071 
00072 } // end namespace
00073 
00074 #endif

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