Synesis Software STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ...

pantheios/backends/bec.file.h File Reference


Detailed Description

[C, C++] Pantheios file Back-end Common API

#include <pantheios/pantheios.h>
#include <pantheios/backend.h>

Go to the source code of this file.

Classes

struct  pan_be_file_init_t
 Structure used for specifying initialisation information to the be.file library. More...

Defines

#define PANTHEIOS_BE_FILE_F_TRUNCATE   (0x00100000)
 Causes the Pantheios file Stock Back-end to truncate the log file.
#define PANTHEIOS_BE_FILE_F_DISCARD_CACHED_CONTENTS   (0x00200000)
 Causes any log statements cached in the Pantheios file Stock Back-end prior to assignment of the file name (via pantheios_be_file_setFilePath()) to be discarded.
#define PANTHEIOS_BE_FILE_F_SHARE_ON_WINDOWS   (0x00400000)
 By default, logging on Windows takes a write-exclusive lock on the log file.
#define PANTHEIOS_BE_FILE_F_WRITE_WIDE_CONTENTS   (0x00800000)
 By default, files are written in wide or multibyte string encoding according to the encoding of the build: e.g.
#define PANTHEIOS_BE_FILE_F_WRITE_MULTIBYTE_CONTENTS   (0x00080000)
 By default, files are written in wide or multibyte string encoding according to the encoding of the build: e.g.
#define PANTHEIOS_BE_FILE_F_DELETE_IF_EMPTY   (0x00040000)
 Specifying this flag causes the log file to be deleted, if and only if it is empty, when it is closed (which occurs during back-end uninitialisation (at program exit), or when another file path is specified, for the given back-end, via pantheios_be_file_setFilePath()).
#define PANTHEIOS_BE_FILE_MAX_FILE_LEN   (1000)
 The maximum length of a file path that can be specified in a pan_be_file_init_t instance using the internal buffer (pan_be_file_init_t::buff).

Functions

void pantheios_be_file_getAppInit (int backEndId, pan_be_file_init_t *init)
 Callback function defined by the application, invoked when the API is initialised with a NULL init parameter.
void pantheios_be_file_getDefaultAppInit (pan_be_file_init_t *init)
 Fills out a copy of the initialisation structure with default values (representative of the default behaviour of the library), ready to be customised and passed to the API initialiser function pantheios_be_file_init().
int pantheios_be_file_init (PAN_CHAR_T const *processIdentity, int id, pan_be_file_init_t const *init, void *reserved, void **ptoken)
 Implements the functionality for pantheios_be_init() over the file API.
void pantheios_be_file_uninit (void *token)
 Implements the functionality for pantheios_be_uninit() over the file API.
int pantheios_be_file_logEntry (void *feToken, void *beToken, int severity, PAN_CHAR_T const *entry, size_t cchEntry)
 Implements the functionality for pantheios_be_logEntry() over the file API.
int pantheios_be_file_setFilePath (PAN_CHAR_T const *fileName, pan_be_file_init_t::pan_uint32_t fileMask, pan_be_file_init_t::pan_uint32_t fileFlags, int backEndId)
 Sets/changes the log file name for a single back-end.
int pantheios_be_file_setFilePath (PAN_CHAR_T const *fileName)
 Sets/changes the log file name for all back-ends.
int pantheios_be_file_setFilePath (PAN_CHAR_T const *fileName, int backEndId)
 Sets/changes the log file name for all back-ends.
int pantheios_be_file_flush (int backEndId)
 Flushes one/all back-ends.
int pantheios_be_file_parseArgs (size_t numArgs, pantheios::pan_slice_t *const args, pan_be_file_init_t *init)
 Parses the be.file back-end flags.


Define Documentation

#define PANTHEIOS_BE_FILE_MAX_FILE_LEN   (1000)

The maximum length of a file path that can be specified in a pan_be_file_init_t instance using the internal buffer (pan_be_file_init_t::buff).

File paths exceeding this size must be represented in caller-side memory (i.e. pan_be_file_init_t::fileName != &pan_be_file_init_t::buff[0]).


Function Documentation

void pantheios_be_file_getDefaultAppInit ( pan_be_file_init_t init  ) 

Fills out a copy of the initialisation structure with default values (representative of the default behaviour of the library), ready to be customised and passed to the API initialiser function pantheios_be_file_init().


pantheios Library documentation © Matthew Wilson & Synesis Software, 2006-2011 SourceForge.net Logo