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.

395 lines
8.3 KiB

  1. //-----------------------------------------------------------------------------
  2. // File: adojet.idl
  3. //
  4. // Copyright: Copyright (c) Microsoft Corporation
  5. //
  6. // Contents: IDL source for msjro.dll
  7. //
  8. //
  9. // Comments: This file will be processed by the MIDL tool to
  10. // produce the type library (adojet.tlb) and marshalling code.
  11. //
  12. //-----------------------------------------------------------------------------
  13. #include "jro.hh"
  14. #include "adodef.h"
  15. // Forwards
  16. interface IReplica;
  17. coclass Replica;
  18. interface Filter;
  19. interface Filters;
  20. interface IJetEngine;
  21. coclass JetEngine;
  22. #define DISPID_COLLECT ( -8 )
  23. #define DEFAULT_METHOD id(0)
  24. cpp_quote("#define TARGET_IS_NT40_OR_LATER 1")
  25. [
  26. JRO_TYPELIB_UUID,
  27. version(JRO_VERSION),
  28. helpfile(JRO_HELPFILE),
  29. helpstring(JRO_LIBRARYNAME)
  30. ]
  31. library JRO
  32. {
  33. importlib("stdole32.tlb");
  34. importlib("stdole2.tlb");
  35. importlib("ado10.tlb");
  36. /************************************ Enums **********************************************/
  37. typedef [
  38. uuid(D2D139DF-B6CA-11d1-9F31-00C04FC29D52),
  39. ]
  40. enum ReplicaTypeEnum {
  41. [] jrRepTypeNotReplicable = 0x0000,
  42. [] jrRepTypeDesignMaster = 0x0001,
  43. [] jrRepTypeFull = 0x0002,
  44. [] jrRepTypePartial = 0x0003
  45. } ReplicaTypeEnum;
  46. typedef [
  47. uuid(6877D21A-B6CE-11d1-9F31-00C04FC29D52),
  48. ]
  49. enum VisibilityEnum {
  50. [] jrRepVisibilityGlobal = 0x0001,
  51. [] jrRepVisibilityLocal = 0x0002,
  52. [] jrRepVisibilityAnon = 0x0004
  53. } VisibilityEnum;
  54. typedef [
  55. uuid(B42FBFF6-B6CF-11d1-9F31-00C04FC29D52),
  56. ]
  57. enum UpdatabilityEnum {
  58. [] jrRepUpdFull = 0x0000,
  59. [] jrRepUpdReadOnly = 0x0002
  60. } UpdatabilityEnum;
  61. /*
  62. typedef [
  63. uuid(60C05416-B6D0-11d1-9F31-00C04FC29D52),
  64. ]
  65. enum ReplicationStateEnum {
  66. [] jrRepStateNotReplicable = 0x0000,
  67. [] jrRepStateLocal = 0x0001,
  68. [] jrRepStateReplicated = 0x0002
  69. } ReplicationStateEnum;
  70. */
  71. typedef [
  72. uuid(60C05416-B6D0-11d1-9F31-00C04FC29D52),
  73. ]
  74. enum SyncTypeEnum {
  75. [] jrSyncTypeExport = 0x0001,
  76. [] jrSyncTypeImport = 0x0002,
  77. [] jrSyncTypeImpExp = 0x0003
  78. } SyncTypeEnum;
  79. typedef [
  80. uuid(5EBA3970-061E-11d2-BB77-00C04FAE22DA),
  81. ]
  82. enum SyncModeEnum {
  83. [] jrSyncModeIndirect = 0x0001,
  84. [] jrSyncModeDirect = 0x0002,
  85. [] jrSyncModeInternet = 0x0003
  86. } SyncModeEnum;
  87. typedef [
  88. uuid(72769F94-BF78-11d1-AC4D-00C04FC29F8F),
  89. ]
  90. enum FilterTypeEnum {
  91. [] jrFilterTypeTable = 0x0001,
  92. [] jrFilterTypeRelationship = 0x0002
  93. } FilterTypeEnum;
  94. /******************************* Interfaces **********************************************/
  95. [
  96. object,
  97. uuid(D2D139E0-B6CA-11d1-9F31-00C04FC29D52),
  98. dual,
  99. helpstring("IReplica Interface"),
  100. pointer_default(unique)
  101. ]
  102. interface IReplica : IDispatch
  103. {
  104. import "oaidl.idl";
  105. [
  106. propputref,
  107. helpcontext(jrproActiveConnection)
  108. ]
  109. HRESULT ActiveConnection([in] IDispatch *pconn);
  110. [
  111. propput,
  112. helpcontext(jrproActiveConnection)
  113. ]
  114. HRESULT ActiveConnection([in] VARIANT vConn);
  115. [
  116. propget,
  117. helpcontext(jrproActiveConnection)
  118. ]
  119. HRESULT ActiveConnection([out, retval] IDispatch **ppconn);
  120. [
  121. propget,
  122. helpcontext(jrproConflictFunction)
  123. ]
  124. HRESULT ConflictFunction([out, retval] BSTR *pbstr);
  125. [
  126. propput,
  127. helpcontext(jrproConflictFunction)
  128. ]
  129. HRESULT ConflictFunction([in] BSTR bstr);
  130. [
  131. propget,
  132. helpcontext(jrproConflictTables)
  133. ]
  134. HRESULT ConflictTables([out, retval] ADODB._Recordset **pprset);
  135. [
  136. propget,
  137. helpcontext(jrproDesignMasterId)
  138. ]
  139. HRESULT DesignMasterId([out, retval] VARIANT *pvar);
  140. [
  141. propput,
  142. helpcontext(jrproDesignMasterId)
  143. ]
  144. HRESULT DesignMasterId([in] VARIANT var);
  145. [
  146. propget,
  147. helpcontext(jrproPriority)
  148. ]
  149. HRESULT Priority([out, retval] long *pl);
  150. [
  151. propget,
  152. helpcontext(jrproReplicaId)
  153. ]
  154. HRESULT ReplicaId([out, retval] VARIANT *pvar);
  155. [
  156. propget,
  157. helpcontext(jrproReplicaType)
  158. ]
  159. HRESULT ReplicaType([out, retval] ReplicaTypeEnum *pl);
  160. [
  161. propget,
  162. helpcontext(jrproRetentionPeriod)
  163. ]
  164. HRESULT RetentionPeriod([out, retval] long *pl);
  165. [
  166. propput,
  167. helpcontext(jrproRetentionPeriod)
  168. ]
  169. HRESULT RetentionPeriod([in] long l);
  170. [
  171. propget,
  172. helpcontext(jrproVisibility)
  173. ]
  174. HRESULT Visibility([out, retval] VisibilityEnum *pl);
  175. [
  176. helpcontext(jrmthCreateReplica)
  177. ]
  178. HRESULT CreateReplica(
  179. [in] BSTR replicaName,
  180. [in] BSTR description,
  181. [in, defaultvalue(jrRepTypeFull)] ReplicaTypeEnum replicaType,
  182. [in, defaultvalue(jrRepVisibilityGlobal)] VisibilityEnum visibility,
  183. [in, defaultvalue(-1)] long priority,
  184. [in, defaultvalue(jrRepUpdFull)] UpdatabilityEnum updatability);
  185. [
  186. helpcontext(jrmthGetObjectReplicability)
  187. ]
  188. HRESULT GetObjectReplicability(
  189. [in] BSTR objectName,
  190. [in] BSTR objectType,
  191. [out, retval] VARIANT_BOOL *replicability);
  192. [
  193. helpcontext(jrmthSetObjectReplicability)
  194. ]
  195. HRESULT SetObjectReplicability(
  196. [in] BSTR objectName,
  197. [in] BSTR objectType,
  198. [in] VARIANT_BOOL replicability);
  199. [
  200. helpcontext(jrmthMakeReplicable)
  201. ]
  202. HRESULT MakeReplicable(
  203. [in, defaultvalue("")] BSTR connectionString,
  204. [in, defaultvalue(-1)] VARIANT_BOOL columnTracking);
  205. [
  206. helpcontext(jrmthPopulatePartial)
  207. ]
  208. HRESULT PopulatePartial(
  209. [in] BSTR FullReplica);
  210. [
  211. helpcontext(jrmthSynchronize)
  212. ]
  213. HRESULT Synchronize(
  214. [in] BSTR target,
  215. [in, defaultvalue(jrSyncTypeImpExp)] SyncTypeEnum syncType,
  216. [in, defaultvalue(jrSyncModeIndirect)] SyncModeEnum syncMode);
  217. [
  218. propget,
  219. helpcontext(jrcolFilters)
  220. ]
  221. HRESULT Filters([out, retval] Filters **ppFilters);
  222. };
  223. //---------------------------------------------------------------------------------------------
  224. [
  225. object,
  226. uuid(D2D139E1-B6CA-11d1-9F31-00C04FC29D52),
  227. dual,
  228. helpstring("Filter Interface"),
  229. pointer_default(unique)
  230. ]
  231. interface Filter : IDispatch
  232. {
  233. import "oaidl.idl";
  234. [
  235. propget,
  236. helpcontext(jrproTableName)
  237. ]
  238. HRESULT TableName([out, retval] BSTR *pbstr);
  239. [
  240. propget,
  241. helpcontext(jrproFilterType)
  242. ]
  243. HRESULT FilterType([out, retval] FilterTypeEnum *ptype);
  244. [
  245. propget,
  246. helpcontext(jrproFilterCriteria)
  247. ]
  248. HRESULT FilterCriteria([out, retval] BSTR *pbstr);
  249. };
  250. //---------------------------------------------------------------------------------------------
  251. [
  252. object,
  253. uuid(D2D139E2-B6CA-11d1-9F31-00C04FC29D52),
  254. dual,
  255. helpstring("Filters Interface"),
  256. pointer_default(unique)
  257. ]
  258. interface Filters : IDispatch
  259. {
  260. import "oaidl.idl";
  261. [
  262. helpcontext(jrmthRefresh)
  263. ]
  264. HRESULT Refresh();
  265. [
  266. restricted,
  267. id(-4)
  268. ]
  269. HRESULT _NewEnum( [out, retval] IUnknown **ppvObject );
  270. [
  271. propget,
  272. helpcontext(jrproCount)
  273. ]
  274. HRESULT Count( [out, retval]long *c );
  275. [
  276. propget,
  277. helpcontext(jrmthItem),
  278. DEFAULT_METHOD
  279. ]
  280. HRESULT Item(
  281. [in] VARIANT Index,
  282. [out, retval] Filter **ppvObject
  283. );
  284. [
  285. helpcontext(jrmthAppend)
  286. ]
  287. HRESULT Append( [in] BSTR tableName,
  288. [in] FilterTypeEnum filterType,
  289. [in] BSTR filterCriteria
  290. );
  291. [
  292. helpcontext(jrmthDelete)
  293. ]
  294. HRESULT Delete( [in] VARIANT Index );
  295. }
  296. //---------------------------------------------------------------------------------------------
  297. [
  298. object,
  299. uuid(9F63D980-FF25-11D1-BB6F-00C04FAE22DA),
  300. dual,
  301. helpstring("IJetEngine Interface"),
  302. pointer_default(unique)
  303. ]
  304. interface IJetEngine : IDispatch
  305. {
  306. import "oaidl.idl";
  307. [
  308. helpcontext(jrmthCompactDatabase)
  309. ]
  310. HRESULT CompactDatabase( [in] BSTR SourceConnection,
  311. [in] BSTR Destconnection
  312. );
  313. [
  314. helpcontext(jrmthRefreshCache)
  315. ]
  316. HRESULT RefreshCache([in] ADODB._Connection* Connection);
  317. }
  318. /******************************* Coclasses **********************************************/
  319. [
  320. uuid(D2D139E3-B6CA-11d1-9F31-00C04FC29D52),
  321. helpstring("JRO Replica Class")
  322. ]
  323. coclass Replica
  324. {
  325. [default] interface IReplica;
  326. };
  327. [
  328. uuid(DE88C160-FF2C-11D1-BB6F-00C04FAE22DA),
  329. helpstring("JRO JetEngine Class")
  330. ]
  331. coclass JetEngine
  332. {
  333. [default] interface IJetEngine;
  334. };
  335. };