00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef SYMBIANADAPTER_H_
00037 #define SYMBIANADAPTER_H_
00038
00039 #include "base/globalsdef.h"
00040
00041 #include <e32def.h>
00042 #include <stdio.h>
00043 #include <stdlib.h>
00044 #include <dirent.h>
00045 #include <stdarg.h>
00046 #include <string.h>
00047 #include <utf.h>
00048 #include <ctype.h>
00049
00050 #define PLATFORM_VA_LIST VA_LIST
00051 #define PLATFORM_VA_START VA_START
00052 #define PLATFORM_VA_END VA_END
00053 #define PLATFORM_VA_ARG VA_ARG
00054
00055 #ifdef __WINSCW__
00056 #define PLATFORM_VA_COPY(a,b) (a[0] = b[0])
00057 #if !defined(va_copy)
00058 #define va_copy
00059 #endif
00060 #endif
00061
00062 #define WCHAR wchar_t
00063 #define BOOL int
00064 #define TRUE 1
00065 #define FALSE 0
00066 #define __cdecl
00067 #define USE_WCHAR 1
00068 #define TEXT(_x) L##_x
00069
00070 #define _wcsicmp wcscasecmp
00071
00072 BEGIN_NAMESPACE
00073
00074
00075 wchar_t * wcsncpy (wchar_t *dst, const wchar_t *src, size_t count);
00076 int towlower(int c);
00077 int towupper(int c);
00078 size_t vsnprintf(char* s, size_t size, const char* format, PLATFORM_VA_LIST aq);
00079 size_t snwprintf(WCHAR *v, size_t size, const WCHAR* format, unsigned long value);
00080 WCHAR *wcschr(const WCHAR *ws, WCHAR wc);
00081 WCHAR *wcsstr(const WCHAR *ws1, const WCHAR *ws2);
00082 WCHAR *wcstok(WCHAR *ws1, const WCHAR *ws2);
00083 WCHAR *wcsncat(WCHAR *ws1, const WCHAR *ws2, size_t n);
00084 double wcstod(const WCHAR *nptr, WCHAR ** endptr);
00085 int _wtoi(const WCHAR *str);
00086 size_t wsprintf(WCHAR* s, const WCHAR* format, ...);
00087 int wcscasecmp(const WCHAR* s1, const WCHAR* s2);
00088 bool readFile(const char* path, char **message, size_t *len, bool binary);
00089 bool saveFile(const char *filename, const char *buffer, size_t len, bool binary);
00090 bool fileExists(const char *aFileName);
00091 char** readDir(const char* name, int *count, bool onlyCount);
00092 bool removeDir(const char *aDirPath);
00093 END_NAMESPACE
00094
00095
00096
00097
00098
00099
00100 typedef TInt8 int8_t;
00101 typedef TUint8 uint8_t;
00102 typedef TInt16 int16_t;
00103 typedef TUint16 uint16_t;
00104 typedef TInt32 int32_t;
00105 typedef TUint32 uint32_t;
00106 typedef TInt64 int64_t;
00107 typedef TUint64 uint64_t;
00108
00109 #endif
00110