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.

227 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. static HRESULT VerifyClientKey(void);
  57. HRESULT Load ( BSTR a_Clsid ) ;
  58. HRESULT Save ( BSTR a_Clsid ) ;
  59. HRESULT Delete ( BSTR a_Clsid ) ;
  60. HRESULT GetResult () { return m_Result ; }
  61. DWORD GetProcessIdentifier () { return m_ProcessIdentifier ; }
  62. BSTR GetProvider () { return m_Provider ; }
  63. BSTR GetLocale () { return m_Locale ; }
  64. BSTR GetUser () { return m_User ; }
  65. BSTR GetScope () { return m_Scope ; }
  66. BSTR GetCreationTime () { return m_CreationTime ; }
  67. BSTR GetClsid () { return m_Clsid ; }
  68. BYTE *GetMarshaledProxy () { return m_MarshaledProxy ; }
  69. DWORD GetMarshaledProxyLength () { return m_MarshaledProxyLength ; }
  70. HRESULT SetProcessIdentifier ( DWORD a_ProcessIdentifier ) ;
  71. HRESULT SetProvider ( BSTR a_Provider ) ;
  72. HRESULT SetLocale ( BSTR a_Locale ) ;
  73. HRESULT SetUser ( BSTR a_User ) ;
  74. HRESULT SetScope ( BSTR a_Scope ) ;
  75. HRESULT SetCreationTime ( BSTR a_CreationTime ) ;
  76. HRESULT SetClsid ( const BSTR a_Clsid ) ;
  77. HRESULT SetMarshaledProxy ( BYTE *a_MarshaledProxy , DWORD a_MarshaledProxyLength ) ;
  78. } ;
  79. /******************************************************************************
  80. *
  81. * Name:
  82. *
  83. *
  84. * Description:
  85. *
  86. *
  87. *****************************************************************************/
  88. class CServerObject_DecoupledClientRegistration
  89. {
  90. private:
  91. LONG m_ReferenceCount ;
  92. private:
  93. WmiQueue < CServerObject_DecoupledClientRegistration_Element , 8 > m_Queue ;
  94. protected:
  95. HRESULT m_Result ;
  96. protected:
  97. static LPCWSTR s_Strings_Reg_Null ;
  98. static LPCWSTR s_Strings_Reg_Home ;
  99. static LPCWSTR s_Strings_Reg_HomeClient ;
  100. public: /* Internal */
  101. CServerObject_DecoupledClientRegistration ( WmiAllocator &a_Allocator ) ;
  102. ~CServerObject_DecoupledClientRegistration () ;
  103. ULONG AddRef () ;
  104. ULONG Release () ;
  105. HRESULT Load () ;
  106. HRESULT Load (
  107. BSTR a_Provider ,
  108. BSTR a_User ,
  109. BSTR a_Locale ,
  110. BSTR a_Scope
  111. ) ;
  112. static LPCWSTR getClientKey(void) { return s_Strings_Reg_HomeClient;}
  113. WmiQueue < CServerObject_DecoupledClientRegistration_Element , 8 > &GetQueue () { return m_Queue ; }
  114. } ;
  115. /******************************************************************************
  116. *
  117. * Name:
  118. *
  119. *
  120. * Description:
  121. *
  122. *
  123. *****************************************************************************/
  124. class CServerObject_DecoupledServerRegistration
  125. {
  126. private:
  127. LONG m_ReferenceCount ;
  128. private:
  129. protected:
  130. HRESULT m_Result ;
  131. DWORD m_ProcessIdentifier ;
  132. BSTR m_CreationTime ;
  133. BYTE *m_MarshaledProxy ;
  134. DWORD m_MarshaledProxyLength ;
  135. protected:
  136. static LPCWSTR s_Strings_Reg_Null ;
  137. static LPCWSTR s_Strings_Reg_Home ;
  138. static LPCWSTR s_Strings_Reg_HomeServer ;
  139. static LPCWSTR s_Strings_Reg_CreationTime ;
  140. static LPCWSTR s_Strings_Reg_ProcessIdentifier ;
  141. static LPCWSTR s_Strings_Reg_MarshaledProxy ;
  142. void Clear () ;
  143. HRESULT Validate () ;
  144. public: /* Internal */
  145. CServerObject_DecoupledServerRegistration ( WmiAllocator &a_Allocator ) ;
  146. ~CServerObject_DecoupledServerRegistration () ;
  147. ULONG AddRef () ;
  148. ULONG Release () ;
  149. HRESULT Load () ;
  150. HRESULT Save () ;
  151. HRESULT Delete () ;
  152. HRESULT GetResult () { return m_Result ; }
  153. DWORD GetProcessIdentifier () { return m_ProcessIdentifier ; }
  154. BSTR GetCreationTime () { return m_CreationTime ; }
  155. BYTE *GetMarshaledProxy () { return m_MarshaledProxy ; }
  156. DWORD GetMarshaledProxyLength () { return m_MarshaledProxyLength ; }
  157. HRESULT SetProcessIdentifier ( DWORD a_ProcessIdentifier ) ;
  158. HRESULT SetCreationTime ( BSTR a_CreationTime ) ;
  159. HRESULT SetMarshaledProxy ( BYTE *a_MarshaledProxy , DWORD a_MarshaledProxyLength ) ;
  160. };
  161. #endif // _Server_ProviderRegistrationDecoupled_H