diff --git a/telldus-core/client/CMakeLists.txt b/telldus-core/client/CMakeLists.txt index e07e4445..3336d298 100644 --- a/telldus-core/client/CMakeLists.txt +++ b/telldus-core/client/CMakeLists.txt @@ -24,9 +24,7 @@ SET( telldus-core_PUB_HDRS FIND_PACKAGE(Threads) LIST(APPEND telldus-core_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) -INCLUDE_DIRECTORIES( - ${CMAKE_CURRENT_SOURCE_DIR}/../common -) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}) ######## Configurable options for the platform ######## diff --git a/telldus-core/client/CallbackDispatcher.cpp b/telldus-core/client/CallbackDispatcher.cpp index 664c303a..8f4f0309 100644 --- a/telldus-core/client/CallbackDispatcher.cpp +++ b/telldus-core/client/CallbackDispatcher.cpp @@ -7,7 +7,7 @@ * */ -#include "CallbackDispatcher.h" +#include "client/CallbackDispatcher.h" using namespace TelldusCore; diff --git a/telldus-core/client/CallbackDispatcher.h b/telldus-core/client/CallbackDispatcher.h index 377b9f7a..1d19d7e7 100644 --- a/telldus-core/client/CallbackDispatcher.h +++ b/telldus-core/client/CallbackDispatcher.h @@ -10,11 +10,11 @@ #ifndef CALLBACKDISPATCHER_H #define CALLBACKDISPATCHER_H -#include "common.h" -#include "Event.h" -#include "Thread.h" -#include "Mutex.h" -#include "telldus-core.h" +#include "common/common.h" +#include "common/Event.h" +#include "common/Thread.h" +#include "common/Mutex.h" +#include "client/telldus-core.h" namespace TelldusCore { diff --git a/telldus-core/client/CallbackMainDispatcher.cpp b/telldus-core/client/CallbackMainDispatcher.cpp index fbc09cbd..a4bb67fe 100644 --- a/telldus-core/client/CallbackMainDispatcher.cpp +++ b/telldus-core/client/CallbackMainDispatcher.cpp @@ -7,7 +7,7 @@ * */ -#include "CallbackMainDispatcher.h" +#include "client/CallbackMainDispatcher.h" #include diff --git a/telldus-core/client/CallbackMainDispatcher.h b/telldus-core/client/CallbackMainDispatcher.h index a2d2f1c9..764780e3 100644 --- a/telldus-core/client/CallbackMainDispatcher.h +++ b/telldus-core/client/CallbackMainDispatcher.h @@ -10,10 +10,10 @@ #ifndef CALLBACKMAINDISPATCHER_H #define CALLBACKMAINDISPATCHER_H -#include "CallbackDispatcher.h" -#include "Thread.h" -#include "Event.h" -#include "EventHandler.h" +#include "client/CallbackDispatcher.h" +#include "common/Thread.h" +#include "common/Event.h" +#include "common/EventHandler.h" namespace TelldusCore { diff --git a/telldus-core/client/Client.cpp b/telldus-core/client/Client.cpp index b805bb14..0ace0ba2 100644 --- a/telldus-core/client/Client.cpp +++ b/telldus-core/client/Client.cpp @@ -1,12 +1,13 @@ -#include "Client.h" -#include "CallbackDispatcher.h" -#include "CallbackMainDispatcher.h" -#include "Socket.h" -#include "Strings.h" -#include "Mutex.h" +#include "client/Client.h" #include +#include "client/CallbackDispatcher.h" +#include "client/CallbackMainDispatcher.h" +#include "common/Socket.h" +#include "common/Strings.h" +#include "common/Mutex.h" + using namespace TelldusCore; class Client::PrivateData { diff --git a/telldus-core/client/Client.h b/telldus-core/client/Client.h index 88b2b41d..ab627f24 100644 --- a/telldus-core/client/Client.h +++ b/telldus-core/client/Client.h @@ -1,10 +1,10 @@ #ifndef CLIENT_H #define CLIENT_H -#include "Message.h" -#include "telldus-core.h" -#include "Thread.h" -#include "CallbackDispatcher.h" +#include "client/telldus-core.h" +#include "client/CallbackDispatcher.h" +#include "common/Message.h" +#include "common/Thread.h" namespace TelldusCore { class Client : public Thread diff --git a/telldus-core/client/telldus-core.cpp b/telldus-core/client/telldus-core.cpp index 6ec8ddfb..6ebfcea3 100644 --- a/telldus-core/client/telldus-core.cpp +++ b/telldus-core/client/telldus-core.cpp @@ -4,16 +4,15 @@ * @{ */ -#include "telldus-core.h" -#include "common.h" -#include "Client.h" -#include "Message.h" -#include "Socket.h" #include +#include "client/telldus-core.h" +#include "client/Client.h" +#include "common/common.h" +#include "common/Message.h" +#include "common/Socket.h" using namespace TelldusCore; - /** * @name Device method flags * Flags for the different methods/commands a device can support. Can be used diff --git a/telldus-core/common/CMakeLists.txt b/telldus-core/common/CMakeLists.txt index b55277e4..13aafa87 100644 --- a/telldus-core/common/CMakeLists.txt +++ b/telldus-core/common/CMakeLists.txt @@ -22,6 +22,8 @@ SET( telldus-common_HDRS Thread.h ) +INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ) + ######## Configurable options for the platform ######## diff --git a/telldus-core/common/Event.cpp b/telldus-core/common/Event.cpp index 02ed6b8c..ee369c35 100644 --- a/telldus-core/common/Event.cpp +++ b/telldus-core/common/Event.cpp @@ -1,6 +1,6 @@ -#include "Event.h" -#include "EventHandler.h" -#include "Mutex.h" +#include "common/Event.h" +#include "common/EventHandler.h" +#include "common/Mutex.h" #include diff --git a/telldus-core/common/Event.h b/telldus-core/common/Event.h index ec92c35d..15423507 100644 --- a/telldus-core/common/Event.h +++ b/telldus-core/common/Event.h @@ -11,6 +11,7 @@ #include typedef void* EVENT_T; #endif +#include "common/Thread.h" namespace TelldusCore { class EventHandler; diff --git a/telldus-core/common/EventHandler.h b/telldus-core/common/EventHandler.h index 7123bf90..974c420b 100644 --- a/telldus-core/common/EventHandler.h +++ b/telldus-core/common/EventHandler.h @@ -1,7 +1,7 @@ #ifndef EVENTHANDLER_H #define EVENTHANDLER_H -#include "Event.h" +#include "common/Event.h" namespace TelldusCore { diff --git a/telldus-core/common/EventHandler_unix.cpp b/telldus-core/common/EventHandler_unix.cpp index df36338e..59bf19b2 100644 --- a/telldus-core/common/EventHandler_unix.cpp +++ b/telldus-core/common/EventHandler_unix.cpp @@ -1,10 +1,10 @@ -#include "EventHandler.h" -#include "Event.h" -#include "Mutex.h" -#include "Thread.h" -#include #include #include +#include +#include "common/EventHandler.h" +#include "common/Event.h" +#include "common/Mutex.h" +#include "common/Thread.h" using namespace TelldusCore; diff --git a/telldus-core/common/Event_unix.cpp b/telldus-core/common/Event_unix.cpp index e6a375d7..22d68d80 100644 --- a/telldus-core/common/Event_unix.cpp +++ b/telldus-core/common/Event_unix.cpp @@ -1,6 +1,6 @@ -#include "Event.h" -#include "EventHandler.h" -#include "Thread.h" +#include "common/Event.h" +#include "common/EventHandler.h" +#include "common/Thread.h" using namespace TelldusCore; diff --git a/telldus-core/common/Message.cpp b/telldus-core/common/Message.cpp index efc847ea..6e286835 100644 --- a/telldus-core/common/Message.cpp +++ b/telldus-core/common/Message.cpp @@ -1,9 +1,9 @@ -#include "Message.h" -#include "Socket.h" -#include "Strings.h" -#include #include #include +#include +#include "common/Message.h" +#include "common/Socket.h" +#include "common/Strings.h" using namespace TelldusCore; @@ -63,7 +63,7 @@ void Message::addSpecialArgument(const std::wstring &value){ this->append(st.str()); this->append(L":"); this->append(value); - + } } @@ -77,7 +77,7 @@ void Message::addSpecialArgument(int value){ this->append(L"i"); //this->append(st.str()); this->append(L"s"); - + } } */ @@ -106,7 +106,7 @@ bool Message::nextIsString(const std::wstring &message) { } std::wstring Message::takeString(std::wstring *message) { - + if (!Message::nextIsString(*message)) { return L""; } diff --git a/telldus-core/common/Mutex.cpp b/telldus-core/common/Mutex.cpp index ca90ecfc..5a7b6436 100644 --- a/telldus-core/common/Mutex.cpp +++ b/telldus-core/common/Mutex.cpp @@ -10,8 +10,7 @@ // // -#include "Mutex.h" -#include "common.h" +#include "common/Mutex.h" using namespace TelldusCore; @@ -23,6 +22,8 @@ using namespace TelldusCore; typedef pthread_mutex_t MUTEX_T; #endif +#include "common/common.h" + class Mutex::PrivateData { public: MUTEX_T mutex; diff --git a/telldus-core/common/Socket_unix.cpp b/telldus-core/common/Socket_unix.cpp index 947df5bb..357d7653 100644 --- a/telldus-core/common/Socket_unix.cpp +++ b/telldus-core/common/Socket_unix.cpp @@ -1,7 +1,3 @@ -#include "Socket.h" - -#include "Mutex.h" -#include "Strings.h" #include #include @@ -9,6 +5,10 @@ #include #include +#include "common/Socket.h" +#include "common/Mutex.h" +#include "common/Strings.h" + #define BUFSIZE 512 using namespace TelldusCore; diff --git a/telldus-core/common/Strings.cpp b/telldus-core/common/Strings.cpp index c1f53411..7074762b 100644 --- a/telldus-core/common/Strings.cpp +++ b/telldus-core/common/Strings.cpp @@ -1,5 +1,4 @@ -#include "Strings.h" - +#include "common/Strings.h" #include #include #include diff --git a/telldus-core/common/Thread.cpp b/telldus-core/common/Thread.cpp index 6415c1b2..f4cb6d71 100644 --- a/telldus-core/common/Thread.cpp +++ b/telldus-core/common/Thread.cpp @@ -10,11 +10,11 @@ // // -#include "Thread.h" +#include "common/Thread.h" #ifdef _WINDOWS #include #endif -#include "EventHandler.h" +#include "common/EventHandler.h" using namespace TelldusCore; diff --git a/telldus-core/common/Thread.h b/telldus-core/common/Thread.h index e7bf144e..877468bf 100644 --- a/telldus-core/common/Thread.h +++ b/telldus-core/common/Thread.h @@ -13,7 +13,7 @@ #define THREAD_H #include -#include "Mutex.h" +#include "common/Mutex.h" namespace TelldusCore { class ThreadPrivate; diff --git a/telldus-core/common/common.h b/telldus-core/common/common.h index a223a114..29c391d5 100644 --- a/telldus-core/common/common.h +++ b/telldus-core/common/common.h @@ -22,6 +22,7 @@ #include #include #include +#include "common/Strings.h" inline void msleep( const int msec) { #ifdef _WINDOWS diff --git a/telldus-core/service/CMakeLists.txt b/telldus-core/service/CMakeLists.txt index 97b53857..d0964188 100644 --- a/telldus-core/service/CMakeLists.txt +++ b/telldus-core/service/CMakeLists.txt @@ -88,9 +88,7 @@ SET( telldus-service_HDRS FIND_PACKAGE(Threads REQUIRED) LIST(APPEND telldus-service_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) -INCLUDE_DIRECTORIES( - ${CMAKE_CURRENT_SOURCE_DIR}/../common -) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}) ######## Configurable options for the platform ######## @@ -250,7 +248,7 @@ IF (UNIX AND NOT APPLE) SET(STATE_INSTALL_DIR "${DEFAULT_STATE_INSTALL_DIR}" CACHE PATH "The directory to store state information of the devices") CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/SettingsConfusePaths.h.in - ${CMAKE_CURRENT_BINARY_DIR}/SettingsConfusePaths.h) + ${CMAKE_CURRENT_BINARY_DIR}/service/SettingsConfusePaths.h) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) INSTALL(FILES tellstick.conf diff --git a/telldus-core/service/ClientCommunicationHandler.cpp b/telldus-core/service/ClientCommunicationHandler.cpp index c6de79d0..356854bd 100644 --- a/telldus-core/service/ClientCommunicationHandler.cpp +++ b/telldus-core/service/ClientCommunicationHandler.cpp @@ -1,6 +1,6 @@ #include "ClientCommunicationHandler.h" -#include "Message.h" -#include "Strings.h" +#include "common/Message.h" +#include "common/Strings.h" #include diff --git a/telldus-core/service/ClientCommunicationHandler.h b/telldus-core/service/ClientCommunicationHandler.h index 08c9d421..95fc6574 100644 --- a/telldus-core/service/ClientCommunicationHandler.h +++ b/telldus-core/service/ClientCommunicationHandler.h @@ -2,11 +2,11 @@ #define CLIENTCOMMUNICATIONHANDLER_H #include -#include "Thread.h" -#include "Socket.h" -#include "Event.h" -#include "DeviceManager.h" -#include "ControllerManager.h" +#include "common/Thread.h" +#include "common/Socket.h" +#include "common/Event.h" +#include "service/DeviceManager.h" +#include "service/ControllerManager.h" class ClientCommunicationHandler : public TelldusCore::Thread { diff --git a/telldus-core/service/ConnectionListener.h b/telldus-core/service/ConnectionListener.h index fe84f093..8a79ca16 100644 --- a/telldus-core/service/ConnectionListener.h +++ b/telldus-core/service/ConnectionListener.h @@ -2,8 +2,8 @@ #define CONNECTIONLISTENER_H #include -#include "Thread.h" -#include "Event.h" +#include "common/Thread.h" +#include "common/Event.h" class Event; namespace TelldusCore { diff --git a/telldus-core/service/ConnectionListener_unix.cpp b/telldus-core/service/ConnectionListener_unix.cpp index b1fbe2a4..6780e52e 100644 --- a/telldus-core/service/ConnectionListener_unix.cpp +++ b/telldus-core/service/ConnectionListener_unix.cpp @@ -1,5 +1,5 @@ -#include "ConnectionListener.h" -#include "Socket.h" +#include "service/ConnectionListener.h" +#include "common/Socket.h" #include #include diff --git a/telldus-core/service/Controller.cpp b/telldus-core/service/Controller.cpp index a9f22fc1..4fc27088 100644 --- a/telldus-core/service/Controller.cpp +++ b/telldus-core/service/Controller.cpp @@ -1,7 +1,7 @@ -#include "Controller.h" -#include "Protocol.h" -#include "EventUpdateManager.h" -#include "Strings.h" +#include "service/Controller.h" +#include "service/Protocol.h" +#include "service/EventUpdateManager.h" +#include "common/Strings.h" class Controller::PrivateData { public: diff --git a/telldus-core/service/Controller.h b/telldus-core/service/Controller.h index 410abf53..e873b0e9 100644 --- a/telldus-core/service/Controller.h +++ b/telldus-core/service/Controller.h @@ -1,7 +1,7 @@ #ifndef CONTROLLER_H #define CONTROLLER_H -#include "Event.h" +#include "common/Event.h" #include class ControllerEventData : public TelldusCore::EventDataBase { diff --git a/telldus-core/service/ControllerListener.h b/telldus-core/service/ControllerListener.h index bae13a5e..cbb6f364 100644 --- a/telldus-core/service/ControllerListener.h +++ b/telldus-core/service/ControllerListener.h @@ -1,8 +1,8 @@ #ifndef CONTROLLERLISTENER_H #define CONTROLLERLISTENER_H -#include "Thread.h" -#include "Event.h" +#include "common/Thread.h" +#include "common/Event.h" class ControllerChangeEventData : public TelldusCore::EventDataBase { public: diff --git a/telldus-core/service/ControllerManager.cpp b/telldus-core/service/ControllerManager.cpp index 91aed596..3a992c16 100644 --- a/telldus-core/service/ControllerManager.cpp +++ b/telldus-core/service/ControllerManager.cpp @@ -1,13 +1,13 @@ -#include "ControllerManager.h" -#include "Controller.h" -#include "Mutex.h" -#include "TellStick.h" -#include "Log.h" -#include "Message.h" -#include "Strings.h" -#include "Settings.h" -#include "EventUpdateManager.h" -#include "../client/telldus-core.h" +#include "service/ControllerManager.h" +#include "service/Controller.h" +#include "common/Mutex.h" +#include "service/TellStick.h" +#include "service/Log.h" +#include "common/Message.h" +#include "common/Strings.h" +#include "service/Settings.h" +#include "service/EventUpdateManager.h" +#include "client/telldus-core.h" #include #include diff --git a/telldus-core/service/ControllerManager.h b/telldus-core/service/ControllerManager.h index ccc6dd1e..5276c15c 100644 --- a/telldus-core/service/ControllerManager.h +++ b/telldus-core/service/ControllerManager.h @@ -1,7 +1,7 @@ #ifndef CONTROLLERMANAGER_H #define CONTROLLERMANAGER_H -#include "Event.h" +#include "common/Event.h" class Controller; #include diff --git a/telldus-core/service/ControllerMessage.cpp b/telldus-core/service/ControllerMessage.cpp index aa0135c9..a6bbdb7b 100644 --- a/telldus-core/service/ControllerMessage.cpp +++ b/telldus-core/service/ControllerMessage.cpp @@ -1,8 +1,8 @@ -#include "ControllerMessage.h" -#include "Device.h" -#include "Strings.h" +#include "service/ControllerMessage.h" +#include "service/Device.h" +#include "common/Strings.h" -#include "common.h" +#include "common/common.h" #include diff --git a/telldus-core/service/Device.cpp b/telldus-core/service/Device.cpp index f9757a1c..efad7081 100644 --- a/telldus-core/service/Device.cpp +++ b/telldus-core/service/Device.cpp @@ -1,6 +1,6 @@ -#include "Device.h" -#include "Settings.h" -#include "TellStick.h" +#include "service/Device.h" +#include "service/Settings.h" +#include "service/TellStick.h" class Device::PrivateData { public: diff --git a/telldus-core/service/Device.h b/telldus-core/service/Device.h index 5efb8e06..e97a6604 100644 --- a/telldus-core/service/Device.h +++ b/telldus-core/service/Device.h @@ -1,9 +1,9 @@ #ifndef DEVICE_H #define DEVICE_H -#include "Controller.h" -#include "Mutex.h" -#include "Protocol.h" +#include "service/Controller.h" +#include "common/Mutex.h" +#include "service/Protocol.h" #include #include @@ -34,7 +34,7 @@ public: static int maskUnsupportedMethods(int methods, int supportedMethods); static int methodId( const std::string &methodName ); - + private: Protocol *retrieveProtocol() const; diff --git a/telldus-core/service/DeviceManager.cpp b/telldus-core/service/DeviceManager.cpp index 3c8753e9..afab2e8b 100644 --- a/telldus-core/service/DeviceManager.cpp +++ b/telldus-core/service/DeviceManager.cpp @@ -1,11 +1,11 @@ -#include "DeviceManager.h" -#include "ControllerMessage.h" -#include "Mutex.h" -#include "Sensor.h" -#include "Settings.h" -#include "Strings.h" -#include "Message.h" -#include "Log.h" +#include "service/DeviceManager.h" +#include "service/ControllerMessage.h" +#include "common/Mutex.h" +#include "service/Sensor.h" +#include "service/Settings.h" +#include "common/Strings.h" +#include "common/Message.h" +#include "service/Log.h" #include #include diff --git a/telldus-core/service/DeviceManager.h b/telldus-core/service/DeviceManager.h index b4311761..e3930ad6 100644 --- a/telldus-core/service/DeviceManager.h +++ b/telldus-core/service/DeviceManager.h @@ -1,10 +1,10 @@ #ifndef DEVICEMANAGER_H #define DEVICEMANAGER_H -#include "Device.h" -#include "ControllerManager.h" -#include "ControllerMessage.h" -#include "EventUpdateManager.h" +#include "service/Device.h" +#include "service/ControllerManager.h" +#include "service/ControllerMessage.h" +#include "service/EventUpdateManager.h" #include class Sensor; diff --git a/telldus-core/service/EventUpdateManager.cpp b/telldus-core/service/EventUpdateManager.cpp index 52fef5be..429c1a5e 100644 --- a/telldus-core/service/EventUpdateManager.cpp +++ b/telldus-core/service/EventUpdateManager.cpp @@ -1,9 +1,9 @@ -#include "EventUpdateManager.h" +#include "service/EventUpdateManager.h" -#include "ConnectionListener.h" -#include "EventHandler.h" -#include "Message.h" -#include "Socket.h" +#include "service/ConnectionListener.h" +#include "common/EventHandler.h" +#include "common/Message.h" +#include "common/Socket.h" #include #include diff --git a/telldus-core/service/EventUpdateManager.h b/telldus-core/service/EventUpdateManager.h index 636b067f..4e664ac8 100644 --- a/telldus-core/service/EventUpdateManager.h +++ b/telldus-core/service/EventUpdateManager.h @@ -1,8 +1,8 @@ #ifndef EVENTUPDATEMANAGER_H #define EVENTUPDATEMANAGER_H -#include "Thread.h" -#include "Event.h" +#include "common/Thread.h" +#include "common/Event.h" class EventUpdateData : public TelldusCore::EventDataBase { public: diff --git a/telldus-core/service/Log.cpp b/telldus-core/service/Log.cpp index a4e5cf2f..bf4b15d7 100644 --- a/telldus-core/service/Log.cpp +++ b/telldus-core/service/Log.cpp @@ -1,12 +1,12 @@ -#include "Log.h" +#include "service/Log.h" #include #if defined(_LINUX) #include #elif defined(_WINDOWS) #include -#include "Strings.h" -#include "Messages.h" +#include "service/Strings.h" +#include "service/Messages.h" #endif class Log::PrivateData { diff --git a/telldus-core/service/Protocol.cpp b/telldus-core/service/Protocol.cpp index 67a66e2f..fd6d2cce 100644 --- a/telldus-core/service/Protocol.cpp +++ b/telldus-core/service/Protocol.cpp @@ -1,28 +1,28 @@ -#include "Protocol.h" -#include "../client/telldus-core.h" +#include "service/Protocol.h" +#include "client/telldus-core.h" -#include "ControllerMessage.h" -#include "ProtocolBrateck.h" -#include "ProtocolComen.h" -#include "ProtocolEverflourish.h" -#include "ProtocolFineoffset.h" -#include "ProtocolFuhaote.h" -#include "ProtocolGroup.h" -#include "ProtocolHasta.h" -#include "ProtocolIkea.h" -#include "ProtocolMandolyn.h" -#include "ProtocolNexa.h" -#include "ProtocolOregon.h" -#include "ProtocolRisingSun.h" -#include "ProtocolSartano.h" -#include "ProtocolScene.h" -#include "ProtocolSilvanChip.h" -#include "ProtocolUpm.h" -#include "ProtocolWaveman.h" -#include "ProtocolX10.h" -#include "ProtocolYidong.h" +#include "service/ControllerMessage.h" +#include "service/ProtocolBrateck.h" +#include "service/ProtocolComen.h" +#include "service/ProtocolEverflourish.h" +#include "service/ProtocolFineoffset.h" +#include "service/ProtocolFuhaote.h" +#include "service/ProtocolGroup.h" +#include "service/ProtocolHasta.h" +#include "service/ProtocolIkea.h" +#include "service/ProtocolMandolyn.h" +#include "service/ProtocolNexa.h" +#include "service/ProtocolOregon.h" +#include "service/ProtocolRisingSun.h" +#include "service/ProtocolSartano.h" +#include "service/ProtocolScene.h" +#include "service/ProtocolSilvanChip.h" +#include "service/ProtocolUpm.h" +#include "service/ProtocolWaveman.h" +#include "service/ProtocolX10.h" +#include "service/ProtocolYidong.h" -#include "Strings.h" +#include "common/Strings.h" #include class Protocol::PrivateData { diff --git a/telldus-core/service/Protocol.h b/telldus-core/service/Protocol.h index bfcce857..ca2948b6 100644 --- a/telldus-core/service/Protocol.h +++ b/telldus-core/service/Protocol.h @@ -4,7 +4,7 @@ #include #include #include -#include "../client/telldus-core.h" +#include "client/telldus-core.h" typedef std::map ParameterMap; diff --git a/telldus-core/service/ProtocolBrateck.cpp b/telldus-core/service/ProtocolBrateck.cpp index da9e222e..1c44400a 100644 --- a/telldus-core/service/ProtocolBrateck.cpp +++ b/telldus-core/service/ProtocolBrateck.cpp @@ -1,4 +1,4 @@ -#include "ProtocolBrateck.h" +#include "service/ProtocolBrateck.h" int ProtocolBrateck::methods() const { return TELLSTICK_UP | TELLSTICK_DOWN | TELLSTICK_STOP; diff --git a/telldus-core/service/ProtocolBrateck.h b/telldus-core/service/ProtocolBrateck.h index 97eba44d..da8ed5c0 100644 --- a/telldus-core/service/ProtocolBrateck.h +++ b/telldus-core/service/ProtocolBrateck.h @@ -1,7 +1,7 @@ #ifndef PROTOCOLBRATECK_H #define PROTOCOLBRATECK_H -#include "Protocol.h" +#include "service/Protocol.h" class ProtocolBrateck : public Protocol { diff --git a/telldus-core/service/ProtocolComen.cpp b/telldus-core/service/ProtocolComen.cpp index 9fa36c64..a372e0b8 100644 --- a/telldus-core/service/ProtocolComen.cpp +++ b/telldus-core/service/ProtocolComen.cpp @@ -1,4 +1,4 @@ -#include "ProtocolComen.h" +#include "service/ProtocolComen.h" int ProtocolComen::methods() const { return (TELLSTICK_TURNON | TELLSTICK_TURNOFF); diff --git a/telldus-core/service/ProtocolComen.h b/telldus-core/service/ProtocolComen.h index 35bdab8a..39b4631e 100644 --- a/telldus-core/service/ProtocolComen.h +++ b/telldus-core/service/ProtocolComen.h @@ -1,7 +1,7 @@ #ifndef PROTOCOLCOMEN_H #define PROTOCOLCOMEN_H -#include "ProtocolNexa.h" +#include "service/ProtocolNexa.h" #include class ProtocolComen : public ProtocolNexa { diff --git a/telldus-core/service/ProtocolEverflourish.cpp b/telldus-core/service/ProtocolEverflourish.cpp index 4738bb96..ae7c87e3 100644 --- a/telldus-core/service/ProtocolEverflourish.cpp +++ b/telldus-core/service/ProtocolEverflourish.cpp @@ -1,7 +1,7 @@ #include "ProtocolEverflourish.h" #include #include -#include "ControllerMessage.h" +#include "service/ControllerMessage.h" int ProtocolEverflourish::methods() const { return TELLSTICK_TURNON | TELLSTICK_TURNOFF | TELLSTICK_LEARN; @@ -21,7 +21,7 @@ std::string ProtocolEverflourish::getStringForMethod(int method, unsigned char, } else { return ""; } - + const char ssss = 85; const char sssl = 84; // 0 const char slss = 69; // 1 @@ -32,7 +32,7 @@ std::string ProtocolEverflourish::getStringForMethod(int method, unsigned char, std::string strCode; deviceCode = (deviceCode << 2) | intCode; - + check = calculateChecksum(deviceCode); char preamble[] = {'R', 5, 'T', 114,60,1,1,105,ssss,ssss,0}; @@ -47,7 +47,7 @@ std::string ProtocolEverflourish::getStringForMethod(int method, unsigned char, for(i=3;i>=0;i--) { strCode.append(1, bits[(action>>i)&0x01]); } - + strCode.append(1, ssss); strCode.append(1, '+'); @@ -84,7 +84,7 @@ unsigned int ProtocolEverflourish::calculateChecksum(unsigned int x) { bit = bit << 1; } - return res; + return res; } std::string ProtocolEverflourish::decodeData(ControllerMessage &dataMsg) @@ -94,23 +94,23 @@ std::string ProtocolEverflourish::decodeData(ControllerMessage &dataMsg) unsigned int house = 0; unsigned int unit = 0; unsigned int method = 0; - + sscanf(data.c_str(), "%X", &allData); - + house = allData & 0xFFFC00; house >>= 10; - + unit = allData & 0x300; unit >>= 8; unit++; //unit from 1 to 4 - + method = allData & 0xF; - + if(house < 0 || house > 16383 || unit < 1 || unit > 4){ //not everflourish return ""; } - + std::stringstream retString; retString << "class:command;protocol:everflourish;model:selflearning;house:" << house << ";unit:" << unit << ";method:"; if(method == 0){ @@ -126,6 +126,6 @@ std::string ProtocolEverflourish::decodeData(ControllerMessage &dataMsg) //not everflourish return ""; } - + return retString.str(); -} \ No newline at end of file +} diff --git a/telldus-core/service/ProtocolEverflourish.h b/telldus-core/service/ProtocolEverflourish.h index 28d783eb..6dbffdaf 100644 --- a/telldus-core/service/ProtocolEverflourish.h +++ b/telldus-core/service/ProtocolEverflourish.h @@ -1,8 +1,8 @@ #ifndef PROTOCOLEVERFLOURISH_H #define PROTOCOLEVERFLOURISH_H -#include "ControllerMessage.h" -#include "Protocol.h" +#include "service/Protocol.h" +#include "service/ControllerMessage.h" class ProtocolEverflourish : public Protocol { diff --git a/telldus-core/service/ProtocolFineoffset.cpp b/telldus-core/service/ProtocolFineoffset.cpp index 3e4b444b..1fb94a19 100644 --- a/telldus-core/service/ProtocolFineoffset.cpp +++ b/telldus-core/service/ProtocolFineoffset.cpp @@ -1,5 +1,5 @@ -#include "ProtocolFineoffset.h" -#include "Strings.h" +#include "service/ProtocolFineoffset.h" +#include "common/Strings.h" #include #include #include diff --git a/telldus-core/service/ProtocolFineoffset.h b/telldus-core/service/ProtocolFineoffset.h index fbae92c0..dba7946a 100644 --- a/telldus-core/service/ProtocolFineoffset.h +++ b/telldus-core/service/ProtocolFineoffset.h @@ -1,8 +1,8 @@ #ifndef PROTOCOLFINEOFFSET_H #define PROTOCOLFINEOFFSET_H -#include "ControllerMessage.h" -#include "Protocol.h" +#include "service/Protocol.h" +#include "service/ControllerMessage.h" class ProtocolFineoffset : public Protocol { diff --git a/telldus-core/service/ProtocolFuhaote.cpp b/telldus-core/service/ProtocolFuhaote.cpp index 7baa2a30..357f1fe7 100644 --- a/telldus-core/service/ProtocolFuhaote.cpp +++ b/telldus-core/service/ProtocolFuhaote.cpp @@ -1,4 +1,4 @@ -#include "ProtocolFuhaote.h" +#include "service/ProtocolFuhaote.h" int ProtocolFuhaote::methods() const { return TELLSTICK_TURNON | TELLSTICK_TURNOFF; diff --git a/telldus-core/service/ProtocolFuhaote.h b/telldus-core/service/ProtocolFuhaote.h index 3b89d06c..a68c7f70 100644 --- a/telldus-core/service/ProtocolFuhaote.h +++ b/telldus-core/service/ProtocolFuhaote.h @@ -1,7 +1,7 @@ #ifndef PROTOCOLFUHAOTE_H #define PROTOCOLFUHAOTE_H -#include "Protocol.h" +#include "service/Protocol.h" class ProtocolFuhaote : public Protocol { diff --git a/telldus-core/service/ProtocolGroup.cpp b/telldus-core/service/ProtocolGroup.cpp index 3d553022..aaaaeb04 100644 --- a/telldus-core/service/ProtocolGroup.cpp +++ b/telldus-core/service/ProtocolGroup.cpp @@ -1,4 +1,4 @@ -#include "ProtocolGroup.h" +#include "service/ProtocolGroup.h" int ProtocolGroup::methods() const { return TELLSTICK_TURNON | TELLSTICK_TURNOFF | TELLSTICK_DIM | TELLSTICK_BELL | TELLSTICK_LEARN | TELLSTICK_EXECUTE | TELLSTICK_TOGGLE | TELLSTICK_UP | TELLSTICK_DOWN | TELLSTICK_STOP; diff --git a/telldus-core/service/ProtocolGroup.h b/telldus-core/service/ProtocolGroup.h index c98a14c3..f9689c02 100644 --- a/telldus-core/service/ProtocolGroup.h +++ b/telldus-core/service/ProtocolGroup.h @@ -1,7 +1,7 @@ #ifndef PROTOCOLGROUP_H #define PROTOCOLGROUP_H -#include "Protocol.h" +#include "service/Protocol.h" class ProtocolGroup : public Protocol { public: diff --git a/telldus-core/service/ProtocolHasta.cpp b/telldus-core/service/ProtocolHasta.cpp index 5aaa35e4..8166c8a5 100644 --- a/telldus-core/service/ProtocolHasta.cpp +++ b/telldus-core/service/ProtocolHasta.cpp @@ -1,4 +1,4 @@ -#include "ProtocolHasta.h" +#include "service/ProtocolHasta.h" #include #include @@ -63,4 +63,4 @@ std::string ProtocolHasta::convertByte(unsigned char byte) { byte >>= 1; } return retval; -} \ No newline at end of file +} diff --git a/telldus-core/service/ProtocolHasta.h b/telldus-core/service/ProtocolHasta.h index 971f0762..d13555be 100644 --- a/telldus-core/service/ProtocolHasta.h +++ b/telldus-core/service/ProtocolHasta.h @@ -1,7 +1,7 @@ #ifndef PROTOCOLHASTA_H #define PROTOCOLHASTA_H -#include "Protocol.h" +#include "service/Protocol.h" class ProtocolHasta : public Protocol { diff --git a/telldus-core/service/ProtocolIkea.cpp b/telldus-core/service/ProtocolIkea.cpp index bed01926..3c65e63b 100644 --- a/telldus-core/service/ProtocolIkea.cpp +++ b/telldus-core/service/ProtocolIkea.cpp @@ -1,5 +1,5 @@ -#include "ProtocolIkea.h" -#include "Strings.h" +#include "service/ProtocolIkea.h" +#include "common/Strings.h" #include #include diff --git a/telldus-core/service/ProtocolIkea.h b/telldus-core/service/ProtocolIkea.h index 81327d8e..07cd294a 100644 --- a/telldus-core/service/ProtocolIkea.h +++ b/telldus-core/service/ProtocolIkea.h @@ -1,7 +1,7 @@ #ifndef PROTOCOLIKEA_H #define PROTOCOLIKEA_H -#include "Protocol.h" +#include "service/Protocol.h" class ProtocolIkea : public Protocol { diff --git a/telldus-core/service/ProtocolMandolyn.cpp b/telldus-core/service/ProtocolMandolyn.cpp index 8468adf6..a93864d1 100644 --- a/telldus-core/service/ProtocolMandolyn.cpp +++ b/telldus-core/service/ProtocolMandolyn.cpp @@ -1,5 +1,5 @@ -#include "ProtocolMandolyn.h" -#include "Strings.h" +#include "service/ProtocolMandolyn.h" +#include "common/Strings.h" #include #include #include diff --git a/telldus-core/service/ProtocolMandolyn.h b/telldus-core/service/ProtocolMandolyn.h index a3ff0700..08ead0eb 100644 --- a/telldus-core/service/ProtocolMandolyn.h +++ b/telldus-core/service/ProtocolMandolyn.h @@ -1,8 +1,8 @@ #ifndef PROTOCOLMANDOLYN_H #define PROTOCOLMANDOLYN_H -#include "ControllerMessage.h" -#include "Protocol.h" +#include "service/Protocol.h" +#include "service/ControllerMessage.h" class ProtocolMandolyn : public Protocol { diff --git a/telldus-core/service/ProtocolNexa.cpp b/telldus-core/service/ProtocolNexa.cpp index 7faea29e..9b43a7c7 100644 --- a/telldus-core/service/ProtocolNexa.cpp +++ b/telldus-core/service/ProtocolNexa.cpp @@ -1,8 +1,8 @@ -#include "ProtocolNexa.h" -#include +#include "service/ProtocolNexa.h" #include -#include "TellStick.h" -#include "Strings.h" +#include +#include "service/TellStick.h" +#include "common/Strings.h" int ProtocolNexa::lastArctecCodeSwitchWasTurnOff=0; //TODO, always removing first turnon now, make more flexible (waveman too) @@ -160,12 +160,12 @@ std::string ProtocolNexa::getStringSelflearningForCode(int intHouse, int intCode std::string ProtocolNexa::decodeData(ControllerMessage& dataMsg) { unsigned long allData = 0; - + sscanf(dataMsg.getParameter("data").c_str(), "%lx", &allData); - + if(TelldusCore::comparei(dataMsg.model(), L"selflearning")){ //selflearning - return decodeDataSelfLearning(allData); + return decodeDataSelfLearning(allData); } else{ //codeswitch @@ -178,24 +178,24 @@ std::string ProtocolNexa::decodeDataSelfLearning(long allData){ unsigned int unit = 0; unsigned int group = 0; unsigned int method = 0; - + house = allData & 0xFFFFFFC0; house >>= 6; - + group = allData & 0x20; group >>= 5; - + method = allData & 0x10; method >>= 4; - + unit = allData & 0xF; unit++; - + if(house < 1 || house > 67108863 || unit < 1 || unit > 16){ //not arctech selflearning return ""; } - + std::stringstream retString; retString << "class:command;protocol:arctech;model:selflearning;house:" << house << ";unit:" << unit << ";group:" << group << ";method:"; if(method == 1){ @@ -208,45 +208,45 @@ std::string ProtocolNexa::decodeDataSelfLearning(long allData){ //not arctech selflearning return ""; } - + return retString.str(); } std::string ProtocolNexa::decodeDataCodeSwitch(long allData){ - + unsigned int house = 0; unsigned int unit = 0; unsigned int method = 0; - + method = allData & 0xF00; method >>= 8; - + unit = allData & 0xF0; unit >>= 4; unit++; - + house = allData & 0xF; - + if(house < 0 || house > 16 || unit < 1 || unit > 16){ //not arctech codeswitch return ""; } - + house = house + 'A'; //house from A to P - + if(method != 6 && lastArctecCodeSwitchWasTurnOff == 1){ lastArctecCodeSwitchWasTurnOff = 0; return ""; //probably a stray turnon or bell (perhaps: only certain time interval since last, check that it's the same house/unit... Will lose - //one turnon/bell, but it's better than the alternative... + //one turnon/bell, but it's better than the alternative... } - + if(method == 6){ lastArctecCodeSwitchWasTurnOff = 1; } - + std::stringstream retString; retString << "class:command;protocol:arctech;model:codeswitch;house:" << char(house); - + if(method == 6){ retString << ";unit:" << unit << ";method:turnoff;"; } @@ -260,7 +260,7 @@ std::string ProtocolNexa::decodeDataCodeSwitch(long allData){ //not arctech codeswitch return ""; } - + return retString.str(); } diff --git a/telldus-core/service/ProtocolNexa.h b/telldus-core/service/ProtocolNexa.h index 90cf06db..ac6b8906 100644 --- a/telldus-core/service/ProtocolNexa.h +++ b/telldus-core/service/ProtocolNexa.h @@ -1,8 +1,8 @@ #ifndef PROTOCOLNEXA_H #define PROTOCOLNEXA_H -#include "ControllerMessage.h" -#include "Device.h" +#include "service/ControllerMessage.h" +#include "service/Device.h" #include class ProtocolNexa : public Protocol { diff --git a/telldus-core/service/ProtocolOregon.cpp b/telldus-core/service/ProtocolOregon.cpp index a22d2942..30f7ad86 100644 --- a/telldus-core/service/ProtocolOregon.cpp +++ b/telldus-core/service/ProtocolOregon.cpp @@ -1,5 +1,5 @@ -#include "ProtocolOregon.h" -#include "Strings.h" +#include "service/ProtocolOregon.h" +#include "common/Strings.h" #include #include #include @@ -20,7 +20,7 @@ std::string ProtocolOregon::decodeData(ControllerMessage &dataMsg) std::string ProtocolOregon::decodeEA4C(const std::string &data) { uint64_t value = TelldusCore::hexTo64l(data); - + uint8_t checksum = 0xE + 0xA + 0x4 + 0xC; checksum -= (value & 0xF) * 0x10; checksum -= 0xA; diff --git a/telldus-core/service/ProtocolOregon.h b/telldus-core/service/ProtocolOregon.h index 8d8c3c8f..1210430c 100644 --- a/telldus-core/service/ProtocolOregon.h +++ b/telldus-core/service/ProtocolOregon.h @@ -1,8 +1,8 @@ #ifndef PROTOCOLOREGON_H #define PROTOCOLOREGON_H -#include "ControllerMessage.h" -#include "Protocol.h" +#include "service/Protocol.h" +#include "service/ControllerMessage.h" class ProtocolOregon : public Protocol { diff --git a/telldus-core/service/ProtocolRisingSun.cpp b/telldus-core/service/ProtocolRisingSun.cpp index 192c900d..b1cde0e7 100644 --- a/telldus-core/service/ProtocolRisingSun.cpp +++ b/telldus-core/service/ProtocolRisingSun.cpp @@ -1,5 +1,5 @@ -#include "ProtocolRisingSun.h" -#include "Strings.h" +#include "service/ProtocolRisingSun.h" +#include "common/Strings.h" int ProtocolRisingSun::methods() const { if (TelldusCore::comparei(model(), L"selflearning")) { diff --git a/telldus-core/service/ProtocolRisingSun.h b/telldus-core/service/ProtocolRisingSun.h index 1d338fc3..f2775ac2 100644 --- a/telldus-core/service/ProtocolRisingSun.h +++ b/telldus-core/service/ProtocolRisingSun.h @@ -1,7 +1,7 @@ #ifndef PROTOCOLRISINGSUN_H #define PROTOCOLRISINGSUN_H -#include "Protocol.h" +#include "service/Protocol.h" class ProtocolRisingSun : public Protocol { diff --git a/telldus-core/service/ProtocolSartano.cpp b/telldus-core/service/ProtocolSartano.cpp index b0456825..4fb92ea9 100644 --- a/telldus-core/service/ProtocolSartano.cpp +++ b/telldus-core/service/ProtocolSartano.cpp @@ -1,4 +1,4 @@ -#include "ProtocolSartano.h" +#include "service/ProtocolSartano.h" #include #include @@ -44,9 +44,9 @@ std::string ProtocolSartano::decodeData(ControllerMessage &dataMsg) unsigned int method1 = 0; unsigned int method2 = 0; unsigned int method = 0; - + sscanf(data.c_str(), "%X", &allDataIn); - + unsigned long mask = (1<<11); for(int i=0;i<12;++i){ allData >>= 1; @@ -55,15 +55,15 @@ std::string ProtocolSartano::decodeData(ControllerMessage &dataMsg) } mask >>= 1; } - + code = allData & 0xFFC; code >>= 2; - + method1 = allData & 0x2; method1 >>= 1; - + method2 = allData & 0x1; - + if(method1 == 0 && method2 == 1){ method = 0; //off } @@ -73,12 +73,12 @@ std::string ProtocolSartano::decodeData(ControllerMessage &dataMsg) else{ return ""; } - + if(code < 0 || code > 1023){ //not sartano return ""; } - + std::stringstream retString; retString << "class:command;protocol:sartano;model:codeswitch;code:"; mask = (1<<9); @@ -92,13 +92,13 @@ std::string ProtocolSartano::decodeData(ControllerMessage &dataMsg) mask >>= 1; } retString << ";method:"; - + if(method == 0){ retString << "turnoff;"; } else{ retString << "turnon;"; } - + return retString.str(); } diff --git a/telldus-core/service/ProtocolSartano.h b/telldus-core/service/ProtocolSartano.h index 6c38a263..0f555442 100644 --- a/telldus-core/service/ProtocolSartano.h +++ b/telldus-core/service/ProtocolSartano.h @@ -1,8 +1,8 @@ #ifndef PROTOCOLSARTANO_H #define PROTOCOLSARTANO_H -#include "ControllerMessage.h" -#include "Protocol.h" +#include "service/Protocol.h" +#include "service/ControllerMessage.h" class ProtocolSartano : public Protocol { diff --git a/telldus-core/service/ProtocolScene.cpp b/telldus-core/service/ProtocolScene.cpp index e18e362a..f30f702b 100644 --- a/telldus-core/service/ProtocolScene.cpp +++ b/telldus-core/service/ProtocolScene.cpp @@ -1,4 +1,4 @@ -#include "ProtocolScene.h" +#include "service/ProtocolScene.h" int ProtocolScene::methods() const { return TELLSTICK_EXECUTE; diff --git a/telldus-core/service/ProtocolScene.h b/telldus-core/service/ProtocolScene.h index aaa22ebb..2a4979c1 100644 --- a/telldus-core/service/ProtocolScene.h +++ b/telldus-core/service/ProtocolScene.h @@ -1,7 +1,7 @@ #ifndef PROTOCOLSCENE_H #define PROTOCOLSCENE_H -#include "Protocol.h" +#include "service/Protocol.h" class ProtocolScene : public Protocol { public: diff --git a/telldus-core/service/ProtocolSilvanChip.cpp b/telldus-core/service/ProtocolSilvanChip.cpp index 23226e69..b08cd294 100644 --- a/telldus-core/service/ProtocolSilvanChip.cpp +++ b/telldus-core/service/ProtocolSilvanChip.cpp @@ -1,5 +1,5 @@ -#include "ProtocolSilvanChip.h" -#include "Strings.h" +#include "service/ProtocolSilvanChip.h" +#include "common/Strings.h" int ProtocolSilvanChip::methods() const { if (TelldusCore::comparei(model(), L"kp100")) { diff --git a/telldus-core/service/ProtocolSilvanChip.h b/telldus-core/service/ProtocolSilvanChip.h index c27dcc52..ba55cb25 100644 --- a/telldus-core/service/ProtocolSilvanChip.h +++ b/telldus-core/service/ProtocolSilvanChip.h @@ -1,7 +1,7 @@ #ifndef PROTOCOLSILVANCHIP_H #define PROTOCOLSILVANCHIP_H -#include "Protocol.h" +#include "service/Protocol.h" class ProtocolSilvanChip : public Protocol { diff --git a/telldus-core/service/ProtocolUpm.cpp b/telldus-core/service/ProtocolUpm.cpp index 65bf7b28..58406e80 100644 --- a/telldus-core/service/ProtocolUpm.cpp +++ b/telldus-core/service/ProtocolUpm.cpp @@ -1,4 +1,4 @@ -#include "ProtocolUpm.h" +#include "service/ProtocolUpm.h" int ProtocolUpm::methods() const { return TELLSTICK_TURNON | TELLSTICK_TURNOFF | TELLSTICK_LEARN; diff --git a/telldus-core/service/ProtocolUpm.h b/telldus-core/service/ProtocolUpm.h index 1f91dafe..74724f24 100644 --- a/telldus-core/service/ProtocolUpm.h +++ b/telldus-core/service/ProtocolUpm.h @@ -1,7 +1,7 @@ #ifndef PROTOCOLUPM_H #define PROTOCOLUPM_H -#include "Protocol.h" +#include "service/Protocol.h" class ProtocolUpm : public Protocol { diff --git a/telldus-core/service/ProtocolWaveman.cpp b/telldus-core/service/ProtocolWaveman.cpp index 14ddb65b..7adfe3ef 100644 --- a/telldus-core/service/ProtocolWaveman.cpp +++ b/telldus-core/service/ProtocolWaveman.cpp @@ -1,4 +1,4 @@ -#include "ProtocolWaveman.h" +#include "service/ProtocolWaveman.h" #include #include @@ -22,38 +22,38 @@ std::string ProtocolWaveman::decodeData(ControllerMessage& dataMsg) unsigned int house = 0; unsigned int unit = 0; unsigned int method = 0; - + sscanf(dataMsg.getParameter("data").c_str(), "%lx", &allData); - + method = allData & 0xF00; method >>= 8; - + unit = allData & 0xF0; unit >>= 4; unit++; - + house = allData & 0xF; - + if(house < 0 || house > 16 || unit < 1 || unit > 16){ //not waveman return ""; } - + house = house + 'A'; //house from A to P - + if(method != 6 && lastArctecCodeSwitchWasTurnOff == 1){ lastArctecCodeSwitchWasTurnOff = 0; return ""; //probably a stray turnon or bell (perhaps: only certain time interval since last, check that it's the same house/unit... Will lose - //one turnon/bell, but it's better than the alternative... + //one turnon/bell, but it's better than the alternative... } - + if(method == 6){ lastArctecCodeSwitchWasTurnOff = 1; } - + std::stringstream retString; retString << "class:command;protocol:waveman;model:codeswitch;house:" << char(house); - + if(method == 0){ retString << ";unit:" << unit << ";method:turnoff;"; } @@ -64,6 +64,6 @@ std::string ProtocolWaveman::decodeData(ControllerMessage& dataMsg) //not waveman return ""; } - + return retString.str(); } diff --git a/telldus-core/service/ProtocolWaveman.h b/telldus-core/service/ProtocolWaveman.h index 69b26333..76453643 100644 --- a/telldus-core/service/ProtocolWaveman.h +++ b/telldus-core/service/ProtocolWaveman.h @@ -1,7 +1,7 @@ #ifndef PROTOCOLWAVEMAN_H #define PROTOCOLWAVEMAN_H -#include "ProtocolNexa.h" +#include "service/ProtocolNexa.h" class ProtocolWaveman : public ProtocolNexa { public: diff --git a/telldus-core/service/ProtocolX10.cpp b/telldus-core/service/ProtocolX10.cpp index ad9bcb55..c0dc108f 100644 --- a/telldus-core/service/ProtocolX10.cpp +++ b/telldus-core/service/ProtocolX10.cpp @@ -1,4 +1,4 @@ -#include "ProtocolX10.h" +#include "service/ProtocolX10.h" #include #include diff --git a/telldus-core/service/ProtocolX10.h b/telldus-core/service/ProtocolX10.h index 8e53095e..0df0067d 100644 --- a/telldus-core/service/ProtocolX10.h +++ b/telldus-core/service/ProtocolX10.h @@ -1,8 +1,8 @@ #ifndef PROTOCOLX10_H #define PROTOCOLX10_H -#include "Protocol.h" -#include "ControllerMessage.h" +#include "service/Protocol.h" +#include "service/ControllerMessage.h" class ProtocolX10 : public Protocol { diff --git a/telldus-core/service/ProtocolYidong.cpp b/telldus-core/service/ProtocolYidong.cpp index e0310d08..94487028 100644 --- a/telldus-core/service/ProtocolYidong.cpp +++ b/telldus-core/service/ProtocolYidong.cpp @@ -1,4 +1,4 @@ -#include "ProtocolYidong.h" +#include "service/ProtocolYidong.h" std::string ProtocolYidong::getStringForMethod(int method, unsigned char, Controller *) { int intCode = this->getIntParameter(L"unit", 1, 4); diff --git a/telldus-core/service/ProtocolYidong.h b/telldus-core/service/ProtocolYidong.h index 580d250f..df64e6a4 100644 --- a/telldus-core/service/ProtocolYidong.h +++ b/telldus-core/service/ProtocolYidong.h @@ -1,7 +1,7 @@ #ifndef PROTOCOLYIDONG_H #define PROTOCOLYIDONG_H -#include "ProtocolSartano.h" +#include "service/ProtocolSartano.h" class ProtocolYidong : public ProtocolSartano { diff --git a/telldus-core/service/Sensor.cpp b/telldus-core/service/Sensor.cpp index 649a576a..af9bbb07 100644 --- a/telldus-core/service/Sensor.cpp +++ b/telldus-core/service/Sensor.cpp @@ -1,6 +1,6 @@ -#include "Sensor.h" -#include "common.h" -#include "../client/telldus-core.h" +#include "service/Sensor.h" +#include "common/common.h" +#include "client/telldus-core.h" #include class Sensor::PrivateData { diff --git a/telldus-core/service/Sensor.h b/telldus-core/service/Sensor.h index 83fcf57d..61eb9cee 100644 --- a/telldus-core/service/Sensor.h +++ b/telldus-core/service/Sensor.h @@ -1,7 +1,7 @@ #ifndef SENSOR_H #define SENSOR_H -#include "Mutex.h" +#include "common/Mutex.h" #include class Sensor : public TelldusCore::Mutex diff --git a/telldus-core/service/Settings.cpp b/telldus-core/service/Settings.cpp index 541ec8c7..86170231 100644 --- a/telldus-core/service/Settings.cpp +++ b/telldus-core/service/Settings.cpp @@ -1,4 +1,4 @@ -#include "Settings.h" +#include "service/Settings.h" TelldusCore::Mutex Settings::mutex; diff --git a/telldus-core/service/Settings.h b/telldus-core/service/Settings.h index d4a6bfc1..7863c643 100644 --- a/telldus-core/service/Settings.h +++ b/telldus-core/service/Settings.h @@ -2,7 +2,7 @@ #define SETTINGS_H #include -#include "Mutex.h" +#include "common/Mutex.h" class Settings { public: diff --git a/telldus-core/service/SettingsConfuse.cpp b/telldus-core/service/SettingsConfuse.cpp index 0948793a..c421be31 100644 --- a/telldus-core/service/SettingsConfuse.cpp +++ b/telldus-core/service/SettingsConfuse.cpp @@ -10,9 +10,11 @@ // // #include "Settings.h" -#include "SettingsConfusePaths.h" -#include "../client/telldus-core.h" -#include "Strings.h" +#include "client/telldus-core.h" +#include "service/Settings.h" +#include "service/SettingsConfusePaths.h" +#include "client/telldus-core.h" +#include "common/Strings.h" #include #include #include diff --git a/telldus-core/service/TellStick.cpp b/telldus-core/service/TellStick.cpp index b77f512f..d0ad01df 100644 --- a/telldus-core/service/TellStick.cpp +++ b/telldus-core/service/TellStick.cpp @@ -9,7 +9,7 @@ // Copyright: See COPYING file that comes with this distribution // // -#include "TellStick.h" +#include "service/TellStick.h" #include #include diff --git a/telldus-core/service/TellStick.h b/telldus-core/service/TellStick.h index 05e76b04..246feb1f 100644 --- a/telldus-core/service/TellStick.h +++ b/telldus-core/service/TellStick.h @@ -12,9 +12,9 @@ #ifndef TELLSTICK_H #define TELLSTICK_H -#include "Controller.h" -#include "Thread.h" #include +#include "service/Controller.h" +#include "common/Thread.h" class TellStickDescriptor { public: diff --git a/telldus-core/service/TellStick_libftdi.cpp b/telldus-core/service/TellStick_libftdi.cpp index 9f8a919c..6e805bb6 100644 --- a/telldus-core/service/TellStick_libftdi.cpp +++ b/telldus-core/service/TellStick_libftdi.cpp @@ -9,19 +9,19 @@ // Copyright: See COPYING file that comes with this distribution // // -#include "TellStick.h" -#include "../client/telldus-core.h" +#include "service/TellStick.h" +#include "client/telldus-core.h" #include #include #include #include -#include "Thread.h" -#include "Mutex.h" -#include "Log.h" -#include "Settings.h" -#include "Strings.h" -#include "common.h" +#include "service/Log.h" +#include "service/Settings.h" +#include "common/Thread.h" +#include "common/Mutex.h" +#include "common/Strings.h" +#include "common/common.h" #include diff --git a/telldus-core/service/TelldusMain.cpp b/telldus-core/service/TelldusMain.cpp index a45f9899..a1f59fa7 100644 --- a/telldus-core/service/TelldusMain.cpp +++ b/telldus-core/service/TelldusMain.cpp @@ -1,13 +1,13 @@ -#include "TelldusMain.h" -#include "ConnectionListener.h" -#include "EventHandler.h" -#include "ClientCommunicationHandler.h" -#include "DeviceManager.h" -#include "ControllerManager.h" -#include "ControllerListener.h" -#include "EventUpdateManager.h" -#include "Timer.h" -#include "Log.h" +#include "service/TelldusMain.h" +#include "service/ConnectionListener.h" +#include "common/EventHandler.h" +#include "service/ClientCommunicationHandler.h" +#include "service/DeviceManager.h" +#include "service/ControllerManager.h" +#include "service/ControllerListener.h" +#include "service/EventUpdateManager.h" +#include "service/Timer.h" +#include "service/Log.h" #include #include diff --git a/telldus-core/service/Timer.cpp b/telldus-core/service/Timer.cpp index 567befb0..070bcc29 100644 --- a/telldus-core/service/Timer.cpp +++ b/telldus-core/service/Timer.cpp @@ -1,5 +1,5 @@ -#include "Timer.h" -#include "Mutex.h" +#include "service/Timer.h" +#include "common/Mutex.h" #ifdef _WINDOWS #else #include diff --git a/telldus-core/service/Timer.h b/telldus-core/service/Timer.h index fcb15356..cc08381c 100644 --- a/telldus-core/service/Timer.h +++ b/telldus-core/service/Timer.h @@ -1,8 +1,8 @@ #ifndef TIMER_H #define TIMER_H -#include "Event.h" -#include "Thread.h" +#include "common/Event.h" +#include "common/Thread.h" class Timer : public TelldusCore::Thread { public: diff --git a/telldus-core/service/main_unix.cpp b/telldus-core/service/main_unix.cpp index dd0c3659..ef287b62 100644 --- a/telldus-core/service/main_unix.cpp +++ b/telldus-core/service/main_unix.cpp @@ -1,4 +1,4 @@ -#include "TelldusMain.h" +#include "service/TelldusMain.h" #include #include #include @@ -9,9 +9,9 @@ #include #include -#include "Settings.h" -#include "Strings.h" -#include "Log.h" +#include "service/Settings.h" +#include "common/Strings.h" +#include "service/Log.h" #define DAEMON_NAME "telldusd" #define PID_FILE "/var/run/" DAEMON_NAME ".pid"