1 /**
2 * Copyright (C) ARM Limited 2010-2012. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
9 #ifndef OLY_UTILITY_H
10 #define OLY_UTILITY_H
12 #ifdef WIN32
13 #define PATH_SEPARATOR '\\'
14 #else
15 #define PATH_SEPARATOR '/'
16 #endif
18 class OlyUtility {
19 public:
20 OlyUtility() {};
21 ~OlyUtility() {};
22 bool stringToBool(const char* string, bool defValue);
23 void stringToLower(char* string);
24 int getApplicationFullPath(char* path, int sizeOfPath);
25 char* readFromDisk(const char* file, unsigned int *size = NULL, bool appendNull = true);
26 int writeToDisk(const char* path, const char* file);
27 int appendToDisk(const char* path, const char* file);
28 int copyFile(const char* srcFile, const char* dstFile);
29 const char* getFilePart(const char* path);
30 char* getPathPart(char* path);
31 private:
32 };
34 #include "mxml/mxml.h"
35 const char * mxmlWhitespaceCB(mxml_node_t *node, int where);
36 extern OlyUtility* util;
38 #endif // OLY_UTILITY_H