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
00047 #ifndef PANTHEIOS_INCL_PANTHEIOS_BACKENDS_H_BEC_FILE
00048 #define PANTHEIOS_INCL_PANTHEIOS_BACKENDS_H_BEC_FILE
00049
00050
00051
00052
00053
00054 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00055 # define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BEC_FILE_MAJOR 4
00056 # define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BEC_FILE_MINOR 3
00057 # define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BEC_FILE_REVISION 1
00058 # define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BEC_FILE_EDIT 33
00059 #endif
00060
00061
00062
00063
00064
00065 #ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS
00066 # include <pantheios/pantheios.h>
00067 #endif
00068 #ifndef PANTHEIOS_INCL_PANTHEIOS_H_BACKEND
00069 # include <pantheios/backend.h>
00070 #endif
00071
00072
00073
00074
00075
00081
00082
00083
00084
00159 #define PANTHEIOS_BE_FILE_F_TRUNCATE (0x00100000)
00160 #define PANTHEIOS_BE_FILE_F_DISCARD_CACHED_CONTENTS (0x00200000)
00161 #define PANTHEIOS_BE_FILE_F_SHARE_ON_WINDOWS (0x00400000)
00162 #define PANTHEIOS_BE_FILE_F_WRITE_WIDE_CONTENTS (0x00800000)
00163 #define PANTHEIOS_BE_FILE_F_WRITE_MULTIBYTE_CONTENTS (0x00080000)
00164 #define PANTHEIOS_BE_FILE_F_DELETE_IF_EMPTY (0x00040000)
00165
00166 #if 0
00167 #define PANTHEIOS_BE_FILE_F_ROLL_ON_SIZE (0x01000000)
00168 #define PANTHEIOS_BE_FILE_F_ROLL_ON_ENTRY_COUNT (0x02000000)
00169 #define PANTHEIOS_BE_FILE_F_ROLL_ON_DATETIME (0x04000000)
00170
00171 #define PANTHEIOS_BE_FILE_F_ROLL_ON_1MB (0x10000000 | PANTHEIOS_BE_FILE_F_ROLL_ON_SIZE)
00172 #define PANTHEIOS_BE_FILE_F_ROLL_ON_8K_ENTRIES (0x10000000 | PANTHEIOS_BE_FILE_F_ROLL_ON_ENTRY_COUNT)
00173 #define PANTHEIOS_BE_FILE_F_ROLL_ON_DAY (0x10000000 | PANTHEIOS_BE_FILE_F_ROLL_ON_DATETIME)
00174
00175 #define PANTHEIOS_BE_FILE_F_ROLL_TO_SELF (0x20000000)
00176 #endif
00177
00178
00179
00180
00181
00182 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00183 struct Pantheios_be_file_no_longer_defines_the_function_pantheios_be_file_setFileName_and_Use_pantheios_be_file_setFilePath_instead_;
00184 # define Pantheios_be_file_setFileName (_pantheios_be_file_no_longer_defines_the_function_pantheios_be_file_setFileName_and_Use_pantheios_be_file_setFilePath_instead_)
00185 #endif
00186
00187
00188
00189
00190
00199 #define PANTHEIOS_BE_FILE_MAX_FILE_LEN (1000)
00200
00205 struct pan_be_file_init_t
00206 {
00207 #if !defined(PANTHEIOS_DOCUMENTATION_SKIP_SECTION) && \
00208 !defined(PANTHEIOS_NO_NAMESPACE)
00209 typedef pantheios::pan_uint16_t pan_uint16_t;
00210 typedef pantheios::pan_uint32_t pan_uint32_t;
00211 typedef pantheios::pan_uint64_t pan_uint64_t;
00212 #endif
00213
00214 pan_uint32_t version;
00215 pan_uint32_t flags;
00216 PAN_CHAR_T buff[1 + (PANTHEIOS_BE_FILE_MAX_FILE_LEN)];
00217 PAN_CHAR_T const* fileName;
00219 #if 0
00220 union
00221 {
00222 pan_uint64_t fileSizeKB;
00223 pan_uint64_t entryCount;
00224 pan_uint64_t interval;
00226 } roll;
00227 #endif
00228
00229
00230 #ifdef __cplusplus
00231 public:
00232 # ifndef PANTHEIOS_BE_INIT_NO_CPP_STRUCT_INIT
00233 pan_be_file_init_t();
00234 # endif
00235 #endif
00236 };
00237 #ifndef __cplusplus
00238 typedef struct pan_be_file_init_t pan_be_file_init_t;
00239 #endif
00240
00241
00242
00243
00244
00273 PANTHEIOS_CALL(void) pantheios_be_file_getAppInit(
00274 int backEndId
00275 , pan_be_file_init_t* init
00276 ) ;
00277
00278
00279
00280
00281
00287 PANTHEIOS_CALL(void) pantheios_be_file_getDefaultAppInit(
00288 pan_be_file_init_t* init
00289 ) ;
00290
00295 PANTHEIOS_CALL(int) pantheios_be_file_init(
00296 PAN_CHAR_T const* processIdentity
00297 , int id
00298 , pan_be_file_init_t const* init
00299 , void* reserved
00300 , void** ptoken
00301 );
00302
00307 PANTHEIOS_CALL(void) pantheios_be_file_uninit(void* token);
00308
00313 PANTHEIOS_CALL(int) pantheios_be_file_logEntry(
00314 void* feToken
00315 , void* beToken
00316 , int severity
00317 , PAN_CHAR_T const* entry
00318 , size_t cchEntry
00319 );
00320
00347 PANTHEIOS_CALL(int) pantheios_be_file_setFilePath(
00348 PAN_CHAR_T const* fileName
00349 #ifndef PANTHEIOS_NO_NAMESPACE
00350 , pan_be_file_init_t::pan_uint32_t fileMask
00351 , pan_be_file_init_t::pan_uint32_t fileFlags
00352 #else
00353 , pan_uint32_t fileMask
00354 , pan_uint32_t fileFlags
00355 #endif
00356 , int backEndId
00357 );
00358
00359 #ifdef __cplusplus
00360
00369 inline int pantheios_be_file_setFilePath(PAN_CHAR_T const* fileName)
00370 {
00371 return pantheios_be_file_setFilePath(fileName, 0, 0, PANTHEIOS_BEID_ALL);
00372 }
00373
00386 inline int pantheios_be_file_setFilePath(PAN_CHAR_T const* fileName, int backEndId)
00387 {
00388 return pantheios_be_file_setFilePath(fileName, 0, 0, backEndId);
00389 }
00390 #endif
00391
00400 PANTHEIOS_CALL(int) pantheios_be_file_flush(int backEndId);
00401
00430 PANTHEIOS_CALL(int) pantheios_be_file_parseArgs(
00431 size_t numArgs
00432 #ifdef PANTHEIOS_NO_NAMESPACE
00433 , struct pan_slice_t* const args
00434 #else
00435 , pantheios::pan_slice_t* const args
00436 #endif
00437 , pan_be_file_init_t* init
00438 );
00439
00440
00441
00442 #ifdef __cplusplus
00443 # ifndef PANTHEIOS_BE_INIT_NO_CPP_STRUCT_INIT
00444 inline pan_be_file_init_t::pan_be_file_init_t()
00445 {
00446 pantheios_be_file_getDefaultAppInit(this);
00447 }
00448 # endif
00449 #endif
00450
00451
00452
00453 #endif
00454
00455