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.

84 lines
2.7 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright(C) 2000 Microsoft Corporation all rights reserved.
  4. //
  5. // Module: DefaultProvider.H
  6. //
  7. // Project: Windows 2000 IAS
  8. //
  9. // Description:
  10. // Declaration of the CDefaultProvider class
  11. //
  12. // Author: tperraut
  13. //
  14. // Revision 03/15/2000 created
  15. //
  16. /////////////////////////////////////////////////////////////////////////////
  17. #ifndef _DEFAULTPROVIDER_H_1B622442_4568_4fb9_831D_2ECA39B6E7B5
  18. #define _DEFAULTPROVIDER_H_1B622442_4568_4fb9_831D_2ECA39B6E7B5
  19. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif // _MSC_VER > 1000
  22. #include "nocopy.h"
  23. #include "basecommand.h"
  24. //////////////////////////////////////////////////////////////////////////////
  25. // class CDefaultProviderAcc
  26. //////////////////////////////////////////////////////////////////////////////
  27. class CDefaultProviderAcc
  28. {
  29. protected:
  30. static const size_t COLUMN_SIZE = 65;
  31. VARIANT_BOOL m_ForwardAccounting;
  32. VARIANT_BOOL m_LogoutAccounting;
  33. VARIANT_BOOL m_SupressAccounting;
  34. WCHAR m_Profile[COLUMN_SIZE];
  35. WCHAR m_UserDefinedName[COLUMN_SIZE];
  36. BEGIN_COLUMN_MAP(CDefaultProviderAcc)
  37. COLUMN_ENTRY(1, m_UserDefinedName)
  38. COLUMN_ENTRY(2, m_Profile)
  39. COLUMN_ENTRY_TYPE(3, DBTYPE_BOOL, m_ForwardAccounting)
  40. COLUMN_ENTRY_TYPE(4, DBTYPE_BOOL, m_SupressAccounting)
  41. COLUMN_ENTRY_TYPE(5, DBTYPE_BOOL, m_LogoutAccounting)
  42. END_COLUMN_MAP()
  43. DEFINE_COMMAND(CDefaultProviderAcc, L" \
  44. SELECT \
  45. `User Defined Name`, \
  46. szProfile, \
  47. bForwardAccounting, \
  48. bSupressAccounting, \
  49. bLogoutAccounting \
  50. FROM `Default Provider`")
  51. };
  52. //////////////////////////////////////////////////////////////////////////////
  53. // class CDefaultProvider
  54. //////////////////////////////////////////////////////////////////////////////
  55. class CDefaultProvider : public CBaseCommand<CAccessor<CDefaultProviderAcc> >,
  56. private NonCopyable
  57. {
  58. public:
  59. explicit CDefaultProvider(CSession& Session)
  60. {
  61. Init(Session);
  62. }
  63. //////////////////////////////////////////////////////////////////////////
  64. // GetDefaultProvider
  65. //////////////////////////////////////////////////////////////////////////
  66. HRESULT GetDefaultProvider(
  67. _bstr_t& UserDefinedName,
  68. _bstr_t& Profile,
  69. VARIANT_BOOL& ForwardAccounting,
  70. VARIANT_BOOL& SupressAccounting,
  71. VARIANT_BOOL& LogoutAccounting
  72. );
  73. };
  74. #endif // _DEFAULTPROVIDER_H_1B622442_4568_4fb9_831D_2ECA39B6E7B5