sensorfw: qt-api/sensormanager_i.h Source File

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
66 virtual ~LocalSensorManagerInterface();
67
73 SensorManagerError errorCode();
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
118 void loadPluginFinished();
119 void requestSensorFinished();
120 void releaseSensorFinished();
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
LocalSensorManagerInterface
DBus interface to SensorManager instance.
Definition: sensormanager_i.h:41
LocalSensorManagerInterface::requestSensor
QDBusReply< int > requestSensor(const QString &id)
Request sensor deamon to start new session for sensor.
LocalSensorManagerInterface::loadPluginFinished
void loadPluginFinished(QDBusPendingCallWatcher *watch)
LocalSensorManagerInterface::LocalSensorManagerInterface
LocalSensorManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent=0)
Constructor.
LocalSensorManagerInterface::errorCode
SensorManagerError errorCode()
Get error code of occured remote error.
LocalSensorManagerInterface::releaseSensor
QDBusReply< bool > releaseSensor(const QString &id, int sessionId)
Request sensor deamon to release existing session.
LocalSensorManagerInterface::releaseSensorFinished
void releaseSensorFinished(QDBusPendingCallWatcher *watch)
LocalSensorManagerInterface::errorString
QString errorString
Definition: sensormanager_i.h:45
LocalSensorManagerInterface::staticInterfaceName
static const char * staticInterfaceName
Get name of the D-Bus interface for this class.
Definition: sensormanager_i.h:61
LocalSensorManagerInterface::~LocalSensorManagerInterface
virtual ~LocalSensorManagerInterface()
Destructor.
LocalSensorManagerInterface::errorSignal
void errorSignal(int error)
Signal about occured errors.
LocalSensorManagerInterface::errorCode
SensorManagerError errorCode
Definition: sensormanager_i.h:44
LocalSensorManagerInterface::errorString
QString errorString()
Get error description of occured remote error.
LocalSensorManagerInterface::loadPluginFinished
void loadPluginFinished()
LocalSensorManagerInterface::errorCodeInt
int errorCodeInt
Definition: sensormanager_i.h:46
LocalSensorManagerInterface::releaseSensorFinished
void releaseSensorFinished()
LocalSensorManagerInterface::loadPlugin
QDBusReply< bool > loadPlugin(const QString &name)
Request sensor daemon to load plugin.
LocalSensorManagerInterface::requestSensorFinished
void requestSensorFinished()
LocalSensorManagerInterface::requestSensorFinished
void requestSensorFinished(QDBusPendingCallWatcher *watch)
local
Definition: abstractsensor_i.h:516
local::SensorManager
::LocalSensorManagerInterface SensorManager
Definition: sensormanager_i.h:142
sfwerror.h
Error definitions.
SensorManagerError
SensorManagerError
Enumeration about SensorManager error states.
Definition: sfwerror.h:38