summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/OlyUtility.h')
-rw-r--r--daemon/OlyUtility.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/daemon/OlyUtility.h b/daemon/OlyUtility.h
index 793a733..424c583 100644
--- a/daemon/OlyUtility.h
+++ b/daemon/OlyUtility.h
@@ -11,28 +11,30 @@
11 11
12#ifdef WIN32 12#ifdef WIN32
13#define PATH_SEPARATOR '\\' 13#define PATH_SEPARATOR '\\'
14#define CAIMAN_PATH_MAX MAX_PATH
15#define snprintf _snprintf
14#else 16#else
17#include <limits.h>
15#define PATH_SEPARATOR '/' 18#define PATH_SEPARATOR '/'
19#define CAIMAN_PATH_MAX PATH_MAX
16#endif 20#endif
17 21
18class OlyUtility { 22class OlyUtility {
19public: 23public:
20 OlyUtility() {}; 24 OlyUtility() {};
21 ~OlyUtility() {}; 25 ~OlyUtility() {};
22 bool stringToBool(const char* string, bool defValue); 26 bool stringToBool(const char* string, bool defValue);
23 void stringToLower(char* string); 27 void stringToLower(char* string);
24 int getApplicationFullPath(char* path, int sizeOfPath); 28 int getApplicationFullPath(char* path, int sizeOfPath);
25 char* readFromDisk(const char* file, unsigned int *size = NULL, bool appendNull = true); 29 char* readFromDisk(const char* file, unsigned int *size = NULL, bool appendNull = true);
26 int writeToDisk(const char* path, const char* file); 30 int writeToDisk(const char* path, const char* file);
27 int appendToDisk(const char* path, const char* file); 31 int appendToDisk(const char* path, const char* file);
28 int copyFile(const char* srcFile, const char* dstFile); 32 int copyFile(const char* srcFile, const char* dstFile);
29 const char* getFilePart(const char* path); 33 const char* getFilePart(const char* path);
30 char* getPathPart(char* path); 34 char* getPathPart(char* path);
31private: 35private:
32}; 36};
33 37
34#include "mxml/mxml.h"
35const char * mxmlWhitespaceCB(mxml_node_t *node, int where);
36extern OlyUtility* util; 38extern OlyUtility* util;
37 39
38#endif // OLY_UTILITY_H 40#endif // OLY_UTILITY_H