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

service.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 SERVICE_H
00023 #define SERVICE_H
00024 
00025 #include <QObject>
00026 #include <QString>
00027 #include <QStringList>
00028 #include <QDBusConnection>
00029 #include <QHash>
00030 #include <QVariant>
00031 
00032 class ServiceUnitTest;
00033 
00034 namespace ContextProvider {
00035 
00036 class Property;
00037 class ServiceBackend;
00038 
00039 class Service : public QObject
00040 {
00041     Q_OBJECT
00042 
00043 public:
00044     explicit Service(QDBusConnection connection, QObject *parent = 0);
00045     Service(QDBusConnection::BusType busType, const QString &busName, QObject *parent = 0);
00046     Service(QDBusConnection::BusType busType, const QString &busName, bool autoStart, QObject *parent = 0);
00047     virtual ~Service();
00048 
00049     bool start();
00050     void stop();
00051     void restart();
00052 
00053     void setAsDefault();
00054 
00055     void setValue(const QString &key, const QVariant &val);
00056     void setConnection(const QDBusConnection &connection);
00057 
00058 private:
00059     ServiceBackend *backend; 
00060 
00061     friend class Property;
00062     friend class ::ServiceUnitTest;
00063 };
00064 
00065 } // end namespace
00066 
00067 #endif

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