Fix include header order according to Google style guidelines "build/include_order"

This commit is contained in:
Micke Prag 2012-06-19 11:57:22 +02:00
parent 75f21588e5
commit 3a0cee353a
37 changed files with 97 additions and 85 deletions

View file

@ -5,10 +5,10 @@
//
//
#include "common/Event.h"
#include <list>
#include "common/EventHandler.h"
#include "common/Mutex.h"
#include <list>
using namespace TelldusCore;

View file

@ -7,15 +7,14 @@
#ifndef TELLDUS_CORE_COMMON_EVENT_H_
#define TELLDUS_CORE_COMMON_EVENT_H_
#include "Thread.h"
#ifdef _WINDOWS
#include <windows.h>
#include <memory>
typedef HANDLE EVENT_T;
#else
#include <tr1/memory>
#ifndef _WINDOWS
#include <tr1/memory>
typedef void* EVENT_T;
#else
#include <windows.h>
#include <memory>
typedef HANDLE EVENT_T;
#endif
#include "common/Thread.h"

View file

@ -4,16 +4,15 @@
// Copyright: See COPYING file that comes with this distribution
//
//
#include "common/Message.h"
#include <wctype.h>
#include <stdlib.h>
#include <sstream>
#include "common/Message.h"
#include "common/Socket.h"
#include "common/Strings.h"
using namespace TelldusCore;
Message::Message()
: std::wstring() {
}

View file

@ -7,8 +7,6 @@
#ifndef TELLDUS_CORE_COMMON_SOCKET_H_
#define TELLDUS_CORE_COMMON_SOCKET_H_
#include <string>
#ifdef _WINDOWS
#include <windows.h>
typedef HANDLE SOCKET_T;
@ -16,6 +14,8 @@
typedef int SOCKET_T;
#endif
#include <string>
namespace TelldusCore {
class Socket {
public:

View file

@ -6,9 +6,6 @@
//
#include "common/Strings.h"
#include <algorithm>
#include <sstream>
#include <string>
#include <string.h>
#include <stdio.h>
@ -17,6 +14,10 @@
#else
#include <iconv.h>
#endif
#include <algorithm>
#include <sstream>
#include <string>
#ifdef _MACOSX
#define WCHAR_T_ENCODING "UCS-4-INTERNAL"

View file

@ -7,7 +7,6 @@
#ifndef TELLDUS_CORE_COMMON_STRINGS_H_
#define TELLDUS_CORE_COMMON_STRINGS_H_
#include <string>
#include <stdarg.h>
#ifdef _MSC_VER
typedef unsigned __int8 uint8_t;
@ -17,6 +16,7 @@ typedef unsigned __int64 uint64_t;
#else
#include <stdint.h>
#endif
#include <string>
namespace TelldusCore {
std::wstring charToWstring(const char *value);

View file

@ -16,12 +16,11 @@
#else
#include <unistd.h>
#endif
#include "Strings.h"
#include <fstream>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <fstream>
#include <string>
#include <stdarg.h>
#include "common/Strings.h"
inline void msleep( const int msec) {

View file

@ -4,13 +4,14 @@
// Copyright: See COPYING file that comes with this distribution
//
//
#include "ClientCommunicationHandler.h"
#include "common/Message.h"
#include "common/Strings.h"
#include "service/ClientCommunicationHandler.h"
#include <stdlib.h>
#include <string>
#include "common/Message.h"
#include "common/Strings.h"
class ClientCommunicationHandler::PrivateData {
public:
TelldusCore::Socket *clientSocket;

View file

@ -4,19 +4,17 @@
// Copyright: See COPYING file that comes with this distribution
//
//
#include "service/ConnectionListener.h"
#include "common/Socket.h"
#include <string>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <string>
#include "service/ConnectionListener.h"
#include "common/Socket.h"
class ConnectionListener::PrivateData {
public:

View file

@ -7,8 +7,8 @@
#ifndef TELLDUS_CORE_SERVICE_CONTROLLER_H_
#define TELLDUS_CORE_SERVICE_CONTROLLER_H_
#include "common/Event.h"
#include <string>
#include "common/Event.h"
class ControllerEventData : public TelldusCore::EventDataBase {
public:

View file

@ -5,6 +5,12 @@
//
//
#include "service/ControllerManager.h"
#include <stdio.h>
#include <list>
#include <map>
#include <string>
#include "service/Controller.h"
#include "common/Mutex.h"
#include "service/TellStick.h"
@ -15,9 +21,6 @@
#include "service/EventUpdateManager.h"
#include "client/telldus-core.h"
#include <map>
#include <stdio.h>
class ControllerDescriptor {
public:
std::wstring name, serial;

View file

@ -7,10 +7,10 @@
#ifndef TELLDUS_CORE_SERVICE_CONTROLLERMANAGER_H_
#define TELLDUS_CORE_SERVICE_CONTROLLERMANAGER_H_
#include <string>
#include "common/Event.h"
class Controller;
#include <string>
class ControllerManager {
public:

View file

@ -5,13 +5,12 @@
//
//
#include "service/ControllerMessage.h"
#include <map>
#include <string>
#include "service/Device.h"
#include "common/Strings.h"
#include "common/common.h"
#include <map>
class ControllerMessage::PrivateData {
public:
std::map<std::string, std::string> parameters;

View file

@ -7,11 +7,11 @@
#ifndef TELLDUS_CORE_SERVICE_DEVICE_H_
#define TELLDUS_CORE_SERVICE_DEVICE_H_
#include <list>
#include <string>
#include "service/Controller.h"
#include "common/Mutex.h"
#include "service/Protocol.h"
#include <string>
#include <list>
class Device : public TelldusCore::Mutex {
public:

View file

@ -5,6 +5,14 @@
//
//
#include "service/DeviceManager.h"
#include <time.h>
#include <list>
#include <map>
#include <memory>
#include <set>
#include <sstream>
#include <string>
#include "service/ControllerMessage.h"
#include "common/Mutex.h"
#include "service/Sensor.h"
@ -13,11 +21,6 @@
#include "common/Message.h"
#include "service/Log.h"
#include <map>
#include <memory>
#include <sstream>
#include <time.h>
typedef std::map<int, Device *> DeviceMap;
class DeviceManager::PrivateData {

View file

@ -7,12 +7,12 @@
#ifndef TELLDUS_CORE_SERVICE_DEVICEMANAGER_H_
#define TELLDUS_CORE_SERVICE_DEVICEMANAGER_H_
#include <set>
#include <string>
#include "service/Device.h"
#include "service/ControllerManager.h"
#include "service/ControllerMessage.h"
#include "service/EventUpdateManager.h"
#include <set>
class Sensor;

View file

@ -6,14 +6,14 @@
//
#include "service/EventUpdateManager.h"
#include <list>
#include <memory>
#include "service/ConnectionListener.h"
#include "common/EventHandler.h"
#include "common/Message.h"
#include "common/Socket.h"
#include <list>
#include <memory>
typedef std::list<TelldusCore::Socket *> SocketList;
class EventUpdateManager::PrivateData {

View file

@ -5,8 +5,11 @@
//
//
#include "service/Protocol.h"
#include "client/telldus-core.h"
#include <list>
#include <sstream>
#include <string>
#include "client/telldus-core.h"
#include "service/ControllerMessage.h"
#include "service/ProtocolBrateck.h"
#include "service/ProtocolComen.h"
@ -27,9 +30,7 @@
#include "service/ProtocolWaveman.h"
#include "service/ProtocolX10.h"
#include "service/ProtocolYidong.h"
#include "common/Strings.h"
#include <sstream>
class Protocol::PrivateData {
public:

View file

@ -7,8 +7,8 @@
#ifndef TELLDUS_CORE_SERVICE_PROTOCOLCOMEN_H_
#define TELLDUS_CORE_SERVICE_PROTOCOLCOMEN_H_
#include "service/ProtocolNexa.h"
#include <string>
#include "service/ProtocolNexa.h"
class ProtocolComen : public ProtocolNexa {
public:

View file

@ -4,11 +4,11 @@
// Copyright: See COPYING file that comes with this distribution
//
//
#include "ProtocolEverflourish.h"
#include <sstream>
#include "service/ProtocolEverflourish.h"
#include <stdio.h>
#include "service/ControllerMessage.h"
#include <sstream>
#include <string>
#include "service/ControllerMessage.h"
int ProtocolEverflourish::methods() const {
return TELLSTICK_TURNON | TELLSTICK_TURNOFF | TELLSTICK_LEARN;

View file

@ -5,10 +5,11 @@
//
//
#include "service/ProtocolFineoffset.h"
#include "common/Strings.h"
#include <stdlib.h>
#include <sstream>
#include <iomanip>
#include <sstream>
#include <string>
#include "common/Strings.h"
std::string ProtocolFineoffset::decodeData(ControllerMessage &dataMsg) {
std::string data = dataMsg.getParameter("data");

View file

@ -5,8 +5,9 @@
//
//
#include "service/ProtocolHasta.h"
#include <sstream>
#include <stdio.h>
#include <sstream>
#include <string>
int ProtocolHasta::methods() const {
return TELLSTICK_UP | TELLSTICK_DOWN | TELLSTICK_STOP | TELLSTICK_LEARN;

View file

@ -5,10 +5,10 @@
//
//
#include "service/ProtocolIkea.h"
#include "common/Strings.h"
#include <stdlib.h>
#include <string.h>
#include <string>
#include "common/Strings.h"
int ProtocolIkea::methods() const {
return TELLSTICK_TURNON | TELLSTICK_TURNOFF | TELLSTICK_DIM;

View file

@ -5,10 +5,11 @@
//
//
#include "service/ProtocolMandolyn.h"
#include "common/Strings.h"
#include <stdlib.h>
#include <sstream>
#include <iomanip>
#include <sstream>
#include <string>
#include "common/Strings.h"
std::string ProtocolMandolyn::decodeData(ControllerMessage &dataMsg) {
std::string data = dataMsg.getParameter("data");

View file

@ -7,6 +7,7 @@
#include "service/ProtocolNexa.h"
#include <stdio.h>
#include <sstream>
#include <string>
#include "service/TellStick.h"
#include "common/Strings.h"

View file

@ -7,9 +7,9 @@
#ifndef TELLDUS_CORE_SERVICE_PROTOCOLNEXA_H_
#define TELLDUS_CORE_SERVICE_PROTOCOLNEXA_H_
#include <string>
#include "service/ControllerMessage.h"
#include "service/Device.h"
#include <string>
class ProtocolNexa : public Protocol {
public:

View file

@ -5,10 +5,11 @@
//
//
#include "service/ProtocolOregon.h"
#include "common/Strings.h"
#include <stdlib.h>
#include <sstream>
#include <iomanip>
#include <sstream>
#include <string>
#include "common/Strings.h"
std::string ProtocolOregon::decodeData(ControllerMessage &dataMsg) {
std::string data = dataMsg.getParameter("data");

View file

@ -5,8 +5,9 @@
//
//
#include "service/ProtocolSartano.h"
#include <sstream>
#include <stdio.h>
#include <sstream>
#include <string>
int ProtocolSartano::methods() const {
return TELLSTICK_TURNON | TELLSTICK_TURNOFF;

View file

@ -5,8 +5,9 @@
//
//
#include "service/ProtocolWaveman.h"
#include <sstream>
#include <stdio.h>
#include <sstream>
#include <string>
int ProtocolWaveman::lastArctecCodeSwitchWasTurnOff=0;

View file

@ -5,9 +5,10 @@
//
//
#include "service/Sensor.h"
#include <map>
#include <string>
#include "common/common.h"
#include "client/telldus-core.h"
#include <map>
class Sensor::PrivateData {
public:

View file

@ -7,8 +7,8 @@
#ifndef TELLDUS_CORE_SERVICE_SENSOR_H_
#define TELLDUS_CORE_SERVICE_SENSOR_H_
#include "common/Mutex.h"
#include <string>
#include "common/Mutex.h"
class Sensor : public TelldusCore::Mutex {
public:

View file

@ -4,16 +4,15 @@
// Copyright: See COPYING file that comes with this distribution
//
//
#include "Settings.h"
#include "client/telldus-core.h"
#include "service/Settings.h"
#include "service/SettingsConfusePaths.h"
#include "client/telldus-core.h"
#include "common/Strings.h"
#include <confuse.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <string>
#include "service/Settings.h"
#include "service/SettingsConfusePaths.h"
#include "client/telldus-core.h"
#include "common/Strings.h"
using namespace std;

View file

@ -6,8 +6,9 @@
//
#include "service/TellStick.h"
#include <map>
#include <stdio.h>
#include <map>
#include <string>
std::string TellStick::createTPacket( const std::string &msg ) {
std::map<unsigned char, char> times;

View file

@ -4,24 +4,23 @@
// Copyright: See COPYING file that comes with this distribution
//
//
#include "service/TellStick.h"
#include "client/telldus-core.h"
#include <ftdi.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <ftdi.h>
#include <list>
#include <string>
#include "service/TellStick.h"
#include "service/Log.h"
#include "service/Settings.h"
#include "client/telldus-core.h"
#include "common/Thread.h"
#include "common/Mutex.h"
#include "common/Strings.h"
#include "common/common.h"
#include <unistd.h>
typedef struct _EVENT_HANDLE {
pthread_cond_t eCondVar;
pthread_mutex_t eMutex;

View file

@ -5,6 +5,11 @@
//
//
#include "service/TelldusMain.h"
#include <stdio.h>
#include <list>
#include <memory>
#include "service/ConnectionListener.h"
#include "common/EventHandler.h"
#include "service/ClientCommunicationHandler.h"
@ -15,9 +20,6 @@
#include "service/Timer.h"
#include "service/Log.h"
#include <stdio.h>
#include <list>
#include <memory>
class TelldusMain::PrivateData {
public:

View file

@ -5,12 +5,12 @@
//
//
#include "service/Timer.h"
#include "common/Mutex.h"
#ifdef _WINDOWS
#else
#include <sys/time.h>
#include <errno.h>
#endif
#include "common/Mutex.h"
class Timer::PrivateData {
public:

View file

@ -4,7 +4,6 @@
// Copyright: See COPYING file that comes with this distribution
//
//
#include "service/TelldusMain.h"
#include <signal.h>
#include <string.h>
#include <stdio.h>
@ -16,6 +15,7 @@
#include <grp.h>
#include <string>
#include "service/TelldusMain.h"
#include "service/Settings.h"
#include "common/Strings.h"
#include "service/Log.h"