[-]
[+]
|
Changed |
_service:tar_git:sensorfw.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:sensorfw-qt5-hybris.spec
^
|
|
[-]
[+]
|
Deleted |
_service:tar_git:hybris-libsensorfw-qt5-0.9.4.tar.bz2/adaptors/gyroscopeadaptor-evdev/gyroadaptor-evdevplugin.h.autosave
^
|
@@ -1,45 +0,0 @@
-/**
- @file alsadaptor-evdevplugin.h
- @brief Plugin for GyroAdaptorEvdevPlugin
-
- <p>
- Copyright (C) 2009-2010 Nokia Corporation
- Copyright (C) 2015 Jolla
-
- @author Lorn Potter <lorn.potter@jolla.com>
- @author Timo Rongas <ext-timo.2.rongas@nokia.com>
- @author Markus Lehtonen <markus.lehtonen@nokia.com>
-
- This file is part of Sensord.
-
- Sensord is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License
- version 2.1 as published by the Free Software Foundation.
-
- Sensord is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with Sensord. If not, see <http://www.gnu.org/licenses/>.
- </p>
-*/
-
-#ifndef GYROADAPTOR_EVDEVPLUGIN_H
-#define GYROADAPTOR_EVDEVPLUGIN_H
-
-#include "plugin.h"
-
-class GyroAdaptorEvdevPlugin : public Plugin
-{
- Q_OBJECT
-#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
- Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0")
-#endif
-
-private:
- void Register(class Loader& l);
-};
-
-#endif
|
[-]
[+]
|
Added |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/LuneOS/sysbus/com.nokia.SensorService.json.prv
^
|
@@ -0,0 +1,14 @@
+{
+ "role": {
+ "exeName":"/usr/sbin/sensorfwd",
+ "type": "privileged",
+ "allowedNames": ["com.nokia.SensorService"]
+ },
+ "permissions": [
+ {
+ "service":"com.nokia.SensorService",
+ "inbound":["*"],
+ "outbound":["*"]
+ }
+ ]
+}
|
[-]
[+]
|
Added |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/LuneOS/sysbus/com.nokia.SensorService.service.prv
^
|
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name=com.nokia.SensorService
+Exec=/usr/sbin/sensrofwd
+Type=static
|
[-]
[+]
|
Added |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/LuneOS/systemd/sensorfwd.service
^
|
@@ -0,0 +1,17 @@
+[Unit]
+Description=Sensor daemon for sensor framework
+After=dbus.socket ls-hubd_private.service
+Requires=dbus.service ls-hubd_private.service
+Conflicts=actdead.target
+
+[Service]
+Type=forking
+BusName=com.nokia.SensorService
+ExecStartPre=/bin/sh /usr/bin/sensord-daemon-conf-setup
+ExecStart=/usr/sbin/sensorfwd -c=/etc/sensorfw/primaryuse.conf -d --log-level=warning --no-magnetometer-bg-calibration
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=always
+RestartSec=1
+
+[Install]
+WantedBy=multi-user.target
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/adaptors/adaptor-config.pri
^
|
@@ -17,3 +17,6 @@
INSTALLS += target
+config_hybris {
+ CONFIG += link_pkgconfig
+}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/adaptors/alsadaptor-evdev/alsadaptor-evdevplugin.cpp
^
|
@@ -1,6 +1,6 @@
/**
- @file alsadaptorplugin-sysfs.cpp
- @brief Plugin for ALSAdaptorSysfs
+ @file alsadaptor-evdevplugin.cpp
+ @brief Plugin for ALSAdaptorEvdev
<p>
Copyright (C) 2009-2010 Nokia Corporation
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/adaptors/alsadaptor-evdev/alsevdevadaptor.h
^
|
@@ -1,5 +1,5 @@
/**
- @file inputdevadaptor.cpp
+ @file alsevdevadaptor.h
@brief Contains ALSAdaptorEvdev.
<p>
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/adaptors/alsadaptor-sysfs/alsadaptor-sysfsplugin.cpp
^
|
@@ -1,5 +1,5 @@
/**
- @file alsadaptorplugin-sysfs.cpp
+ @file alsadaptor-sysfsplugin.cpp
@brief Plugin for ALSAdaptorSysfs
<p>
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/adaptors/gyroscopeadaptor-evdev/gyroadaptor-evdevplugin.h
^
|
@@ -1,6 +1,6 @@
/**
- @file alsadaptor-evdevplugin.h
- @brief Plugin for ALSAdaptorEvdevPlugin
+ @file gyroadaptor-evdevplugin.h
+ @brief Plugin for GyroAdaptorEvdevPlugin
<p>
Copyright (C) 2009-2010 Nokia Corporation
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/adaptors/hybrisaccelerometer/hybrisaccelerometer.pro
^
|
@@ -9,5 +9,5 @@
include( ../adaptor-config.pri )
config_hybris {
- INCLUDEPATH+=/usr/include/android
+ PKGCONFIG += android-headers
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/adaptors/hybrisalsadaptor/hybrisalsadaptor.pro
^
|
@@ -7,7 +7,7 @@
hybrisalsadaptorplugin.cpp
LIBS+= -L../../core -lhybrissensorfw-qt5
-include(../adaptor-config.pri )
+include( ../adaptor-config.pri )
config_hybris {
- INCLUDEPATH+=/usr/include/android
+ PKGCONFIG += android-headers
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/adaptors/hybrisgyroscopeadaptor/hybrisgyroscopeadaptor.pro
^
|
@@ -10,5 +10,5 @@
include( ../adaptor-config.pri )
config_hybris {
- INCLUDEPATH+=/usr/include/android
+ PKGCONFIG += android-headers
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/adaptors/hybrismagnetometeradaptor/hybrismagnetometeradaptor.pro
^
|
@@ -10,5 +10,5 @@
include( ../adaptor-config.pri )
config_hybris {
- INCLUDEPATH+=/usr/include/android
+ PKGCONFIG += android-headers
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/adaptors/hybrisorientationadaptor/hybrisorientationadaptor.pro
^
|
@@ -10,5 +10,5 @@
include( ../adaptor-config.pri )
config_hybris {
- INCLUDEPATH+=/usr/include/android
+ PKGCONFIG += android-headers
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/adaptors/hybrispressureadaptor/hybrispressureadaptor.pro
^
|
@@ -7,7 +7,7 @@
hybrispressureadaptorplugin.cpp
LIBS+= -L../../core -lhybrissensorfw-qt5
-include(../adaptor-config.pri )
+include( ../adaptor-config.pri )
config_hybris {
- INCLUDEPATH+=/usr/include/android
+ PKGCONFIG += android-headers
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/adaptors/hybrisproximityadaptor/hybrisproximityadaptor.pro
^
|
@@ -10,5 +10,5 @@
include( ../adaptor-config.pri )
config_hybris {
- INCLUDEPATH+=/usr/include/android
+ PKGCONFIG += android-headers
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/adaptors/hybrisstepcounteradaptor/hybrisstepcounteradaptor.pro
^
|
@@ -7,7 +7,7 @@
hybrisstepcounteradaptorplugin.cpp
LIBS+= -L../../core -lhybrissensorfw-qt5
-include(../adaptor-config.pri )
+include( ../adaptor-config.pri )
config_hybris {
- INCLUDEPATH+=/usr/include/android
+ PKGCONFIG += android-headers
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/adaptors/magnetometeradaptor-evdev/magnetometeradaptor-evdevplugin.h
^
|
@@ -1,6 +1,6 @@
/**
- @file alsadaptor-sysfsplugin.h
- @brief Plugin for ALSAdaptorSysfs
+ @file magnetometeradaptor-evdevplugin.h
+ @brief Plugin for MagnetometerAdaptorEvdev
<p>
Copyright (C) 2009-2010 Nokia Corporation
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/chains/orientationchain/orientationchainplugin.cpp
^
|
@@ -1,5 +1,5 @@
/**
- @file accelerometerchainplugin.cpp
+ @file orientationchainplugin.cpp
@brief Plugin for AccelerometerChain
<p>
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/chains/orientationchain/orientationchainplugin.h
^
|
@@ -1,6 +1,6 @@
/**
- @file accelerometerchainplugin.h
- @brief Plugin for AccelerometerChain
+ @file orientationchainplugin.h
+ @brief Plugin for OrientationChain
<p>
Copyright (C) 2009-2010 Nokia Corporation
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/config.tests/hybris/hybris.pro
^
|
@@ -1,6 +1,8 @@
TEMPLATE = app
-INCLUDEPATH=/usr/include/android
+CONFIG += link_pkgconfig
+PKGCONFIG += android-headers
+
TARGET = hybris
SOURCES += main.cpp
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/config/sensord-daemon-conf-setup
^
|
@@ -6,7 +6,7 @@
cd /etc/sensorfw/
if [ -x /usr/sbin/sensorfwd ]; then
- if [ -f /usr/lib/libhybrissensorfw*.so ]; then
+ if ldconfig -p | grep libhybrissensorfw ; then
# Always prefer hybris sensor backend to anything else (also overwrite
# old setting, as sometimes the boardname matches, e.g. on grouper)
if [ "$(readlink primaryuse.conf)" != sensord-hybris.conf ]; then
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/core/core.pro
^
|
@@ -80,6 +80,14 @@
DEFINES += SENSORFW_MCE_WATCHER
}
+lunaservice {
+ SOURCES += lsclient.cpp
+ HEADERS += lsclient.h
+ DEFINES += SENSORFW_LUNA_SERVICE_CLIENT
+ PKGCONFIG += Qt5Gui json-c
+ PKGCONFIG += luna-service2 LunaSysMgrCommon LunaSysMgrIpcMessages
+}
+
contains(CONFIG,hybris) {
} else {
publicheaders.path = $${publicheaders.path}/core
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/core/deviceadaptor.cpp
^
|
@@ -83,7 +83,11 @@
#ifdef SENSORFW_MCE_WATCHER
screenBlanked_(!SensorManager::instance().MCEWatcher()->displayEnabled())
#else
- screenBlanked_(false)
+ #ifdef SENSORFW_LUNA_SERVICE_CLIENT
+ screenBlanked_(!SensorManager::instance().LSClient_instance()->displayEnabled())
+ #else
+ screenBlanked_(false)
+ #endif
#endif
{
setValid(true);
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/core/hybris.pro
^
|
@@ -6,7 +6,7 @@
include( ../common-config.pri )
CONFIG += link_pkgconfig
-INCLUDEPATH+=/usr/include/android
+PKGCONFIG += android-headers
SENSORFW_INCLUDEPATHS = .. \
../include \
|
[-]
[+]
|
Added |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/core/lsclient.cpp
^
|
@@ -0,0 +1,191 @@
+/**
+ @file lsclient.cpp
+ @brief LunaService signal utility
+
+ <p>
+ Copyright (C) 2009-2010 Nokia Corporation
+ Copyright (C) 2015-2018 Nikolay Nizov
+
+ @author Timo Rongas <ext-timo.2.rongas@nokia.com>
+ @author Lihan Guo <ext-lihan.4.guo@nokia.com>
+ @author Nikolay Nizov <nizovn@gmail.com>
+
+ This file is part of Sensord.
+
+ Sensord is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ Sensord is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with Sensord. If not, see <http://www.gnu.org/licenses/>.
+ </p>
+ */
+
+#include "lsclient.h"
+#include "JSONUtils.h"
+#include "HostBase.h"
+#include <json.h>
+
+#define URI_SIGNAL_ADDMATCH "palm://com.palm.lunabus/signal/addmatch"
+#define JSON_CHARGER_SIGNAL_ADDMATCH "{\"category\":\"/com/palm/power\",\"method\":\"chargerStatus\"}"
+#define URI_DISPLAY_STATUS "palm://com.palm.display/control/status"
+#define JSON_DISPLAY_SUBSCRIBE "{\"subscribe\":true}"
+
+LSClient::LSClient(QObject* parent) : QObject(parent),
+ displayState(true),
+ powerSave(true)
+{
+ bool retVal;
+ LSError lserror;
+ LSErrorInit(&lserror);
+ LSHandle *serviceHandle;
+
+ retVal = LSRegister("com.nokia.SensorService", &serviceHandle, &lserror);
+ if (!retVal) {
+ goto error;
+ }
+
+ retVal = LSCall(serviceHandle, URI_SIGNAL_ADDMATCH, JSON_CHARGER_SIGNAL_ADDMATCH, LSClient::chargerCallback, this, NULL, &lserror);
+ if (!retVal) {
+ goto error;
+ }
+
+ retVal = LSCall(serviceHandle, URI_DISPLAY_STATUS, JSON_DISPLAY_SUBSCRIBE, LSClient::displayCallback, this, NULL, &lserror);
+ if (!retVal) {
+ goto error;
+ }
+
+ retVal = LSGmainAttach(serviceHandle, HostBase::instance()->mainLoop(), &lserror);
+ if (!retVal) {
+ goto error;
+ }
+
+ return;
+
+error:
+ if (LSErrorIsSet(&lserror)) {
+ LSErrorPrint(&lserror, stderr);
+ LSErrorFree(&lserror);
+ }
+
+ qDebug() << "Unable to start service.";
+}
+
+bool LSClient::displayEnabled() const
+{
+ return displayState;
+}
+
+bool LSClient::PSMEnabled() const
+{
+ return powerSave;
+}
+
+bool LSClient::chargerCallback(LSHandle *sh, LSMessage *message, void *ctx)
+{
+ LSError lserror;
+ LSErrorInit(&lserror);
+
+ // {"type": string, "connected": boolean}
+ VALIDATE_SCHEMA_AND_RETURN(sh,
+ message,
+ SCHEMA_2(REQUIRED(type, string), REQUIRED(connected, boolean)));
+
+ LSClient* lsclient = (LSClient*)ctx;
+
+ json_object* label = 0;
+ json_object* root = 0;
+ bool newState = true;
+ const char* str = LSMessageGetPayload(message);
+ if (!str)
+ goto error;
+
+ root = json_tokener_parse(str);
+ if (!root || is_error(root))
+ goto error;
+
+ label = json_object_object_get(root, "connected");
+ if (!label)
+ goto error;
+
+ newState = !json_object_get_boolean(label);
+
+ if (lsclient->powerSave != newState)
+ {
+ lsclient->powerSave = newState;
+ emit lsclient->devicePSMStateChanged(newState);
+ }
+
+error:
+
+ if (root && !is_error(root))
+ json_object_put(root);
+
+ return true;
+}
+
+bool LSClient::displayCallback(LSHandle *sh, LSMessage *message, void *ctx)
+{
+ LSError lserror;
+ LSErrorInit(&lserror);
+
+ VALIDATE_SCHEMA_AND_RETURN(sh,
+ message,
+ SCHEMA_7(
+ REQUIRED(returnValue, boolean),
+ REQUIRED(event, string),
+ OPTIONAL(state, string),
+ OPTIONAL(timeout, integer),
+ OPTIONAL(blockDisplay, string),
+ OPTIONAL(active, boolean),
+ OPTIONAL(subscribed, boolean)
+ ));
+
+ LSClient* lsclient = (LSClient*)ctx;
+
+ json_object* root = 0;
+ const char* value = 0;
+ bool newState = true;
+ bool ret = false;
+ const char* str = LSMessageGetPayload(message);
+ if (!str)
+ goto error;
+
+ root = json_tokener_parse(str);
+ if (!root || is_error(root))
+ goto error;
+
+ ret = json_object_get_boolean(json_object_object_get(root, "returnValue"));
+ if (!ret)
+ goto error;
+
+ value = json_object_get_string(json_object_object_get(root, "event"));
+ if (!value || is_error(value))
+ goto error;
+
+ if (0 == strcmp (value, "displayOff"))
+ newState = false;
+
+ value = json_object_get_string(json_object_object_get(root, "state"));
+ if (value && !is_error(value))
+ if (0 == strcmp (value, "off"))
+ newState = false;
+
+ if (lsclient->displayState != newState)
+ {
+ lsclient->displayState = newState;
+ emit lsclient->displayStateChanged(newState);
+ }
+
+error:
+
+ if (root && !is_error(root))
+ json_object_put(root);
+
+ return true;
+}
\ No newline at end of file
|
[-]
[+]
|
Added |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/core/lsclient.h
^
|
@@ -0,0 +1,103 @@
+/**
+ @file lsclient.h
+ @brief LunaService signal utility
+
+ <p>
+ Copyright (C) 2009-2010 Nokia Corporation
+ Copyright (C) 2015-2018 Nikolay Nizov
+
+ @author Timo Rongas <ext-timo.2.rongas@nokia.com>
+ @author Lihan Guo <ext-lihan.4.guo@nokia.com>
+ @author Antti Virtanen <antti.i.virtanen@nokia.com>
+ @author Nikolay Nizov <nizovn@gmail.com>
+
+ This file is part of Sensord.
+
+ Sensord is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ Sensord is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with Sensord. If not, see <http://www.gnu.org/licenses/>.
+ </p>
+ */
+
+#ifndef SENSORD_LUNA_SERVICE_CLIENT_H
+#define SENSORD_LUNA_SERVICE_CLIENT_H
+
+#include <QObject>
+#include <luna-service2/lunaservice.h>
+
+/**
+ * Class for monitoring various LS signals.
+ */
+class LSClient : public QObject
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(LSClient)
+
+public:
+ /**
+ * Constructor.
+ *
+ * @param parent Parent object.
+ */
+ LSClient(QObject* parent = 0);
+
+ /**
+ * Get display state.
+ *
+ * @return display state.
+ */
+ bool displayEnabled() const;
+
+ /**
+ * Get powersave-mode state.
+ *
+ * @return powersave-mode state.
+ */
+ bool PSMEnabled() const;
+
+signals:
+ /**
+ * Emitted when display state has changed.
+ *
+ * @param displayOn \c true if display went to 'on' or 'dimmed',
+ * \c false if 'off'.
+ */
+ void displayStateChanged(bool displayOn);
+
+ /**
+ * Emitted when powersave-mode has changed.
+ *
+ * @param PSM is powersave-mode enabled or not.
+ */
+ void devicePSMStateChanged(bool PSM);
+
+private slots:
+ /**
+ * Slot for LS display state change signals.
+ *
+ * @param state name of the state.
+ */
+ static bool displayCallback(LSHandle *sh, LSMessage *message, void *ctx);
+
+ /**
+ * Slot for LS powersave-mode state change signals.
+ *
+ * @param mode is powersave-mode enabled or not.
+ */
+ static bool chargerCallback(LSHandle *sh, LSMessage *message, void *ctx);
+
+private:
+ bool displayState; /**< current display state */
+ bool powerSave; /**< current powersave-mode state */
+
+};
+
+#endif // SENSORD_LUNA_SERVICE_CLIENT_H
\ No newline at end of file
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/core/sensormanager.cpp
^
|
@@ -36,6 +36,9 @@
#ifdef SENSORFW_MCE_WATCHER
#include "mcewatcher.h"
#endif // SENSORFW_MCE_WATCHER
+#ifdef SENSORFW_LUNA_SERVICE_CLIENT
+#include "lsclient.h"
+#endif // SENSORFW_LUNA_SERVICE_CLIENT
#include <QSocketNotifier>
#include <errno.h>
#include "sockethandler.h"
@@ -144,6 +147,17 @@
this, SLOT(devicePSMStateChanged(const bool)));
#endif //SENSORFW_MCE_WATCHER
+
+#ifdef SENSORFW_LUNA_SERVICE_CLIENT
+
+ lsClient_ = new LSClient(this);
+ connect(lsClient_, SIGNAL(displayStateChanged(const bool)),
+ this, SLOT(displayStateChanged(const bool)));
+
+ connect(lsClient_, SIGNAL(devicePSMStateChanged(const bool)),
+ this, SLOT(devicePSMStateChanged(const bool)));
+
+#endif //SENSORFW_LUNA_SERVICE_CLIENT
}
SensorManager::~SensorManager()
@@ -203,6 +217,10 @@
#ifdef SENSORFW_MCE_WATCHER
delete mceWatcher_;
#endif //SENSORFW_MCE_WATCHER
+
+#ifdef SENSORFW_LUNA_SERVICE_CLIENT
+ delete lsClient_;
+#endif //SENSORFW_LUNA_SERVICE_CLIENT
}
void SensorManager::setError(SensorManagerError errorCode, const QString& errorString)
@@ -661,6 +679,10 @@
emit displayOn();
#ifdef SENSORFW_MCE_WATCHER
if (!mceWatcher_->PSMEnabled())
+#else
+ #ifdef SENSORFW_LUNA_SERVICE_CLIENT
+ if (!lsClient_->PSMEnabled())
+ #endif // SENSORFW_LUNA_SERVICE_CLIENT
#endif // SENSORFW_MCE_WATCHER
{
emit resumeCalibration();
@@ -807,6 +829,13 @@
}
#endif // SENSORFW_MCE_WATCHER
+#ifdef SENSORFW_LUNA_SERVICE_CLIENT
+LSClient* SensorManager::LSClient_instance() const
+{
+ return lsClient_;
+}
+#endif // SENSORFW_LUNA_SERVICE_CLIENT
+
#ifdef SM_PRINT
void SensorManager::print() const
{
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/core/sensormanager.h
^
|
@@ -45,6 +45,10 @@
class MceWatcher;
#endif
+#ifdef SENSORFW_LUNA_SERVICE_CLIENT
+#include "lsclient.h"
+#endif
+
class QSocketNotifier;
class SocketHandler;
@@ -322,6 +326,15 @@
MceWatcher* MCEWatcher() const;
#endif
+#ifdef SENSORFW_LUNA_SERVICE_CLIENT
+ /**
+ * Get pointer to LSClient instance.
+ *
+ * @return LSClient instance pointer.
+ */
+ LSClient* LSClient_instance() const;
+#endif
+
double magneticDeviation();
void setMagneticDeviation(double level);
@@ -334,14 +347,14 @@
void lostClient(int sessionId);
/**
- * Callback for MCE display state change event.
+ * Callback for MCE or LS display state change event.
*
* @param displayState display state.
*/
void displayStateChanged(bool displayState);
/**
- * Callback for MCE powersave mode change event.
+ * Callback for MCE or LS powersave mode change event.
*
* @param deviceMode device PSM state.
*/
@@ -450,6 +463,9 @@
SocketHandler* socketHandler_; /**< socket handler */
MceWatcher* mceWatcher_; /**< MCE watcher */
+#ifdef SENSORFW_LUNA_SERVICE_CLIENT
+ LSClient* lsClient_; /**< LS client */
+#endif
SensorManagerError errorCode_; /** global error code */
QString errorString_; /** global error description */
int pipefds_[2]; /** pipe for sensor samples */
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/examples/sensorplugin/samplesensor_a.cpp
^
|
@@ -1,5 +1,5 @@
/**
- @file accelerometersensor_a.cpp
+ @file samplesensor_a.cpp
@brief Sample D-Bus adaptor for sensors
<p>
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/filters/magcoordinatealignfilter/magcoordinatealignfilterplugin.cpp
^
|
@@ -1,6 +1,6 @@
/**
- @file MagCoordinateAlignFilterPlugin.cpp
- @brief Plugin for CoordinateAlignFilter
+ @file magcoordinatealignfilterplugin.cpp
+ @brief Plugin for MagCoordinateAlignFilter
<p>
Copyright (C) 2009-2010 Nokia Corporation
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/filters/magcoordinatealignfilter/magcoordinatealignfilterplugin.h
^
|
@@ -1,6 +1,6 @@
/**
- @file coordinatealignfilterplugin.h
- @brief Plugin for CoordinateAlignFilter
+ @file magcoordinatealignfilterplugin.h
+ @brief Plugin for MagCoordinateAlignFilter
<p>
Copyright (C) 2009-2010 Nokia Corporation
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/filters/rotationfilter/rotationfilterplugin.cpp
^
|
@@ -1,5 +1,5 @@
/**
- @file rotationfilterplugin.cppp
+ @file rotationfilterplugin.cpp
@brief Plugin for RotationFilter
<p>
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/qt-api/abstractsensor_i.cpp
^
|
@@ -31,6 +31,9 @@
#ifdef SENSORFW_MCE_WATCHER
#include "mcewatcher.h"
#endif
+#ifdef SENSORFW_LUNA_SERVICE_CLIENT
+#include "lsclient.h"
+#endif
struct AbstractSensorChannelInterface::AbstractSensorChannelInterfaceImpl : public QDBusAbstractInterface
{
@@ -80,6 +83,12 @@
QObject::connect(mcewatcher,SIGNAL(displayStateChanged(bool)),
this,SLOT(displayStateChanged(bool)),Qt::UniqueConnection);
#endif
+#ifdef SENSORFW_LUNA_SERVICE
+ LSClient *lsclient;
+ lsclient = new LSClient(this);
+ QObject::connect(lsclient,SIGNAL(displayStateChanged(bool)),
+ this,SLOT(displayStateChanged(bool)),Qt::UniqueConnection);
+#endif
}
AbstractSensorChannelInterface::~AbstractSensorChannelInterface()
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/qt-api/lidsensor_i.h
^
|
@@ -1,6 +1,6 @@
/**
- @file alssensor_i.h
- @brief Interface for ALSSensor
+ @file lidsensor_i.h
+ @brief Interface for LidSensor
<p>
Copyright (C) 2016 Canonical, Ltd.
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/sensors/contextplugin/stabilitybin.cpp
^
|
@@ -1,5 +1,5 @@
/**
- @file stabilitybin.h
+ @file stabilitybin.cpp
@brief Stability Bin for ContextFW
<p>
Copyright (C) 2009-2010 Nokia Corporation
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/sensors/humiditysensor/humidityplugin.cpp
^
|
@@ -1,5 +1,5 @@
/**
- @file HumidityPlugin.cpp
+ @file humidityplugin.cpp
@brief Plugin for HumiditySensor
<p>
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/sensors/lidsensor/lidplugin.cpp
^
|
@@ -1,5 +1,5 @@
/**
- @file LidPlugin.cpp
+ @file lidplugin.cpp
@brief Plugin for LidSensor
<p>
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/sensors/pressuresensor/pressureplugin.cpp
^
|
@@ -1,5 +1,5 @@
/**
- @file PressurePlugin.cpp
+ @file pressureplugin.cpp
@brief Plugin for PressureSensor
<p>
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/tests/deadclient/datareceiver.h
^
|
@@ -1,5 +1,5 @@
/**
- @file deadclient.h
+ @file datareceiver.h
@brief Automatic tests for dead client handling
<p>
Copyright (C) 2009-2010 Nokia Corporation
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/tests/testapp/sensorhandler_qtapi.cpp
^
|
@@ -1,5 +1,5 @@
/**
- @file sensorhandler.cpp
+ @file sensorhandler_qtapi.cpp
@brief sensor handler
<p>
Copyright (C) 2010-2011 Nokia Corporation
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/tests/testapp/sensorhandler_qtapi.h
^
|
@@ -1,5 +1,5 @@
/**
- @file sensorhandler.h
+ @file sensorhandler_qtapi.h
@brief test application to create sensor
<p>
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/tests/testapp/sensorhandler_qtmob.cpp
^
|
@@ -1,5 +1,5 @@
/**
- @file sensorhandler_qmsystem2.cpp
+ @file sensorhandler_qtmob.cpp
@brief sensor handler
<p>
Copyright (C) 2011 Nokia Corporation
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.6.tar.bz2/tests/testapp/sensorhandler_qtmob.h
^
|
@@ -1,5 +1,5 @@
/**
- @file sensorhandler_qmsystem2.h
+ @file sensorhandler_qtmob.h
@brief test application to create sensor
<p>
|