/** * Log manager for virtual terminal in USB memory * * @author sjlee@suprema.co.kr * @see */ /* * Copyright (c) 2006 Suprema Co., Ltd. All Rights Reserved. * * This software is the confidential and proprietary information of * Suprema Co., Ltd. ("Confidential Information"). You shall not * disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into * with Suprema. */ #ifndef __BS_LOG_MANAGER_H__ #define __BS_LOG_MANAGER_H__ #include #include "BS_USBMemory.h" #include "BS_Error.h" #include "BS_Log.h" #define VALID_LOG_FILE 0x1f2f3f4f #define MAX_EVENT_FILTER 16 typedef struct{ int magicNo; int count; int startPos; int currentPos; time_t startTime; time_t currentTime; int numOfLog; } BSLogFileHeader; typedef struct { unsigned id; // o for all time_t startTime; // 0 for from start time_t endTime; // 0 for to the end int numOfEventType; // 0 for all events unsigned char eventType[MAX_EVENT_FILTER]; int numOfTnaEvent; // 0 for all tna events unsigned short tnaEventType[MAX_EVENT_FILTER]; }BSLogFilter; #ifdef __cplusplus extern "C" { #endif int USB_ReadLogHeaderFile( const char* filename, BSLogFileHeader* header ); bool USB_CheckLogFilter( BSLogRecord* logRecord, BSLogFilter* filter ); BS_RET_CODE USB_ReadLogHeader( const char* driveLetter, unsigned id, BSLogFileHeader* header ); BS_RET_CODE USB_ReadLogImpl( const char* driveLetter, unsigned id, BSLogFilter* filter, BSLogRecord* logRecord, int* numOfLog ); #ifdef __cplusplus } #endif #endif