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
00037
00038
00039
00040
00041 #ifndef RECLS_INCL_RECLS_INTERNAL_H_PLATFORM_TYPES
00042 #define RECLS_INCL_RECLS_INTERNAL_H_PLATFORM_TYPES
00043
00044
00045 #ifndef RECLS_DOCUMENTATION_SKIP_SECTION
00046 # define RECLS_VER_RECLS_INTERNAL_H_PLATFORM_TYPES_MAJOR 3
00047 # define RECLS_VER_RECLS_INTERNAL_H_PLATFORM_TYPES_MINOR 1
00048 # define RECLS_VER_RECLS_INTERNAL_H_PLATFORM_TYPES_REVISION 1
00049 # define RECLS_VER_RECLS_INTERNAL_H_PLATFORM_TYPES_EDIT 22
00050 #endif
00051
00058
00059
00060
00061
00062 #ifndef RECLS_INCL_RECLS_INTERNAL_H_PLATFORM
00063 # error recls/internal/platform_types.h must not be included directly. You should include recls/recls.h
00064 #endif
00065
00066 #if defined(RECLS_PURE_API) || \
00067 defined(RECLS_PLATFORM_IS_UNIX)
00068 # include <time.h>
00069 # include <sys/types.h>
00070 #elif defined(RECLS_PLATFORM_IS_WIN32)
00071 # include <windows.h>
00072 #elif defined(RECLS_OVERRIDE_PLATFORM)
00073
00074 #else
00075 # error Platform not (yet) recognised
00076 #endif
00077
00078
00079
00080
00081
00082 #if !defined(RECLS_NO_NAMESPACE)
00083 namespace recls
00084 {
00085 #endif
00086
00087
00088
00089
00090
00100 #if defined(RECLS_PURE_API) || \
00101 defined(RECLS_PLATFORM_IS_UNIX)
00102
00103 typedef time_t recls_time_t;
00104 typedef off_t recls_filesize_t;
00105
00106 #elif defined(RECLS_PLATFORM_IS_WIN32)
00107
00108 typedef FILETIME recls_time_t;
00109 typedef ULARGE_INTEGER recls_filesize_t;
00110
00111 #elif defined(RECLS_OVERRIDE_PLATFORM)
00112
00113 # ifndef RECLS_CUSTOM_TIME_T
00114 # error Must define RECLS_CUSTOM_TIME_T if compiling with RECLS_OVERRIDE_PLATFORM
00115 # endif
00116
00117 # ifndef RECLS_CUSTOM_FILESIZE_T
00118 # error Must define RECLS_CUSTOM_FILESIZE_T if compiling with RECLS_OVERRIDE_PLATFORM
00119 # endif
00120
00121 typedef RECLS_CUSTOM_TIME_T recls_time_t;
00122 typedef RECLS_CUSTOM_FILESIZE_T recls_filesize_t;
00123
00124 #else
00125
00126 # error Platform not (yet) recognised
00127
00128 typedef <platform-dependent-type> recls_time_t;
00129 typedef <platform-dependent-type> recls_filesize_t;
00130
00131 #endif
00132
00133
00134
00135
00136
00137 #if defined(_UNICODE) && \
00138 !defined(UNICODE)
00139 # define UNICODE
00140 #endif
00141
00142 #if defined(UNICODE) && \
00143 !defined(_UNICODE)
00144 # define _UNICODE
00145 #endif
00146
00147 #ifdef RECLS_CHAR_TYPE_IS_CHAR
00148 # undef RECLS_CHAR_TYPE_IS_CHAR
00149 #endif
00150
00151 #ifdef RECLS_CHAR_TYPE_IS_WCHAR
00152 # undef RECLS_CHAR_TYPE_IS_WCHAR
00153 #endif
00154
00156 #if defined(UNICODE) && \
00157 !defined(RECLS_NO_UNICODE)
00158 typedef recls_char_w_t recls_char_t;
00159 # define RECLS_CHAR_TYPE_IS_WCHAR
00160 # define RECLS_LITERAL(x) L ## x
00161 #else
00162 typedef recls_char_a_t recls_char_t;
00163 # define RECLS_CHAR_TYPE_IS_CHAR
00164 # define RECLS_LITERAL(x) x
00165 #endif
00166
00167
00169 struct recls_strptrs_t
00170 {
00172 recls_char_t const *begin;
00174 recls_char_t const *end;
00175 };
00176
00178 struct recls_strptrsptrs_t
00179 {
00181 struct recls_strptrs_t const *begin;
00183 struct recls_strptrs_t const *end;
00184 };
00185
00190 #if !defined(RECLS_PURE_API)
00191 struct recls_fileinfo_t
00192 {
00196 recls_uint32_t attributes;
00204 struct recls_strptrs_t path;
00205 # if defined(RECLS_PLATFORM_IS_WIN32)
00206
00211 struct recls_strptrs_t shortFile;
00213 recls_char_t drive;
00214 # endif
00215
00219 struct recls_strptrs_t directory;
00224 struct recls_strptrs_t fileName;
00229 struct recls_strptrs_t fileExt;
00234 struct recls_strptrsptrs_t directoryParts;
00238 # if defined(RECLS_PLATFORM_IS_WIN32)
00239
00243 recls_time_t creationTime;
00244 # endif
00245
00246 recls_time_t modificationTime;
00248 recls_time_t lastAccessTime;
00249 # if defined(RECLS_PLATFORM_IS_UNIX)
00250
00254 recls_time_t lastStatusChangeTime;
00255 # endif
00256
00260 recls_filesize_t size;
00268 struct recls_strptrs_t searchDirectory;
00272 struct recls_strptrs_t searchRelativePath;
00274 #ifndef RECLS_DOCUMENTATION_SKIP_SECTION
00275
00277 recls_uint64_t checkSum;
00279 recls_uint32_t extendedFlags[2];
00285 recls_byte_t data[1];
00286
00287
00288
00289
00290
00291
00292 #endif
00293 };
00294 #endif
00295
00296
00297
00298
00299
00300 #if !defined(RECLS_NO_NAMESPACE)
00301 }
00302 #endif
00303
00304
00305
00306 #endif
00307
00308