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.

237 lines
9.2 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright(C) 1999 Microsoft Corporation all rights reserved.
  4. //
  5. // Module: applianceobject.idl
  6. //
  7. // Project: Chameleon
  8. //
  9. // Description: Appliance Object Interface
  10. //
  11. // Log:
  12. //
  13. // Who When What
  14. // --- ---- ----
  15. // TLP 01/28/1999 Original Version
  16. //
  17. /////////////////////////////////////////////////////////////////////////////
  18. import "oaidl.idl";
  19. import "ocidl.idl";
  20. //////////////////////////////////////////////////////////////////////////
  21. // IApplianceObject Interface
  22. //////////////////////////////////////////////////////////////////////////
  23. //////////////////////////////////////////////////////////////////////
  24. [public] typedef enum _SA_OBJECT_TYPE
  25. {
  26. SA_OBJECT_TYPE_ALERT,
  27. SA_OBJECT_TYPE_SERVICE,
  28. SA_OBJECT_TYPE_TASK,
  29. SA_OBJECT_TYPE_USER,
  30. SA_OBJECT_TYPE_APPMGR,
  31. // New Object Types Here...
  32. SA_OBJECT_TYPE_ALL
  33. } SA_OBJECT_TYPE, *PSA_OBJECT_TYPE;
  34. //////////////////////////////////////////////////////////////////////
  35. [public] typedef enum _SA_OBJECT_CONTROL
  36. {
  37. SA_OBJECT_CONTROL_CAN_DISABLE = 0x01,
  38. SA_OBJECT_CONTROL_CAN_PERSIST = 0x02,
  39. SA_OBJECT_CONTROL_CAN_LOCK = 0x04,
  40. } SA_OBJECT_CONTROL, *PSA_OBJECT_CONTROL;
  41. //////////////////////////////////////////////////////////////////////
  42. [public] typedef enum _SA_OBJECT_STATUS
  43. {
  44. SA_OBJECT_STATUS_ENABLED,
  45. SA_OBJECT_STATUS_DISABLED
  46. } SA_OBJECT_STATUS, *PSA_OBJECT_STATUS;
  47. //////////////////////////////////////////////////////////////////////////
  48. [
  49. object,
  50. uuid(DC1AE3B0-B818-11D2-A91C-00AA00A71DCA),
  51. dual,
  52. pointer_default(unique)
  53. ]
  54. interface IApplianceObject : IDispatch
  55. {
  56. //////////////////////////////////////////////////////////////////////
  57. //
  58. // Function: GetProperty() - Used to retrieve an appliance object
  59. // property by name.
  60. //
  61. // Inputs: pszPropertyName: Pointer to a basic string containing
  62. // the name of the property to retrieve.
  63. //
  64. // pPropertyValue: Pointer to a variant that will contain
  65. // on output the property value.
  66. //
  67. // Outputs: S_OK: Function succeeded.
  68. //
  69. // E_POINTER: NULL pointer was specified
  70. //
  71. // E_INVALIDARG: Invalid argument was specified
  72. //
  73. // E_OUTOFMEMORY: Not enough memory
  74. //
  75. //////////////////////////////////////////////////////////////////////
  76. [id(1)]
  77. HRESULT GetProperty(
  78. [in] BSTR pszPropertyName,
  79. [out, retval] VARIANT* pPropertyValue
  80. );
  81. //////////////////////////////////////////////////////////////////////
  82. //
  83. // Function: PutProperty() - Used to set an appliance object
  84. // property by name.
  85. //
  86. // Inputs: pszPropertyName: Pointer to a basic string containing
  87. // the name of an object property.
  88. //
  89. // pPropertyValue: Pointer to a variant that contains
  90. // the updated property value.
  91. //
  92. // Outputs: S_OK: Function succeeded.
  93. //
  94. // E_POINTER: NULL pointer was specified
  95. //
  96. // E_INVALIDARG: Invalid argument was specified
  97. //
  98. // E_OUTOFMEMORY: Not enough memory
  99. //
  100. //////////////////////////////////////////////////////////////////////
  101. [id(2)]
  102. HRESULT PutProperty(
  103. [in] BSTR pszPropertyName,
  104. [in] VARIANT* pPropertyValue
  105. );
  106. //////////////////////////////////////////////////////////////////////
  107. //
  108. // Function: SaveProperties() - Used to persist an appliance object's
  109. // state to a persistent store.
  110. //
  111. // Inputs: None
  112. //
  113. // Outputs: S_OK: Function succeeded.
  114. //
  115. // FAILED(hr): Appliance object could not save its
  116. // state. The returned value indicates why
  117. // the operation failed.
  118. //
  119. //////////////////////////////////////////////////////////////////////
  120. [id(3)]
  121. HRESULT SaveProperties(void);
  122. //////////////////////////////////////////////////////////////////////
  123. //
  124. // Function: RestoreProperties() - Used to restore an appliance
  125. // object's state from a persistent
  126. // store.
  127. //
  128. // Inputs: None
  129. //
  130. // Outputs: S_OK: Function succeeded.
  131. //
  132. // FAILED(hr): Appliance object could not save its
  133. // state. The returned value indicates why
  134. // the operation failed.
  135. //
  136. //////////////////////////////////////////////////////////////////////
  137. [id(4)]
  138. HRESULT RestoreProperties(void);
  139. //////////////////////////////////////////////////////////////////////
  140. //
  141. // Function: LockObject() - Used to lock an appliance object for
  142. // exclusive use.
  143. //
  144. // Inputs: ppLock: Pointer to storage for the returned lock
  145. // object. The caller should invoke the
  146. // IUnknown::Release() function on the lock
  147. // when it is finished using the object.
  148. //
  149. // Outputs: S_OK: Function succeeded.
  150. //
  151. // FAILED(hr): Appliance object could not be initialized.
  152. // The returned value indicates why the
  153. // operation failed.
  154. //
  155. //////////////////////////////////////////////////////////////////////
  156. [id(5)]
  157. HRESULT LockObject([out, retval] IUnknown** ppLock);
  158. //////////////////////////////////////////////////////////////////////
  159. //
  160. // Function: Initialize() - Used to initialize an appliance object.
  161. //
  162. // Inputs: None
  163. //
  164. // Outputs: S_OK: Function succeeded.
  165. //
  166. // FAILED(hr): Appliance object could not be initialized.
  167. // The returned value indicates why the
  168. // operation failed.
  169. //
  170. //////////////////////////////////////////////////////////////////////
  171. [id(6)]
  172. HRESULT Initialize(void);
  173. //////////////////////////////////////////////////////////////////////
  174. //
  175. // Function: Shutdown() - Used to shutdown an appliance object.
  176. //
  177. // Inputs: None
  178. //
  179. // Outputs: S_OK: Function succeeded.
  180. //
  181. // FAILED(hr): Appliance object could not be shutdown. The
  182. // returned value indicates why the operation
  183. // failed.
  184. //
  185. //////////////////////////////////////////////////////////////////////
  186. [id(7)]
  187. HRESULT Shutdown(void);
  188. //////////////////////////////////////////////////////////////////////
  189. //
  190. // Function: Enable() - Used to enable an appliance object.
  191. //
  192. // Inputs: None
  193. //
  194. // Outputs: S_OK: Function succeeded.
  195. //
  196. // FAILED(hr): Appliance object could not be enabled. The
  197. // returned value indicates why the operation
  198. // failed.
  199. //
  200. //////////////////////////////////////////////////////////////////////
  201. [id(8)]
  202. HRESULT Enable(void);
  203. //////////////////////////////////////////////////////////////////////
  204. //
  205. // Function: Disable() - Used to disable an appliance object.
  206. //
  207. // Inputs: None
  208. //
  209. // Outputs: S_OK: Function succeeded.
  210. //
  211. // FAILED(hr): Appliance object could not be disabled. The
  212. // returned value indicates why the operation
  213. // failed.
  214. //
  215. //////////////////////////////////////////////////////////////////////
  216. [id(9)]
  217. HRESULT Disable(void);
  218. };