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.

109 lines
2.7 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright(C) 2000 Microsoft Corporation all rights reserved.
  4. //
  5. // Module: ProxyServerHelper.h
  6. //
  7. // Project: Windows 2000 IAS
  8. //
  9. // Description: CProxyServerHelper class
  10. //
  11. // Author: tperraut
  12. //
  13. // Revision 02/24/2000 created
  14. //
  15. /////////////////////////////////////////////////////////////////////////////
  16. #ifndef _PROXYSERVERPHELPER_H_6ABCB440_15A3_45d6_92FB_627EBF5C4C6F
  17. #define _PROXYSERVERPHELPER_H_6ABCB440_15A3_45d6_92FB_627EBF5C4C6F
  18. #if _MSC_VER > 1000
  19. #pragma once
  20. #endif // _MSC_VER > 1000
  21. #include <vector>
  22. #include "globaldata.h"
  23. class CStringUuid
  24. {
  25. public:
  26. CStringUuid();
  27. ~CStringUuid() throw();
  28. const wchar_t* GetUuid() throw();
  29. private:
  30. wchar_t* stringUuid;
  31. CStringUuid& operator=(const CStringUuid& P);
  32. CStringUuid(const CStringUuid& P);
  33. };
  34. class CProxyServerHelper
  35. {
  36. public:
  37. explicit CProxyServerHelper(
  38. CGlobalData& GlobalData
  39. );
  40. void CreateUniqueName();
  41. void SetName(const _bstr_t& Name);
  42. void SetAccountingPort(LONG Port);
  43. void SetAccountingSecret(const _bstr_t& Secret);
  44. void SetAuthenticationPort(LONG Port);
  45. void SetAuthenticationSecret(const _bstr_t& Secret);
  46. void SetAddress(const _bstr_t& Address);
  47. void SetForwardAccounting(BOOL bOn);
  48. void SetWeight(LONG Weight);
  49. void SetPriority(LONG Priority);
  50. void SetBlackoutInterval(LONG Interval);
  51. void SetMaximumLostPackets(LONG MaxLost);
  52. void SetTimeout(LONG Timeout);
  53. void Persist(LONG Parent);
  54. CProxyServerHelper& operator=(const CProxyServerHelper& P);
  55. CProxyServerHelper(const CProxyServerHelper& P);
  56. private:
  57. struct Properties
  58. {
  59. const WCHAR* Name;
  60. LONG Type;
  61. };
  62. static const Properties c_DefaultProxyServerProperties[];
  63. static const unsigned int c_NbDefaultProxyServerProperties;
  64. static const long MAX_LONG_SIZE = 14;
  65. enum _ArrayPosition
  66. {
  67. ACCT_PORT_POS,
  68. ACCT_SECRET_POS,
  69. AUTH_PORT_POS,
  70. AUTH_SECRET_POS,
  71. ADDRESS_POS,
  72. FORWARD_ACCT_POS,
  73. PRIORITY_POS,
  74. WEIGHT_POS,
  75. TIMEOUT_POS,
  76. MAX_LOST_PACKETS_POS,
  77. BLACKOUT_POS
  78. };
  79. struct _PropertiesArray
  80. {
  81. _bstr_t Name;
  82. LONG Type;
  83. _bstr_t StrVal;
  84. };
  85. typedef std::vector<_PropertiesArray> PropertiesArray;
  86. CGlobalData& m_GlobalData;
  87. _bstr_t m_Name;
  88. PropertiesArray m_PropArray;
  89. };
  90. #endif // _PROXYSERVERPHELPER_H_6ABCB440_15A3_45d6_92FB_627EBF5C4C6F