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.

273 lines
8.5 KiB

  1. // datastore2.idl : IDL source for datastore2.dll
  2. //
  3. // This file will be processed by the MIDL tool to
  4. // produce the type library (datastore2.tlb) and marshalling code.
  5. import "oaidl.idl";
  6. interface IDataStore2;
  7. interface IDataStoreContainer;
  8. interface IDataStoreObject;
  9. interface IDataStoreProperty;
  10. // represents the different tokens for the netsh aaaa show config
  11. // command.
  12. // This is used to determine what should be restored from a
  13. // netshell script.
  14. // This is an IN parameter for IIASNetshJetHelper::UpgradeDatabaseEx
  15. typedef enum _IAS_SHOW_TOKEN_LIST
  16. {
  17. VERSION,
  18. CONFIG,
  19. SERVER_SETTINGS,
  20. CLIENTS,
  21. CONNECTION_REQUEST_POLICIES,
  22. LOGGING,
  23. REMOTE_ACCESS_POLICIES,
  24. } IAS_SHOW_TOKEN_LIST;
  25. //////////////////////////////////////////////////////////////////////////
  26. //
  27. // Name: IDataStoreProperty
  28. //
  29. // What: Represents a single property of an abstract data store object.
  30. //
  31. // Purpose: Enable an SDO client to enumerate all the properties of an
  32. // object.
  33. //
  34. //////////////////////////////////////////////////////////////////////////
  35. [
  36. object,
  37. uuid(6BC096C9-0CE6-11D1-BAAE-00C04FC2E20D),
  38. dual
  39. ]
  40. interface IDataStoreProperty : IDispatch
  41. {
  42. [propget, id(1)]
  43. HRESULT Name([out, retval] BSTR* pVal);
  44. [propget, id(2)]
  45. HRESULT Value([out, retval] VARIANT* pVal);
  46. [propget, id(3)]
  47. HRESULT ValueEx([out, retval] VARIANT* pVal);
  48. [propget, id(4)]
  49. HRESULT Owner([out, retval] IDataStoreObject** pVal);
  50. };
  51. //////////////////////////////////////////////////////////////////////////
  52. //
  53. // Name: IDataStoreObject
  54. //
  55. // What: Interface exported by all abstract data store objects.
  56. //
  57. // Purpose: Enable an SDO client to treat the underlying data store
  58. // as an abstract entity
  59. //
  60. //////////////////////////////////////////////////////////////////////////
  61. [
  62. object,
  63. uuid(6BC096C0-0CE6-11D1-BAAE-00C04FC2E20D),
  64. dual,
  65. pointer_default(unique)
  66. ]
  67. interface IDataStoreObject : IDispatch
  68. {
  69. // Retrieves the object's name (unique within collection?)
  70. [propget, id(1)]
  71. HRESULT Name([out, retval] BSTR* pVal);
  72. // Retrieves object's class (table)
  73. [propget, id(2)]
  74. HRESULT Class([out, retval] BSTR* pVal);
  75. // Retrieves obect's unique identifier.
  76. [propget, id(3)]
  77. HRESULT GUID([out, retval] BSTR* pVal);
  78. // Retrieves the object's container
  79. [propget, id(4)]
  80. HRESULT Container([out, retval] IDataStoreContainer** pVal);
  81. // Multi-valued items are retrieved as safearrays
  82. [id(5)]
  83. HRESULT GetValue([in] BSTR bstrName, [out, retval] VARIANT* pVal);
  84. // All items are retrieved as safearrays
  85. [id(6)]
  86. HRESULT GetValueEx([in] BSTR bstrName, [out, retval] VARIANT* pVal);
  87. // Multi-valued items are put as safearrays
  88. [id(7)]
  89. HRESULT PutValue([in] BSTR bstrName, [in] VARIANT* pVal);
  90. // Update the underlying data store with the current state of
  91. // the data store object's interanl buffer
  92. [id(8)]
  93. HRESULT Update();
  94. // Restore the state of the data store object to its last
  95. // persisted state.
  96. [id(9)]
  97. HRESULT Restore();
  98. // The number of properties associated with the object.
  99. [propget, id(10)]
  100. HRESULT Count([out, retval] long* pVal);
  101. // Retrieves the IDataStoreProperty representation of a property.
  102. [id(DISPID_VALUE)]
  103. HRESULT Item([in] BSTR bstrName,
  104. [out, retval] IDataStoreProperty** pVal);
  105. // Returns an IEnumVARIANT that enumerates all the properties.
  106. [propget, restricted, id(DISPID_NEWENUM)]
  107. HRESULT _NewEnum([out, retval] IUnknown** pVal);
  108. };
  109. //////////////////////////////////////////////////////////////////////////
  110. //
  111. // Name: IDataStoreContainer
  112. //
  113. // What: Interface exported by all abstract data store containers.
  114. //
  115. // Purpose: Enable an SDO collection to treat the underlying data store
  116. // collection (container) as an abstract entity
  117. //
  118. //////////////////////////////////////////////////////////////////////////
  119. [
  120. uuid(6BC096C1-0CE6-11D1-BAAE-00C04FC2E20D),
  121. dual,
  122. pointer_default(unique)
  123. ]
  124. interface IDataStoreContainer : IDispatch
  125. {
  126. [propget, restricted, id(DISPID_NEWENUM)]
  127. HRESULT _NewEnum([out, retval] IUnknown** pVal);
  128. // Retrieves the specified item
  129. [id(DISPID_VALUE)]
  130. HRESULT Item([in] BSTR bstrName,
  131. [out, retval] IDataStoreObject** ppObject);
  132. [propget, id(1)]
  133. HRESULT Count([out, retval] long *pVal);
  134. // Create an object of the "class" type supported by this container
  135. [id(2)]
  136. HRESULT Create([in] BSTR bstrClass,
  137. [in] BSTR bstrName,
  138. [out, retval]IDataStoreObject** ppObject);
  139. // Add an object of "class" type. If bstrNewName is non-null, the
  140. // object is renamed.
  141. [id(3)]
  142. HRESULT MoveHere([in] IDataStoreObject* pObject, [in] BSTR bstrNewName);
  143. // Removes the specified item
  144. [id(4)]
  145. HRESULT Remove([in] BSTR bstrClass, [in] BSTR bstrName);
  146. };
  147. //////////////////////////////////////////////////////////////////////////
  148. //
  149. // Name: IDataStore
  150. //
  151. // What: Interface on top of an abstract data store.
  152. //
  153. // Purpose: Enable an SDO client to treat the underlying data store
  154. // as an abstract entity
  155. //
  156. //////////////////////////////////////////////////////////////////////////
  157. [
  158. object,
  159. uuid(6BC096C2-0CE6-11D1-BAAE-00C04FC2E20D),
  160. dual,
  161. pointer_default(unique)
  162. ]
  163. interface IDataStore2 : IDispatch
  164. {
  165. // Get the root object.
  166. [propget]
  167. HRESULT Root([out, retval] IDataStoreObject** ppObject);
  168. // Initialize the data store.
  169. HRESULT Initialize(
  170. [in] BSTR bstrDSName, // Full UNC name of the data source
  171. [in] BSTR bstrUserName, // Can be NULL
  172. [in] BSTR bstrPassword // Can be NULL
  173. );
  174. // Retrieve a specific object from the datastore.
  175. // The path is implementation specific.
  176. HRESULT OpenObject(
  177. [in] BSTR bstrPath,
  178. [out, retval] IDataStoreObject** ppObject
  179. );
  180. // Shutdown the data store
  181. HRESULT Shutdown();
  182. };
  183. [
  184. object,
  185. uuid(F42CFA19-EA06-4EB6-9891-D583F0CE46FC),
  186. oleautomation
  187. ]
  188. interface IAttributeDictionary : IUnknown
  189. {
  190. HRESULT GetDictionary(
  191. [in] BSTR bstrPath,
  192. [out, retval] VARIANT* pVal
  193. );
  194. };
  195. //////////////////////////////////////////////////////////////////////////
  196. //
  197. // Name: IIASNetshJetHelper
  198. //
  199. // What: Interface used by aaaamon.dll (netshell aaaa) to work with Jet
  200. //
  201. // Purpose: That object should always be in a 32bits process to access
  202. // The Jet provider properly
  203. //
  204. //////////////////////////////////////////////////////////////////////////
  205. [
  206. object,
  207. uuid(20290BE7-A2AE-42C2-8883-FA09973ED3A5),
  208. oleautomation,
  209. ]
  210. interface IIASNetshJetHelper : IUnknown
  211. {
  212. // Open the Jet 4 DB
  213. HRESULT OpenJetDatabase(
  214. [in] BSTR Path,
  215. [in] VARIANT_BOOL ReadOnly
  216. );
  217. // Execute a SQL function and return the result (LONG)
  218. HRESULT ExecuteSQLFunction(
  219. [in] BSTR Command,
  220. [out, retval] LONG* Result
  221. );
  222. // Execute a SQL Command.
  223. HRESULT ExecuteSQLCommand(
  224. [in] BSTR Command
  225. );
  226. // Create an empty Jet 4 DB
  227. HRESULT CreateJetDatabase(
  228. [in] BSTR Path
  229. );
  230. // Close the currently opened DB
  231. HRESULT CloseJetDatabase();
  232. // Upgrade the DB
  233. HRESULT MigrateOrUpgradeDatabase(IAS_SHOW_TOKEN_LIST configType);
  234. };