#ifndef __API_H__
#define __API_H__

int PlatformInit(void);
int Init_IPMI_FRU_SDR_SEL(void);
int Init_SessionTbl(void);
int InitTimerTaskTbl(void);

int UpdateFlash(void);
int SetSysTime(uint32_t *timeSecond);
long int GetSysTime(void);
#define SET_SYSTEM_TIME_STAMP(time) SetSysTime(time)
#define GET_SYSTEM_TIME_STAMP GetSysTime

int PostEventMessage (uint8_t *EventMsg,uint8_t size);

 uint8_t PDK_GetSlotID(void);
 uint8_t PDK_GetChassisID(void);
 int PDK_PowerOffChassis(void);
 int PDK_PowerOnChassis(void);
 int PDK_SoftOffChassis(void);
 int PDK_GetPowerStatus(void);
 int PDK_PowerCycleChassis(void);
 int PDK_ResetChassis(void);
 int PDK_DiagInterruptChassis(void);
 int PDK_FanControl(void);

char* getip(char *ip_buf);
int setip(char *ip);
char* getnetmask(char *netmask_buf);
char* getbroadcast(char *broadcast_buf);
char* getmac(char *mac_buf);

int FlushUserInfoTbl(void);
int UpdateUserInfoTble(void);
int GetSensorHistoryFromFlash();
int FlushSensorHistoryToFlash();
int GetFRUFromFlash();
int FlushFRUToFlash();
int GetIPMIFromFlash();
int FlushIPMIToFlash();
int GetSELFromFlash();
int FlushSELToFlash();
int GetSDRFromFlash();
int FlushSDRToFlash();
int UpdateFlash(void);

	
int API_BridgeInternal(MsgPkt_T* pReqPkt, MsgPkt_T* pResPkt, uint8_t DestAddr, int Channel);

extern pthread_mutex_t api_bridge_mutex;
extern pthread_mutex_t Flash_Mutex;

#endif /* __API_H__ */