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.

228 lines
5.3 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. ProvRegInfo.h
  5. Abstract:
  6. History:
  7. --*/
  8. #ifndef _Server_ProviderRegistrationDecoupled_H
  9. #define _Server_ProviderRegistrationDecoupled_H
  10. #include "Queue.h"
  11. #include "DateTime.h"
  12. /******************************************************************************
  13. *
  14. * Name:
  15. *
  16. *
  17. * Description:
  18. *
  19. *
  20. *****************************************************************************/
  21. class CServerObject_DecoupledClientRegistration_Element
  22. {
  23. private:
  24. LONG m_ReferenceCount ;
  25. private:
  26. protected:
  27. HRESULT m_Result ;
  28. DWORD m_ProcessIdentifier ;
  29. BSTR m_Provider ;
  30. BSTR m_Locale ;
  31. BSTR m_User ;
  32. BSTR m_Scope ;
  33. BSTR m_CreationTime ;
  34. BSTR m_Clsid ;
  35. BYTE *m_MarshaledProxy ;
  36. DWORD m_MarshaledProxyLength ;
  37. protected:
  38. static LPCWSTR s_Strings_Reg_Null ;
  39. static LPCWSTR s_Strings_Reg_Home ;
  40. static LPCWSTR s_Strings_Reg_HomeClient ;
  41. static LPCWSTR s_Strings_Reg_CreationTime ;
  42. static LPCWSTR s_Strings_Reg_User ;
  43. static LPCWSTR s_Strings_Reg_Locale ;
  44. static LPCWSTR s_Strings_Reg_Scope ;
  45. static LPCWSTR s_Strings_Reg_Provider;
  46. static LPCWSTR s_Strings_Reg_MarshaledProxy ;
  47. static LPCWSTR s_Strings_Reg_ProcessIdentifier ;
  48. void Clear () ;
  49. HRESULT Validate () ;
  50. public: /* Internal */
  51. CServerObject_DecoupledClientRegistration_Element () ;
  52. ~CServerObject_DecoupledClientRegistration_Element () ;
  53. CServerObject_DecoupledClientRegistration_Element &operator= ( const CServerObject_DecoupledClientRegistration_Element &a_Key ) ;
  54. ULONG AddRef () ;
  55. ULONG Release () ;
  56. HRESULT Load ( BSTR a_Clsid ) ;
  57. HRESULT Save ( BSTR a_Clsid ) ;
  58. HRESULT Delete ( BSTR a_Clsid ) ;
  59. HRESULT GetResult () { return m_Result ; }
  60. DWORD GetProcessIdentifier () { return m_ProcessIdentifier ; }
  61. BSTR GetProvider () { return m_Provider ; }
  62. BSTR GetLocale () { return m_Locale ; }
  63. BSTR GetUser () { return m_User ; }
  64. BSTR GetScope () { return m_Scope ; }
  65. BSTR GetCreationTime () { return m_CreationTime ; }
  66. BSTR GetClsid () { return m_Clsid ; }
  67. BYTE *GetMarshaledProxy () { return m_MarshaledProxy ; }
  68. DWORD GetMarshaledProxyLength () { return m_MarshaledProxyLength ; }
  69. HRESULT SetProcessIdentifier ( DWORD a_ProcessIdentifier ) ;
  70. HRESULT SetProvider ( BSTR a_Provider ) ;
  71. HRESULT SetLocale ( BSTR a_Locale ) ;
  72. HRESULT SetUser ( BSTR a_User ) ;
  73. HRESULT SetScope ( BSTR a_Scope ) ;
  74. HRESULT SetCreationTime ( BSTR a_CreationTime ) ;
  75. HRESULT SetClsid ( const BSTR a_Clsid ) ;
  76. HRESULT SetMarshaledProxy ( BYTE *a_MarshaledProxy , DWORD a_MarshaledProxyLength ) ;
  77. } ;
  78. /******************************************************************************
  79. *
  80. * Name:
  81. *
  82. *
  83. * Description:
  84. *
  85. *
  86. *****************************************************************************/
  87. class CServerObject_DecoupledClientRegistration
  88. {
  89. private:
  90. LONG m_ReferenceCount ;
  91. private:
  92. WmiQueue < CServerObject_DecoupledClientRegistration_Element , 8 > m_Queue ;
  93. protected:
  94. HRESULT m_Result ;
  95. protected:
  96. static LPCWSTR s_Strings_Reg_Null ;
  97. static LPCWSTR s_Strings_Reg_Home ;
  98. static LPCWSTR s_Strings_Reg_HomeClient ;
  99. public: /* Internal */
  100. CServerObject_DecoupledClientRegistration ( WmiAllocator &a_Allocator ) ;
  101. ~CServerObject_DecoupledClientRegistration () ;
  102. ULONG AddRef () ;
  103. ULONG Release () ;
  104. HRESULT Load () ;
  105. HRESULT Load (
  106. BSTR a_Provider ,
  107. BSTR a_User ,
  108. BSTR a_Locale ,
  109. BSTR a_Scope
  110. ) ;
  111. static LPCWSTR getClientKey(void) { return s_Strings_Reg_HomeClient;}
  112. WmiQueue < CServerObject_DecoupledClientRegistration_Element , 8 > &GetQueue () { return m_Queue ; }
  113. } ;
  114. /******************************************************************************
  115. *
  116. * Name:
  117. *
  118. *
  119. * Description:
  120. *
  121. *
  122. *****************************************************************************/
  123. class CServerObject_DecoupledServerRegistration
  124. {
  125. private:
  126. LONG m_ReferenceCount ;
  127. private:
  128. protected:
  129. HRESULT m_Result ;
  130. DWORD m_ProcessIdentifier ;
  131. BSTR m_CreationTime ;
  132. BYTE *m_MarshaledProxy ;
  133. DWORD m_MarshaledProxyLength ;
  134. protected:
  135. static LPCWSTR s_Strings_Reg_Null ;
  136. static LPCWSTR s_Strings_Reg_Home ;
  137. static LPCWSTR s_Strings_Reg_HomeServer ;
  138. static LPCWSTR s_Strings_Reg_CreationTime ;
  139. static LPCWSTR s_Strings_Reg_ProcessIdentifier ;
  140. static LPCWSTR s_Strings_Reg_MarshaledProxy ;
  141. void Clear () ;
  142. HRESULT Validate () ;
  143. public: /* Internal */
  144. CServerObject_DecoupledServerRegistration ( WmiAllocator &a_Allocator ) ;
  145. ~CServerObject_DecoupledServerRegistration () ;
  146. ULONG AddRef () ;
  147. ULONG Release () ;
  148. HRESULT Load () ;
  149. HRESULT Save () ;
  150. HRESULT Delete () ;
  151. HRESULT GetResult () { return m_Result ; }
  152. DWORD GetProcessIdentifier () { return m_ProcessIdentifier ; }
  153. BSTR GetCreationTime () { return m_CreationTime ; }
  154. BYTE *GetMarshaledProxy () { return m_MarshaledProxy ; }
  155. DWORD GetMarshaledProxyLength () { return m_MarshaledProxyLength ; }
  156. HRESULT SetProcessIdentifier ( DWORD a_ProcessIdentifier ) ;
  157. HRESULT SetCreationTime ( BSTR a_CreationTime ) ;
  158. HRESULT SetMarshaledProxy ( BYTE *a_MarshaledProxy , DWORD a_MarshaledProxyLength ) ;
  159. };
  160. #endif // _Server_ProviderRegistrationDecoupled_H