Skip to content

Commit

Permalink
Seperate the old sensor daemon folder to a new light weight daemon an…
Browse files Browse the repository at this point in the history
…d a share library
  • Loading branch information
shenghua authored and shenghua committed Jan 12, 2011
1 parent a8a5fd1 commit 5944562
Show file tree
Hide file tree
Showing 136 changed files with 256 additions and 377 deletions.
2 changes: 1 addition & 1 deletion adaptors/accelerometeradaptor/accelerometeradaptor.h
Expand Up @@ -28,7 +28,7 @@
#define ACCELEROMETERADAPTOR_H

#include "inputdevadaptor.h"
#include "sensord/deviceadaptorringbuffer.h"
#include "deviceadaptorringbuffer.h"
#include "datatypes/orientationdata.h"
#include <QTime>

Expand Down
2 changes: 1 addition & 1 deletion adaptors/adaptor-config.pri
Expand Up @@ -5,7 +5,7 @@ include( ../common-config.pri )

SENSORFW_INCLUDEPATHS = ../.. \
../../include \
../../sensord \
../../core \
../../datatypes

DEPENDPATH += $$SENSORFW_INCLUDEPATHS
Expand Down
2 changes: 1 addition & 1 deletion adaptors/alsadaptor-ascii/alsadaptor-ascii.h
Expand Up @@ -34,7 +34,7 @@
#include <QObject>
#include <QString>
#include "sysfsadaptor.h"
#include "sensord/deviceadaptorringbuffer.h"
#include "deviceadaptorringbuffer.h"
#include "datatypes/timedunsigned.h"

class ALSAdaptorAscii : public SysfsAdaptor
Expand Down
2 changes: 1 addition & 1 deletion adaptors/alsadaptor-sysfs/alsadaptor-sysfs.h
Expand Up @@ -29,7 +29,7 @@
#define ALSADAPTOR_SYSFS_H

#include "sysfsadaptor.h"
#include "sensord/deviceadaptorringbuffer.h"
#include "deviceadaptorringbuffer.h"
#include "datatypes/timedunsigned.h"
#include <QTime>

Expand Down
2 changes: 1 addition & 1 deletion adaptors/alsadaptor/alsadaptor.h
Expand Up @@ -29,7 +29,7 @@
#define ALSADAPTOR_H

#include "sysfsadaptor.h"
#include "sensord/deviceadaptorringbuffer.h"
#include "deviceadaptorringbuffer.h"
#include "datatypes/timedunsigned.h"
#include <QTime>

Expand Down
2 changes: 1 addition & 1 deletion adaptors/gyroscopeadaptor/gyroscopeadaptor.h
Expand Up @@ -27,7 +27,7 @@
#ifndef GYROSCOPEADAPTOR_H
#define GYROSCOPEADAPTOR_H

#include "sensord/sysfsadaptor.h"
#include "sysfsadaptor.h"
#include "datatypes/orientationdata.h"

/**
Expand Down
2 changes: 1 addition & 1 deletion adaptors/kbslideradaptor/kbslideradaptor.cpp
Expand Up @@ -29,7 +29,7 @@
#include <fcntl.h>
#include <linux/input.h>
#include <string.h>
#include <sensord/logging.h>
#include "logging.h"

#include "kbslideradaptor.h"

Expand Down
2 changes: 1 addition & 1 deletion adaptors/kbslideradaptor/kbslideradaptor.h
Expand Up @@ -28,7 +28,7 @@
#define KBSLIDERADAPTOR_H

#include "inputdevadaptor.h"
#include "sensord/deviceadaptorringbuffer.h"
#include "deviceadaptorringbuffer.h"

/**
* @brief Adaptor for device keyboard slider state.
Expand Down
Expand Up @@ -32,7 +32,7 @@
#define MAGNETOMETERADAPTOR_ASCII_H

#include "sysfsadaptor.h"
#include "sensord/deviceadaptorringbuffer.h"
#include "deviceadaptorringbuffer.h"
#include "datatypes/timedunsigned.h"

class MagnetometerAdaptorAscii : public SysfsAdaptor
Expand Down
4 changes: 2 additions & 2 deletions adaptors/magnetometeradaptor/magnetometeradaptor.h
Expand Up @@ -27,8 +27,8 @@
#ifndef MAGNETOMETERADAPTOR_H
#define MAGNETOMETERADAPTOR_H

#include "sensord/sysfsadaptor.h"
#include "sensord/deviceadaptorringbuffer.h"
#include "sysfsadaptor.h"
#include "deviceadaptorringbuffer.h"
#include "datatypes/genericdata.h"
#include <QTime>
#include <QString>
Expand Down
6 changes: 3 additions & 3 deletions adaptors/mrstaccelerometer/mrstaccelerometeradaptor.h
@@ -1,11 +1,11 @@
#ifndef MRSTACCELEROMETERADPTOR_H
#define MRSTACCELEROMETERADPTOR_H
#include "sensord/sysfsadaptor.h"
#include "sysfsadaptor.h"
#include <QString>
#include <QStringList>
#include <linux/input.h>
#include <sensord/filterproperty.h>
#include "sensord/deviceadaptorringbuffer.h"
#include <filterproperty.h>
#include "deviceadaptorringbuffer.h"
#include "datatypes/orientationdata.h"
#include <QTime>

Expand Down
2 changes: 1 addition & 1 deletion adaptors/proximityadaptor-ascii/proximityadaptor-ascii.h
Expand Up @@ -32,7 +32,7 @@
#define PROXIMITYADAPTOR_ASCII_H

#include "sysfsadaptor.h"
#include "sensord/deviceadaptorringbuffer.h"
#include "deviceadaptorringbuffer.h"
#include "datatypes/timedunsigned.h"

class ProximityAdaptorAscii : public SysfsAdaptor
Expand Down
2 changes: 1 addition & 1 deletion adaptors/proximityadaptor-evdev/proximityadaptor-evdev.cpp
Expand Up @@ -30,7 +30,7 @@
#include <fcntl.h>
#include <linux/input.h>
#include <string.h>
#include <sensord/logging.h>
#include <logging.h>
#include "datatypes/utils.h"
#include "config.h"

Expand Down
2 changes: 1 addition & 1 deletion adaptors/proximityadaptor-evdev/proximityadaptor-evdev.h
Expand Up @@ -29,7 +29,7 @@
#define PROXIMITYADAPTOR_EVDEV_H

#include "inputdevadaptor.h"
#include "sensord/deviceadaptorringbuffer.h"
#include "deviceadaptorringbuffer.h"
#include "datatypes/timedunsigned.h"
#include <QTime>

Expand Down
4 changes: 2 additions & 2 deletions adaptors/proximityadaptor/proximityadaptor.cpp
Expand Up @@ -28,8 +28,8 @@
#include "proximityadaptor.h"
#include <errno.h>
#include "datatypes/utils.h"
#include "sensord/logging.h"
#include "sensord/config.h"
#include "logging.h"
#include "config.h"
#include <QFile>
#include <linux/types.h>

Expand Down
2 changes: 1 addition & 1 deletion adaptors/proximityadaptor/proximityadaptor.h
Expand Up @@ -30,7 +30,7 @@

#include <QDBusInterface>
#include "sysfsadaptor.h"
#include "sensord/deviceadaptorringbuffer.h"
#include "deviceadaptorringbuffer.h"
#include "datatypes/timedunsigned.h"

#ifdef SENSORFW_MCE_WATCHER
Expand Down
2 changes: 1 addition & 1 deletion adaptors/tapadaptor/tapadaptor.h
Expand Up @@ -29,7 +29,7 @@
#define TAPADAPTOR_H

#include "inputdevadaptor.h"
#include "sensord/deviceadaptorringbuffer.h"
#include "deviceadaptorringbuffer.h"
#include "datatypes/tapdata.h"

/**
Expand Down
4 changes: 2 additions & 2 deletions adaptors/touchadaptor/touchadaptor.h
Expand Up @@ -28,8 +28,8 @@
#define TOUCHADAPTOR_H

#include "inputdevadaptor.h"
#include "sensord/deviceadaptorringbuffer.h"
#include <sensord/filterproperty.h>
#include "deviceadaptorringbuffer.h"
#include "filterproperty.h"
#include <QObject>
#include "touchdata.h"

Expand Down
10 changes: 5 additions & 5 deletions chains/accelerometerchain/accelerometerchain.cpp
Expand Up @@ -27,11 +27,11 @@
#include "accelerometerchain.h"
#include <QVariant>
#include <QStringList>
#include "sensord/sensormanager.h"
#include "sensord/bin.h"
#include "sensord/bufferreader.h"
#include "sensord/config.h"
#include "sensord/logging.h"
#include "sensormanager.h"
#include "bin.h"
#include "bufferreader.h"
#include "config.h"
#include "logging.h"

#include "coordinatealignfilter/coordinatealignfilter.h"

Expand Down
2 changes: 1 addition & 1 deletion chains/chain-config.pri
Expand Up @@ -5,7 +5,7 @@ include( ../common-config.pri )

SENSORFW_INCLUDEPATHS = ../.. \
../../include \
../../sensord \
../../core \
../../datatypes \
../../adaptors \
../../filters
Expand Down
6 changes: 3 additions & 3 deletions chains/orientationchain/orientationchain.cpp
Expand Up @@ -24,9 +24,9 @@
*/

#include "orientationchain.h"
#include "sensord/sensormanager.h"
#include "sensord/bin.h"
#include "sensord/bufferreader.h"
#include "sensormanager.h"
#include "bin.h"
#include "bufferreader.h"

OrientationChain::OrientationChain(const QString& id) :
AbstractChain(id)
Expand Down
6 changes: 3 additions & 3 deletions chains/orientationchain/orientationchain.h
Expand Up @@ -29,9 +29,9 @@
#include "abstractsensor.h"
#include "abstractchain.h"
#include "deviceadaptor.h"
#include "sensord/bufferreader.h"
#include "sensord/filter.h"
#include "sensord/bin.h"
#include "bufferreader.h"
#include "filter.h"
#include "bin.h"
#include "orientationdata.h"
#include "posedata.h"
#include "datatypes/unsigned.h"
Expand Down
2 changes: 1 addition & 1 deletion chains/orientationchain/orientationchainplugin.cpp
Expand Up @@ -27,7 +27,7 @@
#include "orientationchainplugin.h"
#include "orientationchain.h"
#include "sensormanager.h"
#include "sensord/logging.h"
#include "logging.h"

void OrientationChainPlugin::Register(class Loader&)
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -29,7 +29,7 @@
#include "sensormanager.h"
#include "logging.h"
#include "abstractsensor.h"
#include "sensord/config.h"
#include "config.h"

CalibrationHandler::CalibrationHandler(QObject* parent) : QObject(parent),
m_sensor(NULL),
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion sensord/config.cpp → core/config.cpp
Expand Up @@ -26,7 +26,7 @@

#include "config.h"

#include <sensord/logging.h>
#include "logging.h"
#include <QSettings>
#include <QVariant>
#include <QFile>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
92 changes: 92 additions & 0 deletions core/core.pro
@@ -0,0 +1,92 @@
QT += network

TEMPLATE = lib
TARGET = sensorfw

include( ../common-config.pri )

CONFIG += console \
link_pkgconfig

SENSORFW_INCLUDEPATHS = .. \
../include \
../filters \
../datatypes
DEPENDPATH += $$SENSORFW_INCLUDEPATHS
INCLUDEPATH += $$SENSORFW_INCLUDEPATHS

LIBS += -Wl,-rpath,/usr/lib/sensord
LIBS += -Wl,-E
LIBS += -L../datatypes -lsensordatatypes

SOURCES += sensormanager.cpp \
sensormanager_a.cpp \
ringbuffer.cpp \
producer.cpp \
source.cpp \
consumer.cpp \
bin.cpp \
filter.cpp \
deviceadaptor.cpp \
loader.cpp \
plugin.cpp \
filterproperty.cpp \
abstractsensor_a.cpp \
abstractsensor.cpp \
logging.cpp \
parameterparser.cpp \
sysfsadaptor.cpp \
sockethandler.cpp \
inputdevadaptor.cpp \
config.cpp \
calibrationhandler.cpp \
nodebase.cpp

HEADERS += sensormanager.h \
sensormanager_a.h \
dbusemitter.h \
pusher.h \
ringbuffer.h \
producer.h \
callback.h \
source.h \
consumer.h \
sink.h \
bin.h \
filter.h \
deviceadaptor.h \
deviceadaptorringbuffer.h \
bufferreader.h \
loader.h \
plugin.h \
filterproperty.h \
abstractsensor_a.h \
abstractsensor.h \
logging.h \
parameterparser.h \
abstractchain.h \
sysfsadaptor.h \
sockethandler.h \
inputdevadaptor.h \
config.h \
calibrationhandler.h \
nodebase.h

!mce_disable {
SOURCES += mcewatcher.cpp
HEADERS += mcewatcher.h
DEFINES += SENSORFW_MCE_WATCHER
}

contextprovider {
DEFINES += PROVIDE_CONTEXT_INFO
PKGCONFIG += contextprovider-1.0
}


publicheaders.path = $${publicheaders.path}/core
publicheaders.files = $$HEADERS

include(../common-install.pri)
target.path = $$SHAREDLIBPATH
INSTALLS += target
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions sensord/inputdevadaptor.h → core/inputdevadaptor.h
Expand Up @@ -28,12 +28,12 @@
#ifndef INPUTDEVADAPTOR_H
#define INPUTDEVADAPTOR_H

#include "sensord/sysfsadaptor.h"
#include "sysfsadaptor.h"
#include <QString>
#include <QStringList>
#include <QFile>
#include <linux/input.h>
#include <sensord/filterproperty.h>
#include "filterproperty.h"

/**
* @brief Base class for adaptors accessing device drivers through Linux Input
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion sensord/sysfsadaptor.cpp → core/sysfsadaptor.cpp
Expand Up @@ -31,7 +31,7 @@
#include <fcntl.h>
#include <sys/epoll.h>
#include <QFile>
#include "sensord/logging.h"
#include "logging.h"

SysfsAdaptor::SysfsAdaptor(const QString& id,
PollMode mode,
Expand Down
6 changes: 3 additions & 3 deletions sensord/sysfsadaptor.h → core/sysfsadaptor.h
Expand Up @@ -27,12 +27,12 @@
#ifndef SYSFSADAPTOR_H
#define SYSFSADAPTOR_H

#include "sensord/deviceadaptor.h"
#include "sensord/deviceadaptorringbuffer.h"
#include "deviceadaptor.h"
#include "deviceadaptorringbuffer.h"
#include <QString>
#include <QStringList>
#include <QThread>
#include <sensord/filterproperty.h>
#include "filterproperty.h"
#include <QMutex>

class SysfsAdaptor;
Expand Down
1 change: 1 addition & 0 deletions debian/sensord.install
@@ -1,6 +1,7 @@
#/usr/lib/libfilters.so*
/usr/lib/libsensorclient.so*
/usr/lib/libsensordatatypes.so*
/usr/lib/libsensorfw.so*
/usr/lib/sensord/*so
/usr/sbin/sensord
/usr/share/contextkit/providers/*
Expand Down

0 comments on commit 5944562

Please sign in to comment.