sensorfw
sensormanager_i.h
Go to the documentation of this file.
1 
30 #ifndef SENSORMANAGER_I_H
31 #define SENSORMANAGER_I_H
32 
33 #include <QtDBus/QtDBus>
34 #include <QString>
35 #include "sfwerror.h"
36 
40 class LocalSensorManagerInterface : public QDBusAbstractInterface
41 {
42  Q_OBJECT
43  Q_DISABLE_COPY(LocalSensorManagerInterface)
44  Q_PROPERTY(SensorManagerError errorCode READ errorCode)
45  Q_PROPERTY(QString errorString READ errorString)
46  Q_PROPERTY(int errorCodeInt READ errorCodeInt NOTIFY errorSignal)
47 
48 
53  int errorCodeInt();
54 
55 public:
61  static const char* staticInterfaceName;
62 
67 
74 
80  QString errorString();
81 
82 public Q_SLOTS:
83 
90  QDBusReply<bool> loadPlugin(const QString& name);
91 
98  QDBusReply<int> requestSensor(const QString& id);
99 
107  QDBusReply<bool> releaseSensor(const QString& id, int sessionId);
108 
109 Q_SIGNALS:
110 
116  void errorSignal(int error);
117 
121 
122 protected:
123 
132  LocalSensorManagerInterface(const QString& service, const QString& path, const QDBusConnection& connection, QObject* parent = 0);
133 
134 protected slots:
135  void loadPluginFinished(QDBusPendingCallWatcher *watch);
136  void requestSensorFinished(QDBusPendingCallWatcher *watch);
137  void releaseSensorFinished(QDBusPendingCallWatcher *watch);
138 
139 };
140 
141 namespace local {
142  typedef ::LocalSensorManagerInterface SensorManager;
143 }
144 #endif
DBus interface to SensorManager instance.
QDBusReply< int > requestSensor(const QString &id)
Request sensor deamon to start new session for sensor.
void loadPluginFinished(QDBusPendingCallWatcher *watch)
LocalSensorManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent=0)
Constructor.
SensorManagerError errorCode()
Get error code of occured remote error.
QDBusReply< bool > releaseSensor(const QString &id, int sessionId)
Request sensor deamon to release existing session.
void releaseSensorFinished(QDBusPendingCallWatcher *watch)
static const char * staticInterfaceName
Get name of the D-Bus interface for this class.
virtual ~LocalSensorManagerInterface()
Destructor.
void errorSignal(int error)
Signal about occured errors.
SensorManagerError errorCode
QString errorString()
Get error description of occured remote error.
QDBusReply< bool > loadPlugin(const QString &name)
Request sensor daemon to load plugin.
void requestSensorFinished(QDBusPendingCallWatcher *watch)
::LocalSensorManagerInterface SensorManager
Error definitions.
SensorManagerError
Enumeration about SensorManager error states.
Definition: sfwerror.h:38