FireBirdLib - Topfield TMS PVR TAP Programming Library
SDS.c File Reference
#include <string.h>
#include "FBLib_shutdown.h"
#include "libFireBird.h"

Go to the source code of this file.

Data Structures

struct  tEventQueue
 
struct  tEventQueueDetails
 

Macros

#define ROOTDIR   "/ProgramFiles/Settings/SDS"
 
#define LOGFILE   "SDS.log"
 

Enumerations

enum  tHookHandlerState {
  HHS_Init , HHS_Idle , HHS_EF00Received , HHS_PowerOffCancel ,
  HHS_ShutdownTimerDiags , HHS_Shutdown , HHS_Exit
}
 

Functions

void CreateRootDir (void)
 
void WriteLog (char *s)
 
void Hooked_ApplEvent_CallHandler (unsigned int a1, unsigned int a2)
 
bool SetHandler (dword EventID, void *Handler, void **OrigHandler)
 
bool SDS (void)
 
void SDSTerminate (void)
 

Variables

void(* __DevFront_PowerOffReply )(void) = NULL
 
void(* __DevFront_PowerOffCancel )(void) = NULL
 
bool ShutdownHooked = FALSE
 
int LastStatus = 0
 
char Log [512]
 
tHookHandlerState HookHandlerState = HHS_Init
 
void(* OrigHandler )(word, dword)
 

Macro Definition Documentation

◆ LOGFILE

#define LOGFILE   "SDS.log"

Definition at line 6 of file SDS.c.

◆ ROOTDIR

#define ROOTDIR   "/ProgramFiles/Settings/SDS"

Definition at line 5 of file SDS.c.

Enumeration Type Documentation

◆ tHookHandlerState

Enumerator
HHS_Init 
HHS_Idle 
HHS_EF00Received 
HHS_PowerOffCancel 
HHS_ShutdownTimerDiags 
HHS_Shutdown 
HHS_Exit 

Definition at line 8 of file SDS.c.

Function Documentation

◆ CreateRootDir()

void CreateRootDir ( void  )

Definition at line 45 of file SDS.c.

References HDD_ChangeDir(), HDD_TAP_PopDir(), HDD_TAP_PushDir(), TRACEENTER, and TRACEEXIT.

Referenced by SDS().

◆ Hooked_ApplEvent_CallHandler()

void Hooked_ApplEvent_CallHandler ( unsigned int  a1,
unsigned int  a2 
)

Definition at line 68 of file SDS.c.

References ShutdownHooked, TRACEENTER, and TRACEEXIT.

Referenced by SDS().

◆ SDS()

◆ SDSTerminate()

void SDSTerminate ( void  )

◆ SetHandler()

bool SetHandler ( dword  EventID,
void *  Handler,
void **  OrigHandler 
)

◆ WriteLog()

void WriteLog ( char *  s)

Definition at line 60 of file SDS.c.

References HDD_TAP_PopDir(), HDD_TAP_PushDir(), LogEntry(), LOGFILE, ROOTDIR, and TIMESTAMP_YMDHMS.

Referenced by SDS(), SDSTerminate(), and SetHandler().

Variable Documentation

◆ __DevFront_PowerOffCancel

void(* __DevFront_PowerOffCancel) (void) ( void  ) = NULL

Definition at line 36 of file SDS.c.

Referenced by SDS().

◆ __DevFront_PowerOffReply

void(* __DevFront_PowerOffReply) (void) ( void  ) = NULL

Definition at line 35 of file SDS.c.

Referenced by SDS().

◆ HookHandlerState

tHookHandlerState HookHandlerState = HHS_Init

Definition at line 41 of file SDS.c.

Referenced by SDS(), and SDSTerminate().

◆ LastStatus

int LastStatus = 0

Definition at line 39 of file SDS.c.

Referenced by SDS(), SDSTerminate(), and SetHandler().

◆ Log

char Log[512]

Definition at line 40 of file SDS.c.

Referenced by SDS(), and SetHandler().

◆ OrigHandler

void(* OrigHandler) (word, dword) ( word  ,
dword   
)

Definition at line 43 of file SDS.c.

Referenced by SDS(), SDSTerminate(), and SetHandler().

◆ ShutdownHooked

bool ShutdownHooked = FALSE

Definition at line 38 of file SDS.c.

Referenced by Hooked_ApplEvent_CallHandler(), and SDS().