AppCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions | Variables
cardeventreader.h File Reference
#include "appcore/cardevent/cardeventidxfilemanager.h"
#include "appcore/cardevent/cardeventdatfilemanager.h"
#include "appcore/cardevent/eventpurse.h"
#include "appcore/cardevent/EventPrepaidTicket.h"
#include "appcore/cardevent/eventblacklist.h"
#include "appcore/cardevent/EventPrepaidTicketZone.h"
#include "appcore/cardevent/EventPrepaidTicketRange.h"
#include "appcore/cardevent/deletedevent.h"
#include "appcore/cardevent/EventProlongPrepaidTicket.h"
#include <stdint.h>
Include dependency graph for cardeventreader.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 CardEventReader ()
 
 ~CardEventReader ()
 
void Init (__ESTRING path)
 
CardEventCol __EDATAPTR GetEvents (long long SNR)
 
CardEventCol __EDATAPTR GetEvents (__EBYTEARR __EDATAPTR idx_dat_FileBuffer)
 
static void GetIdxDatMemPtrs (__EBYTEARR __EDATAPTR idx_dat_FileBuffer, __EBYTEARR __EDATAPTR __EVALREF idxFileBuffer, __EBYTEARR __EDATAPTR __EVALREF datFileBuffer, uint32_t __EVALREF idxFileSize, uint32_t __EVALREF datFileSize)
 
unsigned long GetValidFrom ()
 
unsigned long GetValidTo ()
 
unsigned long GetMaxCardEventID ()
 
char GetEventFileVersion ()
 
static char GetEventFileVersion (__ESTRING path)
 
long GetEventsCount ()
 
char GetFileType ()
 

Variables

__ECLASS CardEventReaderPr
 
__EPUBLIC __ECLASS LIBCARDEVENT_API CardEventReader
 The main class of cardevent library. It provides functionality for manipulating with event files. More...
 

Function Documentation

CardEventReader ( )
char GetEventFileVersion ( )

Returns event file version

Returns
char - event file version
static char GetEventFileVersion ( __ESTRING  path)
static

Returns event file version Function provided for convenience

Parameters
path: string - absolute path to event files without any extension. ( e.g. /tmp/events )
Returns
char - event file version
CardEventCol __EDATAPTR GetEvents ( long long  SNR)

Looks for events

Parameters
SNR: long long - card serial number (or -1 for all events)
Returns
CardEventCol - collection of events for specified card
CardEventCol __EDATAPTR GetEvents ( __EBYTEARR __EDATAPTR  idx_dat_FileBuffer)

Looks for events

Parameters
idx_dat_FileBuffer: data stream - event file data
Returns
CardEventCol - collection of events for specified card
long GetEventsCount ( )

Returns event count

Returns
long : event count
char GetFileType ( )

Returns file type for internal use

See also
CardEventCreator::SetFileType
Returns
char - file type
static void GetIdxDatMemPtrs ( __EBYTEARR __EDATAPTR  idx_dat_FileBuffer,
__EBYTEARR __EDATAPTR __EVALREF  idxFileBuffer,
__EBYTEARR __EDATAPTR __EVALREF  datFileBuffer,
uint32_t __EVALREF  idxFileSize,
uint32_t __EVALREF  datFileSize 
)
static

Splits combined event file to .idx and .dat parts

Parameters
idx_dat_FileBuffer: data stream - combined event file data
idxFileBuffer: data stream [output] - index event file data
datFileBuffer: data stream [output] - event file data
idxFileSize: unsigned long [output] - size of index event file
datFileSize: unsigned long [output] - size of event file
unsigned long GetMaxCardEventID ( )

Returns the highest event ID in event file

Returns
unsigned long - event ID
unsigned long GetValidFrom ( )

Returns beginning of event file validity

Returns
unsigned long - event file validity as unix timestamp (number of seconds since January 1st, 1970)
unsigned long GetValidTo ( )

Returns end of event file validity

Returns
unsigned long - event file validity as unix timestamp (number of seconds since January 1st, 1970)
void Init ( __ESTRING  path)

Initialize the reader

Parameters
path: string - absolute path to event files without any extension. ( e.g. /tmp/events )

Variable Documentation

Initial value:
{
private:
EEventTripTicketPr __EDATAPTR d
Definition: EEventTripTicket.h:96
#define __EDATAPTR
Definition: managed_defines.h:14
__ECLASS CardEventReaderPr
Definition: cardeventreader.h:15

The main class of cardevent library. It provides functionality for manipulating with event files.

Before using it has to be initialized by calling Init method and providing path to event files - this path is supposed not to contain file extension (.dat or .idx shall be added internally)

__ECLASS CardEventReaderPr