#ifndef _MAIN_H #define _MAIN_H #include #include #ifndef WIN32 #include #endif //#include #ifndef NULL #define NULL 0 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif typedef unsigned char BYTE, *PBYTE; typedef char *PSTR; typedef const char *PCSTR; typedef void *PVOID; #define TL_SESSION 64 #define TL_FILENAME 4096 #ifndef MAX_PATH #define MAX_PATH 256 #endif struct get_transfer_log{ char volumeid[32]; char sessionkey[TL_SESSION + 1]; /* null string is always error */ time_t startdate; /* 0 is ignore date value */ time_t enddate; /* 0 is ignore date value */ char is_delete; /* Y,y is delete when get, Otherwise is not delete */ char direction; /* U,u is upload, D,d is download, Otherwise both */ }; #ifdef WIN32 #include #else #include #include #include #include #include #include #include #include #include #include typedef int SOCKET; typedef int __int32; typedef long long __int64; typedef char BOOL; typedef struct sockaddr SOCKADDR; #define INVALID_SOCKET -1 #define SOCKET_ERROR -1 #define closesocket(a) close(a) #define GetLastError() errno void SetLastError(int nErrCode); #endif time_t get_time_from_sntp(); #endif