[asycxx-devel] SF.net SVN: asycxx:[6] trunk
Status: Alpha
Brought to you by:
joe_steeve
From: <joe...@us...> - 2009-03-12 09:35:29
|
Revision: 6 http://asycxx.svn.sourceforge.net/asycxx/?rev=6&view=rev Author: joe_steeve Date: 2009-03-12 09:35:26 +0000 (Thu, 12 Mar 2009) Log Message: ----------- split asycxx internal stuff into the private asycxx-common.h The installed ascyxx.h should not contain things that are internal to asycxx. Hence moved asycxx specific content into a private asycxx-common.h. the include/asycxx.h should be used as a one time header to include all parts of asycxx. From: Joe Steeve <js...@hi...> Modified Paths: -------------- trunk/configure.ac trunk/include/asycxx/DataBuffer.h trunk/include/asycxx/Deferred.h trunk/include/asycxx/Error.h trunk/include/asycxx/Factory.h trunk/include/asycxx/GimpleMsgBus.h trunk/include/asycxx/Listener.h trunk/include/asycxx/MsgBus.h trunk/include/asycxx/MsgHandler.h trunk/include/asycxx/Protocol.h trunk/include/asycxx/Reactor.h trunk/include/asycxx/RefCounter.h trunk/include/asycxx/SelectReactor.h trunk/include/asycxx/TCPLLTransport.h trunk/include/asycxx/TCPListener.h trunk/include/asycxx/TCPTransport.h trunk/include/asycxx/Timer.h trunk/include/asycxx/Transport.h trunk/include/asycxx/XMLParser.h trunk/include/asycxx/asycxx.h trunk/src/DataBuffer.cxx trunk/src/Error.cxx trunk/src/Factory.cxx trunk/src/GimpleMsgBus.cxx trunk/src/Listener.cxx trunk/src/MsgBus.cxx trunk/src/MsgHandler.cxx trunk/src/Protocol.cxx trunk/src/Reactor.cxx trunk/src/RefCounter.cxx trunk/src/SelectReactor.cxx trunk/src/TCPLLTransport.cxx trunk/src/TCPListener.cxx trunk/src/TCPTransport.cxx trunk/src/Timer.cxx trunk/src/Transport.cxx trunk/src/XMLParser.cxx trunk/src/core.cxx Added Paths: ----------- trunk/include/asycxx/_asycxx.h trunk/src/asycxx-common.h Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/configure.ac 2009-03-12 09:35:26 UTC (rev 6) @@ -94,5 +94,5 @@ src/MsgHandler.h:include/asycxx/MsgHandler.h src/GimpleMsgBus.h:include/asycxx/GimpleMsgBus.h src/XMLParser.h:include/asycxx/XMLParser.h - src/asycxx.h:include/asycxx/asycxx.h) + src/_asycxx.h:include/asycxx/_asycxx.h) AC_OUTPUT Modified: trunk/include/asycxx/DataBuffer.h =================================================================== --- trunk/include/asycxx/DataBuffer.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/DataBuffer.h 2009-03-12 09:35:26 UTC (rev 6) @@ -19,7 +19,9 @@ #include <asycxx-config.h> #endif -#include "asycxx.h" +#include <sys/types.h> + +#include "_asycxx.h" #include "RefCounter.h" class DataBuffer : public RefCounter Modified: trunk/include/asycxx/Deferred.h =================================================================== --- trunk/include/asycxx/Deferred.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/Deferred.h 2009-03-12 09:35:26 UTC (rev 6) @@ -15,7 +15,6 @@ #ifndef __HIPRO_ASYCXX__DEFERRED_H__ #define __HIPRO_ASYCXX__DEFERRED_H__ -#include "asycxx.h" #include "Error.h" typedef void (*cbDeferredOnEvent_t) (void *obj); Modified: trunk/include/asycxx/Error.h =================================================================== --- trunk/include/asycxx/Error.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/Error.h 2009-03-12 09:35:26 UTC (rev 6) @@ -19,7 +19,7 @@ #include <asycxx-config.h> #endif -#include "asycxx.h" +#include <stdarg.h> #define THROW(x, fmt, ...) throw x("[%s:%d] " fmt "\n", \ __FILE__, __LINE__, ##__VA_ARGS__) Modified: trunk/include/asycxx/Factory.h =================================================================== --- trunk/include/asycxx/Factory.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/Factory.h 2009-03-12 09:35:26 UTC (rev 6) @@ -19,7 +19,6 @@ #include <asycxx-config.h> #endif -#include "asycxx.h" #include "Error.h" #include "Reactor.h" #include "Transport.h" Modified: trunk/include/asycxx/GimpleMsgBus.h =================================================================== --- trunk/include/asycxx/GimpleMsgBus.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/GimpleMsgBus.h 2009-03-12 09:35:26 UTC (rev 6) @@ -21,7 +21,6 @@ #include <deque> -#include "asycxx.h" #include "Error.h" #include "Reactor.h" #include "Protocol.h" Modified: trunk/include/asycxx/Listener.h =================================================================== --- trunk/include/asycxx/Listener.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/Listener.h 2009-03-12 09:35:26 UTC (rev 6) @@ -19,7 +19,6 @@ #include <asycxx-config.h> #endif -#include "asycxx.h" #include "Error.h" #include "Reactor.h" Modified: trunk/include/asycxx/MsgBus.h =================================================================== --- trunk/include/asycxx/MsgBus.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/MsgBus.h 2009-03-12 09:35:26 UTC (rev 6) @@ -17,7 +17,6 @@ #include <asycxx-config.h> #endif -#include "asycxx.h" #include "DataBuffer.h" /** Modified: trunk/include/asycxx/MsgHandler.h =================================================================== --- trunk/include/asycxx/MsgHandler.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/MsgHandler.h 2009-03-12 09:35:26 UTC (rev 6) @@ -17,7 +17,6 @@ #include <asycxx-config.h> #endif -#include "asycxx.h" #include "DataBuffer.h" #include "MsgBus.h" Modified: trunk/include/asycxx/Protocol.h =================================================================== --- trunk/include/asycxx/Protocol.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/Protocol.h 2009-03-12 09:35:26 UTC (rev 6) @@ -19,7 +19,6 @@ #include <asycxx-config.h> #endif -#include "asycxx.h" #include "Error.h" #include "Reactor.h" #include "DataBuffer.h" Modified: trunk/include/asycxx/Reactor.h =================================================================== --- trunk/include/asycxx/Reactor.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/Reactor.h 2009-03-12 09:35:26 UTC (rev 6) @@ -21,7 +21,7 @@ #include <deque> -#include "asycxx.h" +#include "_asycxx.h" #include "Deferred.h" #define TIME_SENSITIVITY 200LL Modified: trunk/include/asycxx/RefCounter.h =================================================================== --- trunk/include/asycxx/RefCounter.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/RefCounter.h 2009-03-12 09:35:26 UTC (rev 6) @@ -19,7 +19,6 @@ #include <asycxx-config.h> #endif -#include "asycxx.h" #include "Error.h" class RefCounter Modified: trunk/include/asycxx/SelectReactor.h =================================================================== --- trunk/include/asycxx/SelectReactor.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/SelectReactor.h 2009-03-12 09:35:26 UTC (rev 6) @@ -23,7 +23,6 @@ #include <sys/select.h> -#include "asycxx.h" #include "Reactor.h" class SelectReactor :public Reactor Modified: trunk/include/asycxx/TCPLLTransport.h =================================================================== --- trunk/include/asycxx/TCPLLTransport.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/TCPLLTransport.h 2009-03-12 09:35:26 UTC (rev 6) @@ -19,7 +19,6 @@ #include <asycxx-config.h> #endif -#include "asycxx.h" #include "Reactor.h" #include "TCPTransport.h" Modified: trunk/include/asycxx/TCPListener.h =================================================================== --- trunk/include/asycxx/TCPListener.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/TCPListener.h 2009-03-12 09:35:26 UTC (rev 6) @@ -22,7 +22,6 @@ #include <sys/types.h> #include <arpa/inet.h> -#include "asycxx.h" #include "Error.h" #include "Listener.h" #include "Factory.h" Modified: trunk/include/asycxx/TCPTransport.h =================================================================== --- trunk/include/asycxx/TCPTransport.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/TCPTransport.h 2009-03-12 09:35:26 UTC (rev 6) @@ -19,7 +19,6 @@ #include <asycxx-config.h> #endif -#include "asycxx.h" #include "Error.h" #include "Reactor.h" #include "DataBuffer.h" Modified: trunk/include/asycxx/Timer.h =================================================================== --- trunk/include/asycxx/Timer.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/Timer.h 2009-03-12 09:35:26 UTC (rev 6) @@ -21,7 +21,6 @@ #include <vector> -#include "asycxx.h" #include "Reactor.h" Modified: trunk/include/asycxx/Transport.h =================================================================== --- trunk/include/asycxx/Transport.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/Transport.h 2009-03-12 09:35:26 UTC (rev 6) @@ -21,7 +21,6 @@ #include <deque> -#include "asycxx.h" #include "Error.h" #include "Reactor.h" #include "DataBuffer.h" Modified: trunk/include/asycxx/XMLParser.h =================================================================== --- trunk/include/asycxx/XMLParser.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/XMLParser.h 2009-03-12 09:35:26 UTC (rev 6) @@ -18,7 +18,7 @@ #include <vector> #include <hdb-tinyxml/tinyxml.h> -#include "asycxx.h" +#include "_asycxx.h" class XMLParser { Copied: trunk/include/asycxx/_asycxx.h (from rev 5, trunk/src/MsgHandler.cxx) =================================================================== --- trunk/include/asycxx/_asycxx.h (rev 0) +++ trunk/include/asycxx/_asycxx.h 2009-03-12 09:35:26 UTC (rev 6) @@ -0,0 +1,38 @@ + +/******************************************************************** + * Copyright (C) 2008,2009 HiPro IT Solutions Pvt. Ltd., Chennai. All + * rights reserved. + * + * This program and the accompanying materials are made available + * under the terms described in the LICENSE file which accompanies + * this distribution. If the LICENSE file was not attached to this + * distribution or for further clarifications, please contact + * le...@hi... + * + *******************************************************************/ + +#ifndef __HIPRO_ACW___ASYCXX_H__ +#define __HIPRO_ACW___ASYCXX_H__ + +enum Result + { + Result_Success = 0, + Result_Error, + Result_Pending, + Result_NotFound, + }; + +typedef unsigned char u8_t; +typedef long long h_msecs_t; +typedef long long h_timestamp_t; + +#endif /* __HIPRO_ACW___ASYCXX_H__ */ + +/* + Local Variables: + mode: c++ + indent-tabs-mode: nil + tab-width: 4 + c-file-style: "gnu" + End: +*/ Modified: trunk/include/asycxx/asycxx.h =================================================================== --- trunk/include/asycxx/asycxx.h 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/include/asycxx/asycxx.h 2009-03-12 09:35:26 UTC (rev 6) @@ -1,71 +1,28 @@ -/* -*- mode: c++; indent-tabs-mode: nil; tab-width: 4; -*- */ -#ifndef __ACW__HMI_CTRL_H__ -#define __ACW__HMI_CTRL_H__ +/******************************************************************** + * Copyright (C) 2008,2009 HiPro IT Solutions Pvt. Ltd., Chennai. All + * rights reserved. + * + * This program and the accompanying materials are made available + * under the terms described in the LICENSE file which accompanies + * this distribution. If the LICENSE file was not attached to this + * distribution or for further clarifications, please contact + * le...@hi... + * + *******************************************************************/ -#include <stdio.h> -#include <stdlib.h> +#ifndef __HIPRO_ACW__ASYCXX_H__ +#define __HIPRO_ACW__ASYCXX_H__ -#include "Logger.h" +#include "_asycxx.h" -extern Logger *Log; +#endif /* __HIPRO_ACW__XML_PARSER_H__ */ -#define cERR(fmt, ...) fprintf (stderr, "[E:%18s:%04d] " fmt "\n", \ - __FILE__, __LINE__, ##__VA_ARGS__) -#define ERR(fmt, ...) Log->LogThis ("[%20s:%04d] ERROR: " fmt "\n", \ - __FILE__, __LINE__, ##__VA_ARGS__) -#define LOG(fmt, ...) Log->LogThis ("[%20s:%04d] " fmt "\n", \ - __FILE__, __LINE__, ##__VA_ARGS__) - -/* log messages to track ctor and dtor */ -#define ctorLOG(cls) Log->LogThis ("CTOR: %s <%p>\n", cls, this) -#define dtorLOG(cls) Log->LogThis ("DTOR: %s <%p>\n", cls, this) - -#define dummyLog(fmt, ...) - -#if HMI_CTRL_VERBOSE_LEVEL >= 1 -#define LOG1 LOG -#else -#define LOG1 dummyLog -#endif - -#if HMI_CTRL_VERBOSE_LEVEL >= 2 -#define LOG2 LOG -#else -#define LOG2 dummyLog -#endif - -#if HMI_CTRL_VERBOSE_LEVEL >= 3 -#define LOG3 LOG -#else -#define LOG3 dummyLog -#endif - -#define ASSERT(x, fmt, ...) \ - { \ - if (!(x)) \ - { \ - THROW (DevError, "assertion failed: %s, " fmt "\n", \ - #x, ##__VA_ARGS__); \ - } \ - } - -enum Result - { - Result_Success = 0, - Result_Error, - Result_Pending, - Result_NotFound, - }; - -typedef unsigned char u8_t; -typedef long long h_msecs_t; -typedef long long h_timestamp_t; - -h_msecs_t GetCurrentTimeStamp (void); -void SetFDAsNonBlocking (int fd); - -#define HMI_CTRL_MAX_URL_LEN 512 -#define HMI_CTRL_MAX_XPATH_LEN 1024 - -#endif /* __ACW__HMI_CTRL_H__ */ +/* + Local Variables: + mode: c++ + indent-tabs-mode: nil + tab-width: 4 + c-file-style: "gnu" + End: +*/ Modified: trunk/src/DataBuffer.cxx =================================================================== --- trunk/src/DataBuffer.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/DataBuffer.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -16,6 +16,9 @@ #include <asycxx-config.h> #endif +#include <cstdlib> + +#include "asycxx-common.h" #include "DataBuffer.h" Modified: trunk/src/Error.cxx =================================================================== --- trunk/src/Error.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/Error.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -20,7 +20,7 @@ #include <stdlib.h> #include <execinfo.h> -#include "asycxx.h" +#include "asycxx-common.h" #include "Error.h" void Modified: trunk/src/Factory.cxx =================================================================== --- trunk/src/Factory.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/Factory.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -17,7 +17,7 @@ #endif -#include "asycxx.h" +#include "asycxx-common.h" #include "Error.h" #include "Reactor.h" #include "Factory.h" Modified: trunk/src/GimpleMsgBus.cxx =================================================================== --- trunk/src/GimpleMsgBus.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/GimpleMsgBus.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -17,7 +17,7 @@ #include <string.h> #include <arpa/inet.h> -#include "asycxx.h" +#include "asycxx-common.h" #include "Error.h" #include "Transport.h" Modified: trunk/src/Listener.cxx =================================================================== --- trunk/src/Listener.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/Listener.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -17,7 +17,7 @@ #endif -#include "asycxx.h" +#include "asycxx-common.h" #include "Error.h" #include "Listener.h" Modified: trunk/src/MsgBus.cxx =================================================================== --- trunk/src/MsgBus.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/MsgBus.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -14,7 +14,7 @@ #include <asycxx-config.h> #endif -#include "asycxx.h" +#include "asycxx-common.h" #include "Error.h" #include "MsgBus.h" #include "MsgHandler.h" Modified: trunk/src/MsgHandler.cxx =================================================================== --- trunk/src/MsgHandler.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/MsgHandler.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -14,7 +14,7 @@ #include <asycxx-config.h> #endif -#include "asycxx.h" +#include "asycxx-common.h" #include "Error.h" #include "MsgHandler.h" Modified: trunk/src/Protocol.cxx =================================================================== --- trunk/src/Protocol.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/Protocol.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -17,7 +17,7 @@ #endif -#include "asycxx.h" +#include "asycxx-common.h" #include "Error.h" #include "Protocol.h" Modified: trunk/src/Reactor.cxx =================================================================== --- trunk/src/Reactor.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/Reactor.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -27,7 +27,7 @@ #include <unistd.h> #include <exception> -#include "asycxx.h" +#include "asycxx-common.h" #include "Reactor.h" #include "Deferred.h" Modified: trunk/src/RefCounter.cxx =================================================================== --- trunk/src/RefCounter.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/RefCounter.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -16,7 +16,7 @@ #include <asycxx-config.h> #endif -#include "asycxx.h" +#include "asycxx-common.h" #include "Error.h" #include "RefCounter.h" Modified: trunk/src/SelectReactor.cxx =================================================================== --- trunk/src/SelectReactor.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/SelectReactor.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -20,7 +20,7 @@ #include <errno.h> #include <string.h> -#include "asycxx.h" +#include "asycxx-common.h" #include "Error.h" #include "SelectReactor.h" Modified: trunk/src/TCPLLTransport.cxx =================================================================== --- trunk/src/TCPLLTransport.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/TCPLLTransport.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -23,7 +23,7 @@ #include <netinet/in.h> #include <netinet/tcp.h> -#include "asycxx.h" +#include "asycxx-common.h" #include "Error.h" #include "Protocol.h" #include "TCPLLTransport.h" Modified: trunk/src/TCPListener.cxx =================================================================== --- trunk/src/TCPListener.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/TCPListener.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -26,7 +26,7 @@ #include <errno.h> #include <unistd.h> -#include "asycxx.h" +#include "asycxx-common.h" #include "Error.h" #include "Factory.h" #include "Protocol.h" Modified: trunk/src/TCPTransport.cxx =================================================================== --- trunk/src/TCPTransport.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/TCPTransport.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -24,7 +24,7 @@ #include <sys/socket.h> #include <errno.h> -#include "asycxx.h" +#include "asycxx-common.h" #include "Error.h" #include "Protocol.h" #include "TCPTransport.h" Modified: trunk/src/Timer.cxx =================================================================== --- trunk/src/Timer.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/Timer.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -44,7 +44,7 @@ #include <vector> -#include "asycxx.h" +#include "asycxx-common.h" #include "Error.h" #include "Timer.h" Modified: trunk/src/Transport.cxx =================================================================== --- trunk/src/Transport.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/Transport.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -18,7 +18,7 @@ #include <unistd.h> -#include "asycxx.h" +#include "asycxx-common.h" #include "Error.h" #include "Transport.h" #include "Protocol.h" Modified: trunk/src/XMLParser.cxx =================================================================== --- trunk/src/XMLParser.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/XMLParser.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -20,8 +20,8 @@ #include <stdlib.h> #include <errno.h> +#include "asycxx-common.h" #include "XMLParser.h" -#include "asycxx.h" #include "Error.h" #include <hdb-tinyxml/tinyxml.h> Copied: trunk/src/asycxx-common.h (from rev 5, trunk/include/asycxx/asycxx.h) =================================================================== --- trunk/src/asycxx-common.h (rev 0) +++ trunk/src/asycxx-common.h 2009-03-12 09:35:26 UTC (rev 6) @@ -0,0 +1,80 @@ + +/******************************************************************** + * Copyright (C) 2008,2009 HiPro IT Solutions Pvt. Ltd., Chennai. All + * rights reserved. + * + * This program and the accompanying materials are made available + * under the terms described in the LICENSE file which accompanies + * this distribution. If the LICENSE file was not attached to this + * distribution or for further clarifications, please contact + * le...@hi.... + * + *******************************************************************/ + +#ifndef __ACW_ASYCXX__ASYCXX_COMMON_H__ +#define __ACW_ASYCXX__ASYCXX_COMMON_H__ + +#include <stdio.h> +#include <stdlib.h> + +#include "_asycxx.h" +#include "Logger.h" + +extern Logger *Log; + +#define cERR(fmt, ...) fprintf (stderr, "[E:%18s:%04d] " fmt "\n", \ + __FILE__, __LINE__, ##__VA_ARGS__) +#define ERR(fmt, ...) Log->LogThis ("[%20s:%04d] ERROR: " fmt "\n", \ + __FILE__, __LINE__, ##__VA_ARGS__) +#define LOG(fmt, ...) Log->LogThis ("[%20s:%04d] " fmt "\n", \ + __FILE__, __LINE__, ##__VA_ARGS__) + +/* log messages to track ctor and dtor */ +#define ctorLOG(cls) Log->LogThis ("CTOR: %s <%p>\n", cls, this) +#define dtorLOG(cls) Log->LogThis ("DTOR: %s <%p>\n", cls, this) + +#define dummyLog(fmt, ...) + +#if HMI_CTRL_VERBOSE_LEVEL >= 1 +#define LOG1 LOG +#else +#define LOG1 dummyLog +#endif + +#if HMI_CTRL_VERBOSE_LEVEL >= 2 +#define LOG2 LOG +#else +#define LOG2 dummyLog +#endif + +#if HMI_CTRL_VERBOSE_LEVEL >= 3 +#define LOG3 LOG +#else +#define LOG3 dummyLog +#endif + +#define ASSERT(x, fmt, ...) \ + { \ + if (!(x)) \ + { \ + THROW (DevError, "assertion failed: %s, " fmt "\n", \ + #x, ##__VA_ARGS__); \ + } \ + } + +h_msecs_t GetCurrentTimeStamp (void); +void SetFDAsNonBlocking (int fd); + +#define HMI_CTRL_MAX_URL_LEN 512 +#define HMI_CTRL_MAX_XPATH_LEN 1024 + +#endif /* __ACW_ASYCXX__ASYCXX_COMMON_H__ */ + +/* + Local Variables: + mode: c++ + indent-tabs-mode: nil + tab-width: 4 + c-file-style: "gnu" + End: +*/ Modified: trunk/src/core.cxx =================================================================== --- trunk/src/core.cxx 2009-02-20 19:18:20 UTC (rev 5) +++ trunk/src/core.cxx 2009-03-12 09:35:26 UTC (rev 6) @@ -22,7 +22,7 @@ #include <unistd.h> #include <fcntl.h> -#include "asycxx.h" +#include "asycxx-common.h" #include "Error.h" h_msecs_t This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |