Source code of Windows XP (NT5)
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.

334 lines
8.2 KiB

  1. // Copyright (c) Microsoft Corporation. All rights reserved.
  2. //+-------------------------------------------------------------------------
  3. //
  4. // Microsoft Windows
  5. // Copyright (c) Microsoft Corporation. All rights reserved.
  6. //
  7. // File: trksvr.idl
  8. //
  9. // Contents: RPC interface to Tracking (Workstation) Service.
  10. //
  11. // Classes:
  12. //
  13. // Functions:
  14. //
  15. // History:
  16. //
  17. //--------------------------------------------------------------------------
  18. import "trk.idl";
  19. //
  20. // Tracking (Server) Service data structures.
  21. //
  22. typedef signed long SequenceNumber;
  23. typedef struct
  24. {
  25. TCHAR tszFilePath[ 257 ]; // BUGBUG: Path size
  26. CDomainRelativeObjId droidBirth;
  27. CDomainRelativeObjId droidLast;
  28. HRESULT hr;
  29. } old_TRK_FILE_TRACKING_INFORMATION;
  30. typedef struct
  31. {
  32. CDomainRelativeObjId droidBirth;
  33. CDomainRelativeObjId droidLast;
  34. CMachineId mcidLast;
  35. HRESULT hr;
  36. } TRK_FILE_TRACKING_INFORMATION;
  37. typedef struct
  38. {
  39. ULONG cSearch;
  40. [size_is(cSearch)]
  41. old_TRK_FILE_TRACKING_INFORMATION *pSearches;
  42. } old_TRKSVR_CALL_SEARCH;
  43. typedef struct
  44. {
  45. ULONG cSearch;
  46. [size_is(cSearch)]
  47. TRK_FILE_TRACKING_INFORMATION *pSearches;
  48. } TRKSVR_CALL_SEARCH;
  49. typedef struct
  50. {
  51. ULONG cNotifications;
  52. ULONG cProcessed;
  53. SequenceNumber seq;
  54. BOOL fForceSeqNumber;
  55. CVolumeId *pvolid;
  56. [size_is(cNotifications)]
  57. CObjId *rgobjidCurrent;
  58. [size_is(cNotifications)]
  59. CDomainRelativeObjId *rgdroidBirth;
  60. [size_is(cNotifications)]
  61. CDomainRelativeObjId *rgdroidNew;
  62. } TRKSVR_CALL_MOVE_NOTIFICATION;
  63. typedef struct
  64. {
  65. ULONG cSources;
  66. [size_is(cSources)]
  67. CDomainRelativeObjId *adroidBirth;
  68. ULONG cVolumes;
  69. [size_is(cVolumes)]
  70. CVolumeId *avolid;
  71. } TRKSVR_CALL_REFRESH;
  72. typedef struct _DROID_LIST_ELEMENT
  73. {
  74. struct _DROID_LIST_ELEMENT * pNext;
  75. CDomainRelativeObjId droid;
  76. } DROID_LIST_ELEMENT;
  77. typedef struct
  78. {
  79. ULONG cdroidBirth;
  80. [size_is(cdroidBirth)]
  81. CDomainRelativeObjId * adroidBirth;
  82. ULONG cVolumes;
  83. [size_is(cVolumes)] CVolumeId *pVolumes;
  84. } TRKSVR_CALL_DELETE;
  85. typedef [v1_enum] enum
  86. {
  87. CREATE_VOLUME, // S_OK or exception(disk full, out of memory)
  88. QUERY_VOLUME, // VOLUME_NOT_OWNED: volume found, but not owned by this client
  89. // VOLUME_NOT_FOUND: volume not found
  90. // VOLUME_OK: volume found, and owned by this client
  91. // exceptions: out of memory, disk failure etc
  92. CLAIM_VOLUME, // VOLUME_NOT_FOUND, volume not found
  93. // VOLUME_ACCESS_DENIED, volume found, secrets do not match
  94. // VOLUME_OK, volume found, secrets match
  95. // exceptions: out of memory, disk full, etc
  96. FIND_VOLUME, // VOLUME_NOT_FOUND, VOLUME_OK
  97. TEST_VOLUME, // S_OK
  98. DELETE_VOLUME
  99. } TRKSVR_SYNC_TYPE;
  100. typedef struct
  101. {
  102. HRESULT hr;
  103. TRKSVR_SYNC_TYPE SyncType; // CREATE QUERY CLAIM FIND TEST DELETE
  104. // ------ ----- ----- ---- ---- ------
  105. CVolumeId volume; // In In In In In In
  106. CVolumeSecret secret; // In - In - (In) -
  107. CVolumeSecret secretOld; // - - In - - -
  108. SequenceNumber seq; // In Out Out - In -
  109. FILETIME ftLastRefresh; // Out Out Out - - -
  110. CMachineId machine; // - - - Out (In) -
  111. } TRKSVR_SYNC_VOLUME;
  112. typedef struct
  113. {
  114. ULONG cVolumes;
  115. [size_is(cVolumes)] TRKSVR_SYNC_VOLUME * pVolumes;
  116. #ifdef VOL_REPL
  117. FILETIME ftFirstChange;
  118. ULONG cChanges;
  119. [size_is( , cChanges)] VolumeMapEntry ** ppVolumeChanges;
  120. #endif
  121. } TRKSVR_CALL_SYNC_VOLUMES;
  122. typedef struct
  123. {
  124. // Request statistics
  125. ULONG cSyncVolumeRequests, cSyncVolumeErrors, cSyncVolumeThreads;
  126. ULONG cCreateVolumeRequests, cCreateVolumeErrors;
  127. ULONG cClaimVolumeRequests, cClaimVolumeErrors;
  128. ULONG cQueryVolumeRequests, cQueryVolumeErrors;
  129. ULONG cFindVolumeRequests, cFindVolumeErrors;
  130. ULONG cTestVolumeRequests, cTestVolumeErrors;
  131. ULONG cSearchRequests, cSearchErrors, cSearchThreads;
  132. ULONG cMoveNotifyRequests, cMoveNotifyErrors, cMoveNotifyThreads;
  133. ULONG cRefreshRequests, cRefreshErrors, cRefreshThreads;
  134. ULONG cDeleteNotifyRequests, cDeleteNotifyErrors, cDeleteNotifyThreads;
  135. //ULONG cMessageTypeErrors;
  136. ULONG ulGCIterationPeriod;
  137. FILETIME ftLastSuccessfulRequest;
  138. HRESULT hrLastError;
  139. // Quota statistics
  140. ULONG dwMoveLimit;
  141. LONG lRefreshCounter;
  142. ULONG dwCachedVolumeTableCount;
  143. ULONG dwCachedMoveTableCount;
  144. FILETIME ftCacheLastUpdated;
  145. BOOL fIsDesignatedDc;
  146. // Other
  147. FILETIME ftNextGC;
  148. FILETIME ftServiceStart;
  149. ULONG cMaxRpcThreads, cAvailableRpcThreads, cLowestAvailableRpcThreads;
  150. ULONG cNumThreadPoolThreads, cMostThreadPoolThreads;
  151. //ULONG Reserved;
  152. SHORT cEntriesToGC;
  153. SHORT cEntriesGCed;
  154. //ULONG SvcCtrlState;
  155. SHORT cMaxDsWriteEvents;
  156. SHORT cCurrentFailedWrites;
  157. struct
  158. {
  159. DWORD dwMajor;
  160. DWORD dwMinor;
  161. DWORD dwBuildNumber;
  162. } Version;
  163. } TRKSVR_STATISTICS;
  164. typedef struct
  165. {
  166. DWORD dwParameter;
  167. DWORD dwNewValue;
  168. } TRKWKS_CONFIG;
  169. typedef [v1_enum] enum
  170. {
  171. old_SEARCH,
  172. MOVE_NOTIFICATION,
  173. REFRESH,
  174. SYNC_VOLUMES,
  175. DELETE_NOTIFY,
  176. STATISTICS,
  177. SEARCH,
  178. // The following are hooks only used within the trkwks service
  179. // by LnkCallSvrMessage
  180. WKS_CONFIG,
  181. WKS_VOLUME_REFRESH
  182. } TRKSVR_MESSAGE_TYPE;
  183. typedef struct
  184. {
  185. TRKSVR_MESSAGE_TYPE MessageType;
  186. [switch_is(MessageType)] union
  187. {
  188. [case (old_SEARCH)]
  189. old_TRKSVR_CALL_SEARCH old_Search;
  190. [case (MOVE_NOTIFICATION)]
  191. TRKSVR_CALL_MOVE_NOTIFICATION MoveNotification;
  192. [case (REFRESH)]
  193. TRKSVR_CALL_REFRESH Refresh;
  194. [case (SYNC_VOLUMES)]
  195. TRKSVR_CALL_SYNC_VOLUMES SyncVolumes;
  196. [case (DELETE_NOTIFY)]
  197. TRKSVR_CALL_DELETE Delete;
  198. [case (SEARCH)]
  199. TRKSVR_CALL_SEARCH Search;
  200. };
  201. // Must be NULL unless security is disabled.
  202. [string] TCHAR *ptszMachineID;
  203. } TRKSVR_MESSAGE_UNION_OLD;
  204. typedef [v1_enum] enum
  205. {
  206. PRI_0=0, // highest
  207. PRI_1=1,
  208. PRI_2=2,
  209. PRI_3=3,
  210. PRI_4=4,
  211. PRI_5=5,
  212. PRI_6=6,
  213. PRI_7=7,
  214. PRI_8=8,
  215. PRI_9=9 // lowest
  216. } TRKSVR_MESSAGE_PRIORITY;
  217. typedef struct
  218. {
  219. TRKSVR_MESSAGE_TYPE MessageType;
  220. TRKSVR_MESSAGE_PRIORITY Priority;
  221. [switch_is(MessageType)] union
  222. {
  223. [case (old_SEARCH)]
  224. old_TRKSVR_CALL_SEARCH old_Search;
  225. [case (MOVE_NOTIFICATION)]
  226. TRKSVR_CALL_MOVE_NOTIFICATION MoveNotification;
  227. [case (REFRESH)]
  228. TRKSVR_CALL_REFRESH Refresh;
  229. [case (SYNC_VOLUMES)]
  230. TRKSVR_CALL_SYNC_VOLUMES SyncVolumes;
  231. [case (DELETE_NOTIFY)]
  232. TRKSVR_CALL_DELETE Delete;
  233. [case (STATISTICS)]
  234. TRKSVR_STATISTICS Statistics;
  235. [case (SEARCH)]
  236. TRKSVR_CALL_SEARCH Search;
  237. [case (WKS_CONFIG)]
  238. TRKWKS_CONFIG WksConfig;
  239. [case (WKS_VOLUME_REFRESH)]
  240. DWORD WksRefresh;
  241. };
  242. // Must be NULL unless security is disabled.
  243. [string] TCHAR *ptszMachineID;
  244. } TRKSVR_MESSAGE_UNION;
  245. // --------------------
  246. // Interface Attributes
  247. // --------------------
  248. [
  249. uuid(4da1c422-943d-11d1-acae-00c04fc2aa3f),
  250. version(1.0),
  251. pointer_default(unique)
  252. ]
  253. interface trksvr
  254. {
  255. //
  256. // Tracking (Server) Service API-s.
  257. //
  258. HRESULT LnkSvrMessage([in] handle_t IDL_handle, [in, out] TRKSVR_MESSAGE_UNION * pMsg );
  259. [callback] HRESULT LnkSvrMessageCallback( [in, out] TRKSVR_MESSAGE_UNION * pMsg );
  260. }