1
0

settings.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #pragma once
  2. #include "config.h"
  3. class Settings
  4. {
  5. public:
  6. Settings(void);
  7. ~Settings(void);
  8. public:
  9. void SetPath(wchar_t *iniPath);
  10. BOOL Load(void);
  11. BOOL Save(void);
  12. BOOL CreateDefault(wchar_t* iniPath);
  13. BOOL IsOk(void);
  14. const wchar_t* GetPath(void);
  15. protected:
  16. void CreateStrCopy(wchar_t **dest, const wchar_t* source);
  17. private:
  18. ConfigW cfg;
  19. wchar_t* path;
  20. public:
  21. // general
  22. BOOL updatePath;
  23. BOOL createDMP;
  24. BOOL createLOG;
  25. BOOL autoRestart;
  26. BOOL silentMode;
  27. BOOL sendData;
  28. //zip
  29. BOOL zipData;
  30. wchar_t* zipPath;
  31. // send
  32. BOOL sendByClient;
  33. BOOL sendBySMTP;
  34. int smtpPort;
  35. wchar_t *smtpServer;
  36. wchar_t *smtpAddress;
  37. BOOL smtpAuth;
  38. wchar_t *smtpUser;
  39. wchar_t *smtpPwd;
  40. // dump
  41. int dumpType;
  42. wchar_t *dumpPath;
  43. // log
  44. BOOL logSystem;
  45. BOOL logRegistry;
  46. BOOL logStack;
  47. BOOL logModule;
  48. wchar_t *logPath;
  49. // tmp
  50. void ClearTempData(void);
  51. void WriteErrorTS(const wchar_t *time);
  52. void WriteLogCollectResult(BOOL result);
  53. void WriteDmpCollectResult(BOOL result);
  54. void WriteWinamp(const wchar_t *winamp);
  55. void WriteBody(const wchar_t *body);
  56. const wchar_t* ReadErrorTS(void);
  57. BOOL ReadLogCollectResult(void);
  58. BOOL ReadDmpCollectResult(void);
  59. const wchar_t* ReadWinamp(void);
  60. const wchar_t* ReadBody(void);
  61. };