Source code of Windows XP (NT5)
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.

103 lines
2.2 KiB

  1. #ifndef __CONFIG_H__
  2. #define __CONFIG_H__
  3. #include "tchar.h"
  4. #include "stdio.h"
  5. #define MAX_KEYSIZE 1024
  6. #define MAX_GENERAL (128)
  7. #define MAX_PARAMS (128)
  8. #define MAX_BLOCKOUT (128)
  9. #define MAX_DHCP (128)
  10. #define MAX_SERVERS (1024)
  11. #define MAX_IPADDRESS 32
  12. #define MAX_STRLEN 256
  13. // return flags from SaveConfig
  14. #define SAVE_SUCCEDED 0x00
  15. #define BINDINGS_NEEDED 0x01
  16. #define ICSENABLETOGGLED 0x02
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CConfig window
  19. class CConfig
  20. {
  21. // Construction
  22. public:
  23. CConfig();
  24. // Attributes
  25. public:
  26. // Operations
  27. public:
  28. // Implementation
  29. public:
  30. TCHAR m_ExternalAdapterDesc[MAX_STRLEN];
  31. TCHAR m_InternalAdapterDesc[MAX_STRLEN];
  32. TCHAR m_ExternalAdapterReg[MAX_STRLEN];
  33. TCHAR m_InternalAdapterReg[MAX_STRLEN];
  34. TCHAR m_DialupEntry[MAX_STRLEN];
  35. TCHAR m_HangupTimer[MAX_STRLEN];
  36. BOOL m_bWizardRun; // TRUE if Wizard changed settings, FALSE if config UI did
  37. BOOL m_EnableICS;
  38. BOOL m_EnableDialOnDemand;
  39. BOOL m_EnableDHCP;
  40. BOOL m_ShowTrayIcon;
  41. // returns BINDINGS_NEEDED if rebindings are needed, otherwise SAVE_SUCCEDED.
  42. int SaveConfig();
  43. // writes the run code to the registry. bWizardRun should be TRUE if the wizard was run, or FALSE if the config
  44. // dlg was run
  45. void WriteWizardCode(BOOL bWizardRun);
  46. void InitWizardResult();
  47. void WizardCancelled();
  48. void WizardFailed();
  49. void LoadConfig();
  50. // old values to determing if rebind is needed at save
  51. TCHAR m_OldExternalAdapterReg[MAX_STRLEN];
  52. TCHAR m_OldInternalAdapterReg[MAX_STRLEN];
  53. TCHAR m_OldDialupEntry[MAX_STRLEN];
  54. BOOL m_bOldEnableICS;
  55. int m_nGeneral;
  56. TCHAR* m_General[MAX_GENERAL];
  57. int m_nParams;
  58. TCHAR* m_Params[MAX_PARAMS];
  59. int m_nBlockOut;
  60. TCHAR* m_BlockOut[MAX_BLOCKOUT];
  61. int m_nDhcp;
  62. TCHAR* m_Dhcp[MAX_DHCP];
  63. int m_nServers;
  64. TCHAR* m_Servers[MAX_SERVERS];
  65. virtual ~CConfig();
  66. // Generated message map functions
  67. protected:
  68. };
  69. /////////////////////////////////////////////////////////////////////////////
  70. #endif // __CONFIG_H__