Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.6 KiB

  1. // File: history.h
  2. #ifndef _HISTORY_H_
  3. #define _HISTORY_H_
  4. #include "calv.h"
  5. // The header for a record in the call log file
  6. typedef struct _tagLogHdr {
  7. DWORD dwSize; // size of this entire record
  8. DWORD dwCLEF; // CallLogEntry Flags (CLEF_*)
  9. DWORD dwPF; // Participant flags (PF_*)
  10. DWORD cbName; // size of szName, in bytes, including NULL
  11. DWORD cbData; // size of rgData, in bytes
  12. DWORD cbCert; // size of certificate, in bytes
  13. SYSTEMTIME sysTime; // date/time of record creation
  14. // WCHAR szName; // null terminated display name (in UNICODE)
  15. // BYTE ri[]; // Roster Information
  16. } LOGHDR;
  17. class CHISTORY : public CALV
  18. {
  19. private:
  20. HANDLE m_hFile;
  21. LPTSTR m_pszFile;
  22. int
  23. Compare
  24. (
  25. LPARAM param1,
  26. LPARAM param2
  27. );
  28. static
  29. int
  30. CALLBACK
  31. StaticCompare
  32. (
  33. LPARAM param1,
  34. LPARAM param2,
  35. LPARAM pThis
  36. );
  37. public:
  38. CHISTORY();
  39. ~CHISTORY();
  40. VOID CmdDelete(void);
  41. VOID CmdProperties(void);
  42. // CALV methods
  43. VOID ShowItems(HWND hwnd);
  44. VOID ClearItems(void);
  45. VOID OnCommand(WPARAM wParam, LPARAM lParam);
  46. //
  47. HANDLE OpenLogFile(VOID);
  48. BOOL FSetFilePos(DWORD dwOffset);
  49. BOOL FReadData(PVOID pv, UINT cb);
  50. HRESULT ReadEntry(DWORD dwOffset, LOGHDR * pLogHdr, LPTSTR * ppszName, LPTSTR * ppszAddress);
  51. VOID LoadFileData(HWND hwnd);
  52. HRESULT WriteData(LPDWORD pdwOffset, PVOID pv, DWORD cb);
  53. HRESULT DeleteEntry(DWORD dwOffset);
  54. UINT GetStatusString(DWORD dwCLEF);
  55. };
  56. #endif /* _HISTORY_H_ */