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.

1466 lines
49 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 2000.
  5. //
  6. // File: ciintf.idl
  7. //
  8. // Contents: Content Index Framework interfaces definition
  9. //
  10. // History: Nov-11-1996 SrikantS Created
  11. //
  12. //--------------------------------------------------------------------------
  13. #ifdef IMPORT_IDL_DEPENDENTS
  14. import "oaidl.idl";
  15. import "filter.idl";
  16. #endif
  17. #include "idlmulti.h"
  18. const ULONG CI_DEFAULT_PID = 0x0;
  19. const ULONG CI_INVALID_PID = 0xffffffff;
  20. const ULONG CI_VOLID_USN_NOT_ENABLED = 0x0;
  21. typedef enum tagCI_GLOBAL_CONSTANTS
  22. {
  23. CI_LOW_RESOURCE = 1,
  24. CI_RESET_UPDATES = 2
  25. } CI_GLOBAL_CONSTANTS;
  26. //+-------------------------------------------------------------------------
  27. //
  28. // Interface : ICiCDocName
  29. //
  30. // Description : Interface that encapsulates a document name.
  31. //
  32. //+-------------------------------------------------------------------------
  33. LOCAL_INTERFACE(76615076-3C2B-11D0-8C90-0020AF1D740E)
  34. interface ICiCDocName : IUnknown
  35. {
  36. SCODE Init( [in, size_is(cbName)] BYTE const * pbName,
  37. [in] ULONG cbName );
  38. SCODE Set( [in] ICiCDocName const * pICiCDocName );
  39. SCODE Clear( void );
  40. SCODE IsValid( void ) const;
  41. SCODE Duplicate( [out] ICiCDocName ** ppICiCDocName ) const;
  42. SCODE Get( [out, size_is(*pcbName)] BYTE * pbName,
  43. [in,out] ULONG *pcbName ) const;
  44. SCODE GetNameBuffer( [out] BYTE const ** ppName,
  45. [out] ULONG * pcbName );
  46. SCODE GetBufSizeNeeded( [out] ULONG * pcbName ) const;
  47. }
  48. //+-------------------------------------------------------------------------
  49. //
  50. // Interface : ICiCOpenedDoc
  51. //
  52. // Description : Represents an opened document which can be used to retrieve
  53. // property sets and properties.
  54. //
  55. //+-------------------------------------------------------------------------
  56. LOCAL_INTERFACE(151EDFBE-3C2F-11D0-8C90-0020AF1D740E)
  57. interface ICiCOpenedDoc : IUnknown
  58. {
  59. SCODE Open( [in,size_is(cbDocName)] BYTE const * pbDocName,
  60. [in] ULONG cbDocName );
  61. SCODE Close( void );
  62. SCODE GetDocumentName( [out] ICiCDocName ** ppICiDocName );
  63. SCODE GetStatPropertyEnum( [out] IPropertyStorage ** ppIPropStorage );
  64. SCODE GetPropertySetEnum( [out] IPropertySetStorage ** ppIPropSetStorage );
  65. SCODE GetPropertyEnum( [in] REFFMTID GuidPropSet,
  66. [out] IPropertyStorage ** ppIPropStorage );
  67. SCODE GetIFilter( [out] IFilter ** ppIFilter );
  68. SCODE GetSecurity( [out, size_is(*pcbData)] BYTE * pbData,
  69. [in,out] ULONG * pcbData );
  70. SCODE IsInUseByAnotherProcess( [out] BOOL *pfInUse );
  71. }
  72. //+-------------------------------------------------------------------------
  73. //
  74. // Interface : ICiAdminParams
  75. //
  76. // Description : sets/gets CI configuration parameters.
  77. //
  78. // History : 19 Oct 1998 sundarA : added CI_AP_IS_ENUM_ALLOWED
  79. //+-------------------------------------------------------------------------
  80. LOCAL_INTERFACE(a82d48c6-3f0f-11d0-8c91-0020af1d740e)
  81. interface ICiAdminParams : IUnknown
  82. {
  83. //
  84. // Enumerated values for the various admin parameters that can be set.
  85. //
  86. typedef enum tagCI_ADMIN_PARAMS
  87. {
  88. CI_AP_MERGE_INTERVAL, // Sleep time between merges
  89. CI_AP_MAX_UPDATES, // Max # of updates passed by catalog
  90. CI_AP_MAX_WORDLISTS, // Max # of word lists that can exist
  91. CI_AP_MIN_SIZE_MERGE_WORDLISTS,// Min combined size of wordlists
  92. CI_AP_MAX_WORDLIST_SIZE, // Max size at which docs can be added
  93. CI_AP_MIN_WORDLIST_MEMORY, // Min free mem for wordlist creation
  94. CI_AP_LOW_RESOURCE_SLEEP, // Time to wait after low resource condition
  95. CI_AP_MAX_WORDLIST_MEMORY_LOAD,// Max mem load for wordlist creation
  96. CI_AP_MAX_FRESH_COUNT, // Max fresh list entries before mmerge
  97. CI_AP_MAX_SHADOW_INDEX_SIZE, // Max combined size of shadow indexes
  98. CI_AP_MIN_DISK_FREE_FORCE_MERGE,// Min disk free before a mmerge is forced
  99. CI_AP_MAX_SHADOW_FREE_FORCE_MERGE, // Max space for shadow indexes (% free space)
  100. CI_AP_MAX_INDEXES, // Maximum number of indexes (persistent or wordlist)
  101. CI_AP_MAX_IDEAL_INDEXES, // Maximum number of indexes in an 'ideal' system.
  102. CI_AP_MIN_MERGE_IDLE_TIME, // Minumum idle time to perform annealing merge.
  103. CI_AP_MAX_PENDING_DOCUMENTS, // Max pending docs for property queries
  104. CI_AP_MASTER_MERGE_TIME, // Time for queue master merge
  105. CI_AP_MAX_QUEUE_CHUNKS, // # of chunks in in-memory change list
  106. CI_AP_MASTER_MERGE_CHECKPOINT_INTERVAL, // # of bytes to process before Checkpointing
  107. CI_AP_FILTER_BUFFER_SIZE, // Mem buf size used by CI filter
  108. CI_AP_FILTER_RETRIES, // # of attempts to filter a document
  109. CI_AP_FILTER_RETRY_INTERVAL, // # of minutes between retrying an open doc
  110. CI_AP_MIN_IDLE_QUERY_THREADS, // Min number of idle query threads to maintain
  111. CI_AP_MAX_ACTIVE_QUERY_THREADS,// Maximum number of query threads to allow
  112. CI_AP_MAX_QUERY_TIMESLICE, // Query timeslice (if waiting queries)
  113. CI_AP_MAX_QUERY_EXECUTION_TIME,// Maximum query execution time (if waiting queries)
  114. CI_AP_MAX_RESTRICTION_NODES, // Maximum normalized restriction nodes
  115. CI_AP_CLUSTERINGTIME, // Time for clustering
  116. CI_AP_MAX_FILESIZE_MULTIPLIER, // Largest amount of data from single file
  117. CI_AP_DAEMON_RESPONSE_TIMEOUT, // Timeout waiting for response
  118. CI_AP_FILTER_DELAY_INTERVAL, // Number of seconds the filter thread should wait
  119. // if there are too few documents. (slm hack)
  120. CI_AP_FILTER_REMAINING_THRESHOLD,
  121. // Number of documents below which filter will
  122. // introduce a delay
  123. CI_AP_MAX_CHARACTERIZATION, // Maximum size in CWC of the
  124. // characterization generated
  125. CI_AP_MAX_FRESH_DELETES, // Maximum number of uncommitted delete entries
  126. // before a delete merge is initiated.
  127. CI_AP_MAX_WORDLIST_IO, // Greater than this amount of I/O activity will
  128. // delay new wordlist creation. Units: KB/Sec
  129. CI_AP_WORDLIST_RESOURCE_CHECK_INTERVAL,
  130. // I/O and low memory resource threshold check
  131. // performed at most once in this number of
  132. // seconds. Units: Seconds
  133. CI_AP_STARTUP_DELAY, // Milliseconds after boot when work can begin
  134. CI_AP_GENERATE_CHARACTERIZATION, // TRUE if characterization should be generated.
  135. CI_AP_MIN_WORDLIST_BATTERY, // Percentage of battery power required to generate wordlists
  136. CI_AP_THREAD_PRIORITY_MERGE, // Priority of merge thread
  137. CI_AP_THREAD_PRIORITY_FILTER, // Priority of update/filter thread
  138. CI_AP_THREAD_CLASS_FILTER, // Priority class of the filter thread.
  139. CI_AP_EVTLOG_FLAGS, // Flags for event log
  140. CI_AP_MISC_FLAGS, // Miscellaneous Flags
  141. CI_AP_GENERATE_RELEVANT_WORDS, // Set to TRUE if relevant words should be generated
  142. CI_AP_FFILTER_FILES_WITH_UNKNOWN_EXTENSIONS,
  143. // Flag indicating if files with unknown
  144. // extensions should be filtered.
  145. CI_AP_FILTER_DIRECTORIES, // Should queries return directories?
  146. CI_AP_FILTER_CONTENTS, // Flag indicating if contents should be filtered
  147. CI_AP_MAX_FILESIZE_FILTERED, // Maximum size of a file with unknown filter that will
  148. // be filtered. Unit: Kilobytes
  149. CI_AP_MIN_CLIENT_IDLE_TIME, // A client can afford to be idle for at least this many
  150. // seconds before possibly getting disconnected.
  151. CI_AP_MAX_DAEMON_VM_USE, // Maximum amount of pagefile, in KB, used by out-of-process daemon.
  152. CI_AP_SECQ_FILTER_RETRIES, // # of attempts to filter a document in secondary Queue
  153. CI_AP_WORDLIST_USER_IDLE, // User idle time to generate wordlists
  154. CI_AP_IS_ENUM_ALLOWED, // Admin parameter for allowing enumeration
  155. CI_AP_MIN_DISK_SPACE_TO_LEAVE, // Number of megabytes to leave on disk
  156. CI_AP_MAX_DWORD_VAL, // THIS MUST BE THE LAST DWORD PARAM ALWAYS
  157. //
  158. // Values which don't fit in DWORD must be declared here.
  159. //
  160. CI_AP_MAX_VAL // THIS MUST BE THE LAST IN THE ENUMS
  161. } CI_ADMIN_PARAMS;
  162. //
  163. // Enumerated values for types of "high-level" content index
  164. // configuration.
  165. //
  166. typedef enum tagCI_CONFIG_TYPE
  167. {
  168. CI_CONFIG_DEFAULT = 0x0,
  169. CI_CONFIG_OPTIMIZE_FOR_SPEED = 0x1,
  170. CI_CONFIG_OPTIMIZE_FOR_SIZE = 0x2,
  171. CI_CONFIG_OPTIMIZE_FOR_DEDICATED_INDEXING = 0x4,
  172. CI_CONFIG_OPTIMIZE_FOR_DEDICATED_QUERYING = 0x8,
  173. CI_CONFIG_OPTIMIZE_FOR_DEDICATED_INDEX_QUERY = 0x10,
  174. CI_CONFIG_OPTIMIZE_FOR_MULTIPURPOSE_SERVER = 0x20
  175. } CI_CONFIG_TYPE;
  176. SCODE SetValue( [in] CI_ADMIN_PARAMS param,
  177. [in] DWORD dwValue );
  178. SCODE SetParamValue( [in] CI_ADMIN_PARAMS param,
  179. [in] PROPVARIANT const * pVarValue );
  180. SCODE SetValues( ULONG nParams,
  181. [in, size_is(nParams)] const PROPVARIANT * aParamVals,
  182. [in, size_is(nParams)] const CI_ADMIN_PARAMS * aParamNames );
  183. SCODE GetValue( [in] CI_ADMIN_PARAMS param,
  184. [out] DWORD * pdwValue );
  185. SCODE GetInt64Value( [in] CI_ADMIN_PARAMS param,
  186. [out] __int64 * pValue );
  187. SCODE GetParamValue( [in] CI_ADMIN_PARAMS param,
  188. [out] PROPVARIANT ** ppVarValue );
  189. SCODE IsSame( [in] CI_ADMIN_PARAMS param,
  190. [in] PROPVARIANT const * pVarValue,
  191. [out] BOOL * pfSame );
  192. SCODE SetConfigType( [in] CI_CONFIG_TYPE configType );
  193. SCODE GetConfigType( [out] CI_CONFIG_TYPE * pConfigType );
  194. }
  195. interface IWordBreaker;
  196. interface IStemmer;
  197. interface IStream;
  198. //+-------------------------------------------------------------------------
  199. //
  200. // Interface : ICiCLangRes
  201. //
  202. // Description : An interface to provide language resources like word
  203. // breakers, stemmers, etc.
  204. //
  205. //+-------------------------------------------------------------------------
  206. LOCAL_INTERFACE(914c2e6c-43fe-11d0-8c91-0020af1d740e)
  207. interface ICiCLangRes : IUnknown
  208. {
  209. SCODE GetWordBreaker( [in] LCID locale,
  210. [in] PROPID pid,
  211. [out] IWordBreaker ** ppWordBreaker );
  212. SCODE GetStemmer( [in] LCID locale,
  213. [in] PROPID pid,
  214. [out] IStemmer ** ppStemmer );
  215. SCODE GetNoiseWordList( [in] LCID locale,
  216. [in] PROPID pid,
  217. [out] IStream ** ppNoiseWordList );
  218. }
  219. //+-------------------------------------------------------------------------
  220. //
  221. // Interface : ICiAdmin
  222. //
  223. // Description : An interface with methods to adminster Ci internal state.
  224. //
  225. //+-------------------------------------------------------------------------
  226. LOCAL_INTERFACE(AE67C7D8-85D3-11d0-8C45-00C04FC2DB8D)
  227. interface ICiAdmin : IUnknown
  228. {
  229. SCODE InvalidateLangResources ();
  230. }
  231. //+-------------------------------------------------------------------------
  232. //
  233. // Interface : ICiFrameworkQuery
  234. //
  235. // Description : An interface with methods that provide access to
  236. // various resources like CLangList
  237. //
  238. //+-------------------------------------------------------------------------
  239. LOCAL_INTERFACE(AE67C7D9-85D3-11d0-8C45-00C04FC2DB8D)
  240. interface ICiFrameworkQuery : IUnknown
  241. {
  242. SCODE GetCCI( [out] void ** ppCCI );
  243. SCODE ProcessError( [in] long lErrorCode );
  244. SCODE GetLangList( [out] void **ppLangList );
  245. }
  246. //+-------------------------------------------------------------------------
  247. //
  248. // Interface : ICiCAdviseStatus
  249. //
  250. // Description : An interface notify the Content Index Client about
  251. // performance counter values, event log messages, etc.
  252. //
  253. //+-------------------------------------------------------------------------
  254. LOCAL_INTERFACE(ca05734a-1218-11d3-ae7a-00c04f72f831)
  255. interface ICiCAdviseStatus : IUnknown
  256. {
  257. typedef enum tagCI_PERF_COUNTER_NAME
  258. {
  259. // Counters used in the main process
  260. CI_PERF_NUM_WORDLIST,
  261. CI_PERF_NUM_PERSISTENT_INDEXES,
  262. CI_PERF_INDEX_SIZE,
  263. CI_PERF_FILES_TO_BE_FILTERED,
  264. CI_PERF_NUM_UNIQUE_KEY,
  265. CI_PERF_RUNNING_QUERIES,
  266. CI_PERF_MERGE_PROGRESS,
  267. CI_PERF_DOCUMENTS_FILTERED,
  268. CI_PERF_NUM_DOCUMENTS,
  269. CI_PERF_TOTAL_QUERIES,
  270. // Counters used in the filter daemon process
  271. CI_PERF_FILTER_TIME_TOTAL,
  272. CI_PERF_FILTER_TIME,
  273. CI_PERF_BIND_TIME,
  274. // Counters used in the main process
  275. CI_PERF_DEFERRED_FILTER_FILES
  276. } CI_PERF_COUNTER_NAME;
  277. typedef enum tagCI_NOTIFY_STATUS_VALUE
  278. {
  279. CI_NOTIFY_FILTERING_FAILURE,
  280. CI_NOTIFY_CORRUPT_INDEX,
  281. CI_NOTIFY_SET_DISK_FULL,
  282. CI_NOTIFY_CLEAR_DISK_FULL,
  283. CI_NOTIFY_RESCAN_NEEDED,
  284. CI_NOTIFY_FILTER_EMBEDDING_FAILURE,
  285. CI_NOTIFY_FILTER_TOO_MANY_BLOCKS
  286. } CI_NOTIFY_STATUS_VALUE;
  287. SCODE SetPerfCounterValue( [in] CI_PERF_COUNTER_NAME counterName,
  288. [in] long value );
  289. SCODE GetPerfCounterValue( [in] CI_PERF_COUNTER_NAME counterName,
  290. [out] long * pValue );
  291. SCODE IncrementPerfCounterValue( [in] CI_PERF_COUNTER_NAME counterName );
  292. SCODE DecrementPerfCounterValue( [in] CI_PERF_COUNTER_NAME counterName );
  293. SCODE NotifyEvent( [in] WORD fType,
  294. [in] DWORD eventId,
  295. [in] ULONG nParams,
  296. [in, size_is(nParams)] const PROPVARIANT *aParams,
  297. [in] ULONG cbData,
  298. [in, size_is(cbData)] void* data );
  299. //
  300. // BUGBUG - We should document that it may be called with internal CI locks
  301. // held - don't call back into CI or get other locks. Fix this limitation
  302. // it is a problem.
  303. //
  304. SCODE NotifyStatus( [in] CI_NOTIFY_STATUS_VALUE status,
  305. [in] ULONG nParams,
  306. [in, size_is(nParams)] const PROPVARIANT *aParams );
  307. }
  308. //+-------------------------------------------------------------------------
  309. //
  310. // Interface : ICiCFilterClient
  311. //
  312. // Description : An interface to control the client component responsible
  313. // for filtering.
  314. //
  315. //+-------------------------------------------------------------------------
  316. LOCAL_INTERFACE(A1E0BCB6-3C24-11D0-8C90-0020AF1D740E)
  317. interface ICiCFilterClient : IUnknown
  318. {
  319. typedef struct tagCI_CLIENT_FILTER_CONFIG_INFO
  320. {
  321. BOOL fSupportsOpLocks;
  322. BOOL fSupportsSecurity;
  323. } CI_CLIENT_FILTER_CONFIG_INFO;
  324. SCODE Init( [in, size_is(cbData)] BYTE const * pbData,
  325. [in] ULONG cbData,
  326. [in] ICiAdminParams * pICiAdminParams );
  327. SCODE GetConfigInfo( [out] CI_CLIENT_FILTER_CONFIG_INFO * pConfigInfo );
  328. SCODE GetOpenedDoc( [out] ICiCOpenedDoc ** ppICiCOpenedDoc );
  329. }
  330. interface ICiManager;
  331. typedef ULONG VOLUMEID;
  332. typedef LONGLONG USN;
  333. typedef ULONG WORKID;
  334. typedef ULONG PROPID;
  335. typedef ULONG SDID;
  336. typedef ULONG PARTITIONID;
  337. typedef DWORD ACCESS_MASK;
  338. //+---------------------------------------------------------------------------
  339. //
  340. // Struct: USN_FLUSH_INFO
  341. //
  342. // Purpose: A structure used to convey information about a
  343. // changelog flush. Each entry has the volumeId and the
  344. // highest USN flushed for that volumeId.
  345. //
  346. //----------------------------------------------------------------------------
  347. typedef struct tagUSN_FLUSH_INFO
  348. {
  349. VOLUMEID volumeId;
  350. USN usnHighest;
  351. } USN_FLUSH_INFO;
  352. //+---------------------------------------------------------------------------
  353. //
  354. // Enum: CI_UPDATE_TYPE
  355. //
  356. // Purpose: Types of updates
  357. //
  358. //----------------------------------------------------------------------------
  359. typedef enum tagCI_UPDATE_TYPE
  360. {
  361. CI_UPDATE_ADD = 0x1, // Document add
  362. CI_UPDATE_DELETE = 0x2, // Document delete
  363. CI_UPDATE_MODIFY = 0x4 // Document modify
  364. } CI_UPDATE_TYPE;
  365. //+---------------------------------------------------------------------------
  366. //
  367. // Enum: CI_ACCESS_MODE
  368. //
  369. // Purpose: Type of access needed for a document.
  370. //
  371. //----------------------------------------------------------------------------
  372. typedef enum tagCI_ACCESS_MODE
  373. {
  374. CI_READ_ACCESS = 0x1,
  375. CI_WRITE_ACCESS = 0x2,
  376. CI_EXECUTE_ACCESS = 0x4
  377. } CI_ACCESS_MODE;
  378. interface ICiCQuerySession;
  379. interface IPropertyMapper;
  380. //+-------------------------------------------------------------------------
  381. //
  382. // Interface : ICiCDocStore
  383. //
  384. // Description : Main interface of the client in the content index.
  385. //
  386. //+-------------------------------------------------------------------------
  387. LOCAL_INTERFACE(46625468-3C32-11D0-8C90-0020AF1D740E)
  388. interface ICiCDocStore : IUnknown
  389. {
  390. //
  391. // BUGBUG - temporary - will have to change. This is to allow
  392. // fetching of the data for updating the perfmon counters.
  393. //
  394. typedef struct tagCI_CLIENT_STATUS
  395. {
  396. ULONG cDocuments; // Total number of documents
  397. } CI_CLIENT_STATUS;
  398. typedef enum tagCI_DISABLE_UPDATE_REASON
  399. {
  400. CI_LOST_UPDATE,
  401. CI_CORRUPT_INDEX,
  402. CI_DISK_FULL
  403. } CI_DISABLE_UPDATE_REASON;
  404. SCODE FlushPropertyStore();
  405. SCODE GetClientStatus( [out] CI_CLIENT_STATUS * pStatus );
  406. SCODE GetContentIndex( [out] ICiManager ** ppICiManager );
  407. SCODE EnableUpdates( void );
  408. SCODE DisableUpdates( [in] BOOL fIncremental,
  409. [in] CI_DISABLE_UPDATE_REASON dwReason );
  410. SCODE ProcessCiDaemonTermination( [in] DWORD dwStatus );
  411. SCODE CheckPointChangesFlushed( [in] FILETIME ftFlushed,
  412. [in] ULONG cEntries,
  413. [in, size_is(cEntries)]
  414. USN_FLUSH_INFO const * const * pUsnEntries );
  415. SCODE GetQuerySession( [out] ICiCQuerySession ** ppICiCQuerySession );
  416. SCODE MarkDocUnReachable( [in] WORKID wid );
  417. SCODE GetPropertyMapper( [out] IPropertyMapper ** ppIPropertyMapper );
  418. SCODE StoreSecurity( [in] WORKID wid,
  419. [in] BYTE const * pbSecurity,
  420. [in] ULONG cbSecurity );
  421. }
  422. //+-------------------------------------------------------------------------
  423. //
  424. // Interface : ICiCDocStoreEx
  425. //
  426. // Description : Extension to ICiCDocStore.
  427. //
  428. //+-------------------------------------------------------------------------
  429. LOCAL_INTERFACE(f98282a7-fa72-11d1-9798-00c04fc2f410)
  430. interface ICiCDocStoreEx : ICiCDocStore
  431. {
  432. SCODE IsNoQuery( [out] BOOL * fNoQuery );
  433. }
  434. //+-------------------------------------------------------------------------
  435. //
  436. // Interface : ICiCDocNameToWorkidTranslator
  437. //
  438. // Description : Interface to do document name to workid translation and
  439. // vice-versa.
  440. //
  441. //+-------------------------------------------------------------------------
  442. LOCAL_INTERFACE(25FC3F54-3CB4-11D0-8C90-0020AF1D740E)
  443. interface ICiCDocNameToWorkidTranslator : IUnknown
  444. {
  445. SCODE QueryDocName( [out] ICiCDocName ** ppICiCDocName );
  446. SCODE WorkIdToDocName( [in] WORKID workId,
  447. [out] ICiCDocName * pICiCDocName );
  448. SCODE DocNameToWorkId( [in] ICiCDocName const * pICiCDocName,
  449. [out] WORKID *pWorkId );
  450. }
  451. //+-------------------------------------------------------------------------
  452. //
  453. // Interface : ICiCDocNameToWorkidTranslatorEx
  454. //
  455. // Description : Interface to do document name to workid translation and
  456. // vice-versa. The Ex version includes an additional API
  457. // to 'try harder and be more accurate' when resolving
  458. // names.
  459. //
  460. //+-------------------------------------------------------------------------
  461. LOCAL_INTERFACE(7BBA76E6-A0E3-11D2-BC5D-00C04FA354BA)
  462. interface ICiCDocNameToWorkidTranslatorEx : ICiCDocNameToWorkidTranslator
  463. {
  464. SCODE WorkIdToAccurateDocName( [in] WORKID workId,
  465. [out] ICiCDocName * pICiCDocName );
  466. }
  467. //+-------------------------------------------------------------------------
  468. //
  469. // Interface : ICiCPropertyStorage
  470. //
  471. // Description : Client interface to store properties.
  472. //
  473. //+-------------------------------------------------------------------------
  474. LOCAL_INTERFACE(4C46225A-3CB5-11D0-8C90-0020AF1D740E)
  475. interface ICiCPropertyStorage : IUnknown
  476. {
  477. SCODE IsPropertyCached( [in] FULLPROPSPEC const * pPropSpec,
  478. [out] BOOL * pfValue );
  479. SCODE StoreProperty( [in] WORKID workId,
  480. [in] FULLPROPSPEC const * pPropSpec,
  481. [in] PROPVARIANT const * pPropVariant );
  482. //
  483. // The following Fetch* methods are not used in the current version of
  484. // CI framework. They are meant for a future version of CI framework.
  485. //
  486. SCODE FetchValueByPid( [in] WORKID workId,
  487. [in] PROPID pid,
  488. [out] PROPVARIANT * pbData,
  489. [in,out] ULONG * pcb );
  490. SCODE FetchValueByPropSpec( [in] WORKID workId,
  491. [in] FULLPROPSPEC const * pPropSpec,
  492. [out] PROPVARIANT * pbData,
  493. [in,out] ULONG * pcb );
  494. SCODE FetchVariantByPid( [in] WORKID workId,
  495. [in] PROPID pid,
  496. [out] PROPVARIANT ** ppVariant );
  497. SCODE FetchVariantByByPropSpec( [in] WORKID workId,
  498. [in] FULLPROPSPEC const * pPropSpec,
  499. [out] PROPVARIANT ** ppVariant );
  500. SCODE ClearNonStoragePropertiesForWid( [in] WORKID wid );
  501. }
  502. //+-------------------------------------------------------------------------
  503. //
  504. // Interface : ICiCPropRetriever
  505. //
  506. // Description : Interface to suport query time retrieval of properties,
  507. // security checking, scope checking, etc.
  508. //
  509. //+-------------------------------------------------------------------------
  510. LOCAL_INTERFACE(77d9b2da-4401-11d0-8c91-0020af1d740e)
  511. interface ICiCPropRetriever : IUnknown
  512. {
  513. SCODE BeginPropertyRetrieval( [in] WORKID wid );
  514. SCODE RetrieveValueByPid( [in] PROPID pid,
  515. [out] PROPVARIANT * pbData,
  516. [in,out] ULONG * pcb );
  517. SCODE RetrieveValueByPropSpec( [in] FULLPROPSPEC const * pPropSpec,
  518. [out] PROPVARIANT * pbData,
  519. [in,out] ULONG * pcb );
  520. SCODE FetchSDID( [out] SDID * pSDID );
  521. SCODE CheckSecurity( [in] ACCESS_MASK am,
  522. [out] BOOL * pfGranted );
  523. SCODE IsInScope( [out] BOOL * pfInScope );
  524. SCODE EndPropertyRetrieval();
  525. }
  526. //+-------------------------------------------------------------------------
  527. //
  528. // Interface : ICiCDeferredPropRetriever
  529. //
  530. // Description : Interface to suport retrieval of deferred properties
  531. //
  532. // Notes : It's the responsibility of the caller to free the variant
  533. // by calling VariantClear on pVar
  534. //
  535. //+-------------------------------------------------------------------------
  536. LOCAL_INTERFACE(c273af70-6d72-11d0-8d64-00a0c908dbf1)
  537. interface ICiCDeferredPropRetriever : IUnknown
  538. {
  539. SCODE RetrieveDeferredValueByPid( [in] WORKID wid,
  540. [in] PROPID pid,
  541. [out] PROPVARIANT * pVar );
  542. SCODE RetrieveDeferredValueByPropSpec( [in] WORKID wid,
  543. [in] FULLPROPSPEC const * pPropSpec,
  544. [out] PROPVARIANT * pVar );
  545. }
  546. //+-------------------------------------------------------------------------
  547. //
  548. // Interface : ICiCScopeEnumerator
  549. //
  550. // Description : Interface to enumerate.
  551. //
  552. //+-------------------------------------------------------------------------
  553. LOCAL_INTERFACE(CF8505EA-3CCA-11D0-8C90-0020AF1D740E)
  554. interface ICiCScopeEnumerator : IUnknown
  555. {
  556. SCODE Begin( void );
  557. SCODE CurrentDocument( [out] WORKID * pWorkId );
  558. SCODE NextDocument( [out] WORKID * pWorkId );
  559. SCODE RatioFinished( [out] ULONG * pulDenominator,
  560. [out] ULONG * pulNumerator );
  561. SCODE End( void );
  562. }
  563. //+-------------------------------------------------------------------------
  564. //
  565. // Interface : ICiQueryPropertyMapper
  566. //
  567. // Description : Converts propspec to pid and vice-versa. It differs from
  568. // IPropertyMapper because it can convert properties that are
  569. // of interest to a given query only
  570. //
  571. //+-------------------------------------------------------------------------
  572. LOCAL_INTERFACE(D2333EB0-756B-11D0-8D66-00A0C908DBF1)
  573. interface ICiQueryPropertyMapper : IUnknown
  574. {
  575. SCODE PropertyToPropid( [in] FULLPROPSPEC const * pFullPropSpec,
  576. [out] PROPID * pPropId );
  577. SCODE PropidToProperty( [in] PROPID pid,
  578. [out] FULLPROPSPEC const ** ppPropSpec );
  579. }
  580. //+-------------------------------------------------------------------------
  581. //
  582. // Interface : ICiCQuerySession
  583. //
  584. // Description : A resource manager for a query on the client side.
  585. //
  586. //+-------------------------------------------------------------------------
  587. interface IDBProperties;
  588. LOCAL_INTERFACE(AE461FD6-4E1D-11D0-8C94-0020AF1D740E)
  589. interface ICiCQuerySession : IUnknown
  590. {
  591. typedef enum tagCI_ENUM_OPTIONS
  592. {
  593. CI_ENUM_MUST,
  594. CI_ENUM_NEVER,
  595. CI_ENUM_SMALL,
  596. CI_ENUM_BIG,
  597. CI_ENUM_MUST_NEVER_DEFER
  598. } CI_ENUM_OPTIONS;
  599. SCODE Init( [in] ULONG nProps,
  600. [in, size_is(nProps)] FULLPROPSPEC const * const * apPropSpec,
  601. [in] IDBProperties *pDBProperties,
  602. [in] ICiQueryPropertyMapper *pQueryPropertyMapper );
  603. SCODE GetEnumOption( [out] CI_ENUM_OPTIONS * pEnumOption );
  604. SCODE CreatePropRetriever( [out] ICiCPropRetriever ** ppICiCPropRetriever );
  605. SCODE CreateDeferredPropRetriever( [out] ICiCDeferredPropRetriever ** ppICiCDefPropRetriever );
  606. SCODE CreateEnumerator( [out] ICiCScopeEnumerator ** ppICiCEnumerator );
  607. }
  608. interface ICiManager;
  609. //+-------------------------------------------------------------------------
  610. //
  611. // Interface : ICiControl
  612. //
  613. // Description : An interface that controls the construction, destruction,
  614. // lookup of multiple content index instances.
  615. //
  616. //+-------------------------------------------------------------------------
  617. LOCAL_INTERFACE(63DEB7F4-3CCB-11D0-8C90-0020AF1D740E)
  618. interface ICiControl : IUnknown
  619. {
  620. SCODE CreateContentIndex( [in] ICiCDocStore * pICiDocStore,
  621. [out] ICiManager ** ppICiManager );
  622. }
  623. cpp_quote("#define CI_CONFIG_ENABLE_INDEXING 0x1")
  624. cpp_quote("#define CI_CONFIG_ENABLE_QUERYING 0x2")
  625. cpp_quote("#define CI_CONFIG_ENABLE_INDEXING 0x1")
  626. cpp_quote("#define CI_CONFIG_ENABLE_QUERYING 0x2")
  627. cpp_quote("#define CI_CONFIG_READONLY 0x4")
  628. cpp_quote("#define CI_CONFIG_INPROCESS_FILTERING 0x8")
  629. cpp_quote("#define CI_CONFIG_ENABLE_BULK_SECURITY 0x10")
  630. cpp_quote("#define CI_CONFIG_ENABLE_INDEX_MIGRATION 0x20")
  631. cpp_quote("#define CI_CONFIG_PROVIDE_PROPERTY_MAPPER 0x40")
  632. cpp_quote("#define CI_CONFIG_EMPTY_DATA 0x80")
  633. cpp_quote("#define CI_CONFIG_PUSH_FILTERING 0x100")
  634. cpp_quote("#define CI_CONFIG_LOAD_FROM_FILES 0x200")
  635. typedef ULONG CI_STARTUP_FLAGS;
  636. //+-------------------------------------------------------------------------
  637. //
  638. // Interface : ICiStartup
  639. //
  640. // Description : Interface to specify the startup information to Content Index.
  641. //
  642. //+-------------------------------------------------------------------------
  643. LOCAL_INTERFACE(68232cb8-3ccc-11d0-8c90-0020af1d740e)
  644. interface ICiStartup : IUnknown
  645. {
  646. typedef struct tagCI_STARTUP_INFO
  647. {
  648. CI_STARTUP_FLAGS startupFlags;
  649. CLSID clsidDaemonClientMgr;
  650. BOOL fFull;
  651. BOOL fCallerOwnsFiles;
  652. IEnumString * pFileList;
  653. } CI_STARTUP_INFO;
  654. SCODE StartupContentIndex(
  655. [string,in] WCHAR const * pwszCiDirectory,
  656. [in] CI_STARTUP_INFO * pStartupInfo,
  657. [in] IProgressNotify * pIProgressNotify,
  658. [in] BOOL * pfAbort );
  659. SCODE StartupNullContentIndex(
  660. [in] CI_STARTUP_INFO * pStartupInfo,
  661. [in] IProgressNotify * pIProgressNotify,
  662. [in] BOOL * pfAbort );
  663. }
  664. //+-------------------------------------------------------------------------
  665. //
  666. // Interface : ICiEnumWorkids
  667. //
  668. // Description : An interface provides the ability to enumerate workids.
  669. //
  670. //+-------------------------------------------------------------------------
  671. LOCAL_INTERFACE(77900150-A09C-11D0-A80D-00A0C906241A)
  672. interface ICiEnumWorkids : IUnknown
  673. {
  674. SCODE Count( [out] ULONG * pcWorkIds );
  675. SCODE Reset();
  676. SCODE Next( [in] ULONG celt,
  677. [out,size_is(celt)] WORKID * rgelt,
  678. [out] ULONG *pceltFetched );
  679. SCODE Skip( [in] ULONG celt );
  680. }
  681. //+-------------------------------------------------------------------------
  682. //
  683. // Interface : ICiPersistIncrFile
  684. //
  685. // Description : An interface that allows saving and loading of ci
  686. // persistent data.
  687. //
  688. //+-------------------------------------------------------------------------
  689. LOCAL_INTERFACE(31B311E2-4498-11D0-8C91-0020AF1D740E)
  690. interface ICiPersistIncrFile : IUnknown
  691. {
  692. SCODE Load( [in] BOOL fFull,
  693. [in] BOOL fCallerOwnsFiles,
  694. [in] IEnumString * pIFileList,
  695. [in] IProgressNotify * pIProgressNotify,
  696. [in] BOOL * pfAbort );
  697. SCODE Save( [string, in] WCHAR const * pwszSaveDirectory,
  698. [in] BOOL fFull,
  699. [in] IProgressNotify * pIProgressNotify,
  700. [in] BOOL * pfAbort,
  701. [out] ICiEnumWorkids ** ppWorkidList,
  702. [out] IEnumString ** ppFileList,
  703. [out] BOOL * pfFull,
  704. [out] BOOL * pfCallerOwnsFiles
  705. );
  706. SCODE SaveCompleted();
  707. }
  708. typedef ULONG CIF_STATE_FLAGS;
  709. cpp_quote("#define CIF_STATE_SHADOW_MERGE 0x001")
  710. cpp_quote("#define CIF_STATE_MASTER_MERGE 0x002")
  711. cpp_quote("#define CIF_STATE_CONTENT_SCAN_REQUIRED 0x004")
  712. cpp_quote("#define CIF_STATE_ANNEALING_MERGE 0x008")
  713. cpp_quote("#define CIF_STATE_INDEX_MIGRATION_MERGE 0x010")
  714. cpp_quote("#define CIF_STATE_LOW_MEMORY 0x020")
  715. cpp_quote("#define CIF_STATE_HIGH_IO 0x040")
  716. cpp_quote("#define CIF_STATE_MASTER_MERGE_PAUSED 0x080")
  717. cpp_quote("#define CIF_STATE_BATTERY_POWER 0x100")
  718. cpp_quote("#define CIF_STATE_USER_ACTIVE 0x200")
  719. typedef enum tagCI_MERGE_TYPE
  720. {
  721. CI_ANY_MERGE = 0,
  722. CI_MASTER_MERGE = 1,
  723. CI_SHADOW_MERGE = 2,
  724. CI_ANNEALING_MERGE = 3
  725. } CI_MERGE_TYPE;
  726. //+-------------------------------------------------------------------------
  727. //
  728. // Interface : ICiManager
  729. //
  730. // Description : Main interface for Content Index.
  731. // Supports QueryInterface to ICiAdminParams
  732. //
  733. //+-------------------------------------------------------------------------
  734. LOCAL_INTERFACE(CF0FCF56-3CCE-11D0-8C90-0020AF1D740E)
  735. interface ICiManager : IUnknown
  736. {
  737. typedef struct tagCI_DOCUMENT_UPDATE_INFO
  738. {
  739. WORKID workId;
  740. VOLUMEID volumeId;
  741. USN usn;
  742. PARTITIONID partId;
  743. CI_UPDATE_TYPE change;
  744. } CI_DOCUMENT_UPDATE_INFO;
  745. typedef struct tagCIF_STATE
  746. {
  747. DWORD cbStruct; // size of the struct passed
  748. DWORD cWordList; // # of wordlists
  749. DWORD cPersistentIndex; // # of persistent indexes
  750. DWORD cQueries; // # of running queries
  751. DWORD cDocuments; // # of documents to filter
  752. DWORD cFreshTest; // # of entires in the fresh test
  753. DWORD dwMergeProgress; // % done in current merge
  754. CIF_STATE_FLAGS eState; // bit array of state information
  755. DWORD cFilteredDocuments; // # of documents filtered thus far
  756. DWORD dwIndexSize; // Total size (in MB) of index
  757. DWORD cUniqueKeys; // # of unique keys in index
  758. DWORD cSecQDocuments; // # of documents in secondary Q
  759. } CIF_STATE;
  760. SCODE GetStatus( [out] CIF_STATE * pCiState );
  761. SCODE Empty(void);
  762. SCODE Shutdown(void);
  763. SCODE UpdateDocument( [in] CI_DOCUMENT_UPDATE_INFO const * pInfo );
  764. SCODE UpdateDocuments( [in] ULONG cDocs,
  765. [in, size_is(cDocs)] CI_DOCUMENT_UPDATE_INFO const * aInfo );
  766. SCODE StartFiltering( [in] ULONG cbData,
  767. [in, size_is(cbData)] BYTE const * pbData );
  768. SCODE FlushUpdates(void);
  769. SCODE GetAdminParams( [out] ICiAdminParams ** ppICiAdminParams );
  770. SCODE QueryRcovStorage( [out] IUnknown ** ppIUnknown );
  771. SCODE ForceMerge( CI_MERGE_TYPE mt );
  772. SCODE AbortMerge(void);
  773. SCODE IsQuiesced( BOOL * pfState );
  774. SCODE GetPropertyMapper( [out] IPropertyMapper ** ppIPropertyMapper );
  775. SCODE IsNullCatalog( BOOL * pfNull );
  776. }
  777. //+-------------------------------------------------------------------------
  778. //
  779. // Interface : IPropertyMapper
  780. //
  781. // Description : Maps a FULLPROPSPEC to a 32 bit PROPID and vice-versa.
  782. // This can be provided either by Content Index or the client.
  783. //
  784. //+-------------------------------------------------------------------------
  785. LOCAL_INTERFACE(B324B226-41A0-11D0-8C91-0020AF1D740E)
  786. interface IPropertyMapper : IUnknown
  787. {
  788. SCODE PropertyToPropid( [in] FULLPROPSPEC const * pFullPropSpec,
  789. [in] BOOL fCreate,
  790. [out] PROPID * pPropId );
  791. SCODE PropidToProperty( [in] PROPID pid,
  792. [out] FULLPROPSPEC ** ppPropSpec );
  793. }
  794. //+-------------------------------------------------------------------------
  795. //
  796. // Interface : ICiCDocStoreLocator
  797. //
  798. // Description : A client provided interface to locate a docstore given
  799. // the client supplied parameters set on the data source
  800. // object.
  801. //
  802. // Notes : ICiCDocStoreLocator is used only by the File System
  803. // Client of framework until the transport interface to
  804. // enable remoting of CI is speced, ie, running CI in a
  805. // client and a server process.
  806. //
  807. //+-------------------------------------------------------------------------
  808. LOCAL_INTERFACE(97EE7C06-5908-11D0-8C9B-0020AF1D740E)
  809. interface ICiCDocStoreLocator : IUnknown
  810. {
  811. SCODE LookUpDocStore( [in] IDBProperties * pIDBProperties,
  812. [out] ICiCDocStore ** ppICiCDocStore,
  813. [in] BOOL fMustAlreadyBeOpen );
  814. SCODE Shutdown();
  815. SCODE GetDocStoreState( [in] WCHAR const * pwcDocStore,
  816. [out] ICiCDocStore ** ppICiCDocStore,
  817. [out] DWORD * pdwState );
  818. SCODE IsMarkedReadOnly( [in] WCHAR const * wcsCat, [out] BOOL * pfReadOnly );
  819. SCODE IsVolumeOrDirRO( [in] WCHAR const * wcsCat, [out] BOOL * pfReadOnly );
  820. SCODE OpenAllDocStores( );
  821. SCODE StopCatalogsOnVol( [in] WCHAR wcVol, [in] void * pRequestQ );
  822. SCODE StartCatalogsOnVol( [in] WCHAR wcVol, [in] void * pRequestQ );
  823. SCODE AddStoppedCat( [in] DWORD dwOldState, [in] WCHAR const * wcsCatName );
  824. }
  825. //+-------------------------------------------------------------------------
  826. //
  827. // Interface : ICiISearchCreator
  828. //
  829. // Description : An interface for creating the CSearch object provided by
  830. // the CI framework.
  831. //
  832. //+-------------------------------------------------------------------------
  833. interface ISearchQueryHits;
  834. typedef struct tagDBCOMMANDTREE DBCOMMANDTREE;
  835. LOCAL_INTERFACE(7DC07FA0-902E-11D0-A80C-00A0C906241A)
  836. interface ICiISearchCreator : IUnknown
  837. {
  838. SCODE CreateISearch( [in] DBCOMMANDTREE * pRst,
  839. [in] ICiCLangRes * pILangRes,
  840. [in] ICiCOpenedDoc * pOpenedDoc,
  841. [out] ISearchQueryHits ** ppISearch );
  842. }
  843. //
  844. // Class ids of objects provided by the CI framework that can be created
  845. // using COM ( eg. CoCreateInstance)
  846. //
  847. //+-------------------------------------------------------------------------
  848. //
  849. // ClassId : CLSID_NLCiControl
  850. //
  851. // Description : ClassId of the CiControl object in ocifrmwrk.dll.
  852. //
  853. //+-------------------------------------------------------------------------
  854. // 47C67B50-70B5-11D0-A808-00A0C906241A
  855. cpp_quote("#define CLSID_NLCiControl { 0x47c67b50,0x70b5,0x11d0,{0xa8, 0x08, 0x00, 0xa0, 0xc9, 0x06, 0x24, 0x1a}}" )
  856. //+-------------------------------------------------------------------------
  857. //
  858. // ClassId : CLSID_CiControl
  859. //
  860. // Description : ClassId of the CiControl object in cifrmwrk.dll.
  861. //
  862. //+-------------------------------------------------------------------------
  863. // 1E9685E6-DB6D-11d0-BB63-00C04FC2F410
  864. cpp_quote("#define CLSID_CiControl { 0x1e9685e6, 0xdb6d, 0x11d0, {0xbb, 0x63, 0x0, 0xc0, 0x4f, 0xc2, 0xf4, 0x10 }}" )
  865. //+-------------------------------------------------------------------------
  866. //
  867. // ClassId : CLSID_ISearchCreator
  868. //
  869. // Description : ClassId of the ISearchCreator object. This object can be
  870. // used to create an object implementing ISearchQueryHits interface.
  871. //
  872. //+-------------------------------------------------------------------------
  873. // 1F247DC0-902E-11D0-A80C-00A0C906241A
  874. cpp_quote("#define CLSID_ISearchCreator {0x1F247DC0, 0x902E, 0x11D0, {0xA8,0x0C,0x00,0xA0,0xC9,0x06,0x24,0x1A} }")
  875. //+-------------------------------------------------------------------------
  876. //
  877. // ClassId : CLSID_TextIFilter
  878. //
  879. // Description : ClassId of the text filter implemented by CI framework.
  880. //
  881. //+-------------------------------------------------------------------------
  882. // C1243CA0-BF96-11CD-B579-08002B30BFEB
  883. cpp_quote("#define CLSID_TextIFilter {0xC1243CA0, 0xBF96, 0x11CD, {0xB5,0x79,0x08,0x00,0x2B,0x30,0xBF,0xEB } }")
  884. //+-------------------------------------------------------------------------
  885. //
  886. // ClassId : GUID_Characterization
  887. //
  888. // Description : Use GUID_Characterization,"Description" as the FULLPROPSPEC
  889. // for using a property as characterization.
  890. //
  891. //+-------------------------------------------------------------------------
  892. // D1B5D3F0-C0B3-11CF-9A92-00A0C908DBF1
  893. cpp_quote("#define GUID_Characterization {0xD1B5D3F0, 0xC0B3, 0x11CF, {0x9A,0x92,0x00,0xA0,0xC9,0x08,0xDB,0xF1 } }")
  894. interface ICiCIndexNotificationStatus;
  895. interface ICiIndexNotificationEntry;
  896. //+-------------------------------------------------------------------------
  897. //
  898. // Interface : ICiIndexNotification
  899. //
  900. // Description : An interface provided by the push filtering framework that
  901. // accepts document change notifications.
  902. //
  903. //+-------------------------------------------------------------------------
  904. LOCAL_INTERFACE(4F2CD6E0-8E74-11D0-8D69-00A0C908DBF1)
  905. interface ICiIndexNotification : IUnknown
  906. {
  907. SCODE AddNotification( [in] WORKID wid,
  908. [in] ICiCIndexNotificationStatus *pIndexNotifStatus,
  909. [out] ICiIndexNotificationEntry **ppIndexNotifEntry );
  910. SCODE ModifyNotification( [in] WORKID wid,
  911. [in] ICiCIndexNotificationStatus *pIndexNotifStatus,
  912. [out] ICiIndexNotificationEntry **ppIndexNotifEntry );
  913. SCODE DeleteNotification( [in] WORKID wid,
  914. [in] ICiCIndexNotificationStatus *pIndexNotifStatus );
  915. }
  916. //+-------------------------------------------------------------------------
  917. //
  918. // Interface : ICiIndexNotificationEntry
  919. //
  920. // Description : An interface provided by the push filtering framework that
  921. // accepts the text and properties in of a modified document.
  922. //
  923. //+-------------------------------------------------------------------------
  924. LOCAL_INTERFACE(210769D0-8E75-11D0-8D69-00A0C908DBF1)
  925. interface ICiIndexNotificationEntry : IUnknown
  926. {
  927. SCODE AddText( [in] STAT_CHUNK const * pStatChunk,
  928. [in] WCHAR const * pwszText );
  929. SCODE AddProperty( [in] STAT_CHUNK const * pStatChunk,
  930. [in] PROPVARIANT const * pPropVariant );
  931. SCODE AddCompleted( [in] ULONG fAbort );
  932. }
  933. //+-------------------------------------------------------------------------
  934. //
  935. // Interface : ICiCIndexNotificationStatus
  936. //
  937. // Description : A client provided interface used by the push filtering
  938. // framework to notify completion status to client. Commit
  939. // means that the document notification has been persisted in
  940. // the CI indexes. An abort means that the client should retry
  941. // the notification. Note: the client should be careful about
  942. // requeuing deletes. Finally, the simple filtering framework
  943. // does not handle failures of Commit or Abort, say by retrying
  944. // at a later time. Commit and Abort are expected to succeed.
  945. //
  946. //+-------------------------------------------------------------------------
  947. LOCAL_INTERFACE(5FFF3840-8E76-11D0-8D69-00A0C908DBF1)
  948. interface ICiCIndexNotificationStatus : IUnknown
  949. {
  950. SCODE Commit();
  951. SCODE Abort();
  952. }
  953. //+-------------------------------------------------------------------------
  954. //
  955. // Interface : ISimpleCommandCreator
  956. //
  957. // Description : A CI provided interface that exposes ICommand for CI.
  958. //
  959. //+-------------------------------------------------------------------------
  960. interface ICommand;
  961. LOCAL_INTERFACE(5e341ab7-02d0-11d1-900c-00a0c9063796)
  962. interface ISimpleCommandCreator : IUnknown
  963. {
  964. SCODE CreateICommand( IUnknown ** ppIUnknown, IUnknown * pOuterUnk );
  965. SCODE VerifyCatalog( WCHAR const * pwszMachine, WCHAR const * pwszCatalogName );
  966. SCODE GetDefaultCatalog( WCHAR * pwszCatalogName, ULONG cwcIn, ULONG * pcwcOut );
  967. }
  968. //+-------------------------------------------------------------------------
  969. //
  970. // ClassId : CLSID_CISimpleCommandCreator
  971. //
  972. // Description : ClassId of the simple command creator implemented by CI.
  973. //
  974. //+-------------------------------------------------------------------------
  975. // C7B6C04A-CBB5-11d0-BB4C-00C04FC2F410
  976. cpp_quote("#define CLSID_CISimpleCommandCreator {0xc7b6c04a, 0xcbb5, 0x11d0, {0xbb, 0x4c, 0x0, 0xc0, 0x4f, 0xc2, 0xf4, 0x10 } }")
  977. //
  978. // All of the following interfaces (from here till eof) are not used in the current version
  979. // of CI framework. They are meant for a future version of CI framework.
  980. //
  981. //+-------------------------------------------------------------------------
  982. //
  983. // Interface : ICiCScope
  984. //
  985. // Description : An interface encapsulating a scope.
  986. //
  987. //+-------------------------------------------------------------------------
  988. LOCAL_INTERFACE(1021C882-3CC0-11D0-8C90-0020AF1D740E)
  989. interface ICiCScope : IUnknown
  990. {
  991. SCODE Init( [in] ULONG cbData,
  992. [in, size_is(cbData)] BYTE const * pbData );
  993. SCODE Clear(void);
  994. SCODE IsValid(void) const;
  995. SCODE QueryScope( [out] ICiCScope ** ppICiCScope ) const;
  996. SCODE GetScope( [out,size_is(*pcbData) ] BYTE * pbScope,
  997. [in,out] ULONG * pcbData );
  998. }
  999. //+-------------------------------------------------------------------------
  1000. //
  1001. // Interface : ICiCScopeChecker
  1002. //
  1003. // Description : Interface to test if a document is in a given set of scopes.
  1004. //
  1005. //+-------------------------------------------------------------------------
  1006. LOCAL_INTERFACE(7D820C9C-3CBC-11D0-8C90-0020AF1D740E)
  1007. interface ICiCScopeChecker : IUnknown
  1008. {
  1009. SCODE IsWorkidInScope( [in] ICiCScope const * pIScope,
  1010. [in] WORKID workId,
  1011. [out] BOOL * pfInScope );
  1012. SCODE IsDocNameInScope( [in] ICiCScope const * pIScope,
  1013. [in] ICiCDocName const * pICiCDocName,
  1014. [out] BOOL * pfInScope );
  1015. }
  1016. //+-------------------------------------------------------------------------
  1017. //
  1018. // Interface : ICiCUserSecurity
  1019. //
  1020. // Description : An interface to encapsulate a user's security identity.
  1021. //
  1022. //+-------------------------------------------------------------------------
  1023. LOCAL_INTERFACE(5D01D9CE-3CC2-11D0-8C90-0020AF1D740E)
  1024. interface ICiCUserSecurity : IUnknown
  1025. {
  1026. SCODE Init( [in] ULONG cbData,
  1027. [in, size_is(cbData)] BYTE const * pbData );
  1028. SCODE Clear(void);
  1029. SCODE IsValid( [out] BOOL * pfValid ) const ;
  1030. SCODE GetSecurityInfo( [out, size_is(*pcbData)] BYTE * pbData,
  1031. [in,out] ULONG * pcbData );
  1032. }
  1033. //+-------------------------------------------------------------------------
  1034. //
  1035. // Interface : ICiCSecurityChecker
  1036. //
  1037. // Description : An interface capable of checking if a given document allows
  1038. // the desired access to a user. Capable of doing bulk security
  1039. // checking also.
  1040. //
  1041. //+-------------------------------------------------------------------------
  1042. LOCAL_INTERFACE(CA130CF4-3CC2-11D0-8C90-0020AF1D740E)
  1043. interface ICiCSecurityChecker : IUnknown
  1044. {
  1045. SCODE AccessCheck( [in] ICiCUserSecurity const * pICiCUserSecurity,
  1046. [in] SDID sdid,
  1047. [in] CI_ACCESS_MODE am,
  1048. [out] BOOL * pfGranted );
  1049. SCODE BulkAccessCheck( [in] ICiCUserSecurity const * pICiCUserSecurity,
  1050. [in] ULONG nIds,
  1051. [in, size_is(nIds)] SDID const * aSDID,
  1052. [in, size_is(nIds)] CI_ACCESS_MODE const * pam,
  1053. [out, size_is(nIds)] BOOL * afGranted );
  1054. }
  1055. //+-------------------------------------------------------------------------
  1056. //
  1057. // Interface : ICiDocChangeNotifySink
  1058. //
  1059. // Description : Interface capable of accepting document change notifications.
  1060. //
  1061. //+-------------------------------------------------------------------------
  1062. LOCAL_INTERFACE(8BFA1386-3CE5-11D0-8C90-0020AF1D740E)
  1063. interface ICiDocChangeNotifySink : IUnknown
  1064. {
  1065. SCODE ProcessWorkidChange( [in] WORKID wid,
  1066. [in] CI_UPDATE_TYPE change );
  1067. SCODE ProcessDocNameChange( [in] ICiCDocName * pICiCDocName,
  1068. [in] CI_UPDATE_TYPE change );
  1069. }
  1070. //+-------------------------------------------------------------------------
  1071. //
  1072. // Interface : ICiCQueryNotification
  1073. //
  1074. // Description : Interface to support document change notifications during
  1075. // query processing.
  1076. //
  1077. //+-------------------------------------------------------------------------
  1078. LOCAL_INTERFACE(0A9E9F6C-3CE2-11D0-8C90-0020AF1D740E)
  1079. interface ICiCQueryNotification : IUnknown
  1080. {
  1081. SCODE RegisterScope( [in] ICiDocChangeNotifySink * pINotifySink,
  1082. [in] ICiCScope const * pICiCScope,
  1083. [out] HANDLE * phNotify );
  1084. SCODE CloseNotifications( [in] HANDLE hNotify );
  1085. }
  1086. //+-------------------------------------------------------------------------
  1087. //
  1088. // Interface : ICiCEventLogItem
  1089. //
  1090. // Description : A client provided interface to log events.
  1091. //
  1092. //+-------------------------------------------------------------------------
  1093. LOCAL_INTERFACE(44CC886A-4314-11D0-8C91-0020AF1D740E)
  1094. interface ICiCEventLogItem : IUnknown
  1095. {
  1096. SCODE Init( [in,string] WCHAR const * pwszEventSource,
  1097. [in] DWORD dwMsgId );
  1098. SCODE AddDWordParam( [in] DWORD dwParam );
  1099. SCODE AddAsciiString( [in, string] char const * pszParam );
  1100. SCODE AddUnicodeString( [in, string] WCHAR const * pwszParam );
  1101. SCODE AddVariantParam( [in] PROPVARIANT const * pVarnt );
  1102. SCODE AddData( [in] ULONG cbData,
  1103. [in, size_is(cbData)] BYTE const * pbData );
  1104. SCODE WriteEvent( void );
  1105. }
  1106. //+-------------------------------------------------------------------------
  1107. //
  1108. // Interface : ICiCFilterStatus
  1109. //
  1110. // Description : Per-object filtering status
  1111. //
  1112. //+-------------------------------------------------------------------------
  1113. LOCAL_INTERFACE(BC5F3D60-8BBC-11D1-8F73-00A0C91917F5)
  1114. interface ICiCFilterStatus : IUnknown
  1115. {
  1116. SCODE PreFilter( [in, size_is(cbName)] BYTE const * pbName,
  1117. [in] ULONG cbName );
  1118. SCODE PostFilter( [in, size_is(cbName)] BYTE const * pbName,
  1119. [in] ULONG cbName,
  1120. [in] SCODE scFilterStatus );
  1121. }
  1122. //+-------------------------------------------------------------------------
  1123. //
  1124. // Interface : ICiCResourceMonitor
  1125. //
  1126. // Description : Allows client to monitor resources (i/o, memory, etc.)
  1127. //
  1128. //+-------------------------------------------------------------------------
  1129. LOCAL_INTERFACE(F700FF8E-20EE-11D2-80F7-00C04FA354BA)
  1130. interface ICiCResourceMonitor : IUnknown
  1131. {
  1132. SCODE IsMemoryLow();
  1133. SCODE IsBatteryLow();
  1134. SCODE IsIoHigh( [in] BOOL * pfAbort );
  1135. SCODE IsUserActive( BOOL fCheckLongTermActivity );
  1136. SCODE SampleUserActivity();
  1137. SCODE IsOnBatteryPower();
  1138. }