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.

107 lines
3.4 KiB

  1. // ITQUERY.H: IITIndex and IITQuery interface declarations
  2. #ifndef __ITQUERY_H__
  3. #define __ITQUERY_H__
  4. #include "iterror.h"
  5. // {8fa0d5a3-dedf-11d0-9a61-00c04fb68bf7} (changed from IT 3.0)
  6. DEFINE_GUID(IID_IITIndex,
  7. 0x8fa0d5a3, 0xdedf, 0x11d0, 0x9a, 0x61, 0x00, 0xc0, 0x4f, 0xb6, 0x8b, 0xf7);
  8. #ifdef ITPROXY
  9. // {A38D3483-8C49-11d0-A84E-00AA006C7D01}
  10. DEFINE_GUID(CLSID_IITIndex,
  11. 0xa38d3483, 0x8c49, 0x11d0, 0xa8, 0x4e, 0x0, 0xaa, 0x0, 0x6c, 0x7d, 0x1);
  12. #else
  13. // {4662daad-d393-11d0-9a56-00c04fb68bf7} (changed from IT 3.0)
  14. DEFINE_GUID(CLSID_IITIndexLocal,
  15. 0x4662daad, 0xd393, 0x11d0, 0x9a, 0x56, 0x00, 0xc0, 0x4f, 0xb6, 0x8b, 0xf7);
  16. #endif // ITPROXY
  17. // {8fa0d5ac-dedf-11d0-9a61-00c04fb68bf7} (changed from IT 3.0)
  18. DEFINE_GUID(IID_IITQuery,
  19. 0x8fa0d5ac, 0xdedf, 0x11d0, 0x9a, 0x61, 0x00, 0xc0, 0x4f, 0xb6, 0x8b, 0xf7);
  20. // {4662daa6-d393-11d0-9a56-00c04fb68bf7} (changed from IT 3.0)
  21. DEFINE_GUID(CLSID_IITQuery,
  22. 0x4662daa6, 0xd393, 0x11d0, 0x9a, 0x56, 0x00, 0xc0, 0x4f, 0xb6, 0x8b, 0xf7);
  23. // Defines
  24. #define IMPLICIT_AND 0x0000
  25. #define IMPLICIT_OR 0x0001
  26. #define COMPOUNDWORD_PHRASE 0x0010 // use PHRASE opr for compound words
  27. #define QUERYRESULT_RANK 0x0100 // Ranked the result. If not highest hit 1st (topics in UID order)
  28. #define QUERYRESULT_UIDSORT 0x0200 // Result topics are 1st in 1st out
  29. #define QUERYRESULT_SKIPOCCINFO 0x8000 // Topic list only, no occurrence info
  30. #define STEMMED_SEARCH 0x00010000
  31. #define RESULTSET_ASYNC 0x00020000
  32. #define QUERY_GETTERMS 0x00080000 // Return with each set of occurrence
  33. // data a pointer to the term string
  34. // that the data is associated with.
  35. // Standard properties
  36. #define STDPROP_SEARCHBASE 500
  37. #define STDPROP_FIELD STDPROP_SEARCHBASE
  38. #define STDPROP_LENGTH (STDPROP_SEARCHBASE + 1)
  39. #define STDPROP_COUNT (STDPROP_SEARCHBASE + 2)
  40. #define STDPROP_OFFSET (STDPROP_SEARCHBASE + 3)
  41. #define STDPROP_TERM_UNICODE_ST (STDPROP_SEARCHBASE + 4)
  42. // Don't know signature of callbacks yet
  43. typedef void (*LPFNCBBREAK)(void);
  44. typedef void (*LPFNRESULTCB)(void);
  45. // Forward declarations
  46. interface IITResultSet;
  47. interface IITQuery;
  48. interface IITDatabase;
  49. interface IITGroup;
  50. DECLARE_INTERFACE_(IITIndex, IUnknown)
  51. {
  52. STDMETHOD(Open)(IITDatabase* pITDB, LPCWSTR lpszIndexMoniker, BOOL fInsideDB) PURE;
  53. STDMETHOD(Close)(void) PURE;
  54. STDMETHOD(GetLocaleInfo)(DWORD *pdwCodePageID, LCID *plcid) PURE;
  55. STDMETHOD(GetWordBreakerInstance)(DWORD *pdwObjInstance) PURE;
  56. STDMETHOD(CreateQueryInstance)(IITQuery** ppITQuery) PURE;
  57. STDMETHOD(Search)(IITQuery* pITQuery, IITResultSet* pITResult) PURE;
  58. STDMETHOD(Search)(IITQuery* pITQuery, IITGroup* pITGroup) PURE;
  59. };
  60. typedef IITIndex* PITINDEX;
  61. DECLARE_INTERFACE_(IITQuery, IUnknown)
  62. {
  63. STDMETHOD(SetResultCallback)(FCALLBACK_MSG *pfcbkmsg) PURE;
  64. STDMETHOD(SetCommand)(LPCWSTR lpszCommand) PURE;
  65. STDMETHOD(SetOptions)(DWORD dwFlags) PURE;
  66. STDMETHOD(SetProximity)(WORD wNear) PURE;
  67. STDMETHOD(SetGroup)(IITGroup* pITGroup) PURE;
  68. STDMETHOD(SetResultCount)(LONG cRows) PURE;
  69. STDMETHOD(GetResultCallback)(FCALLBACK_MSG *pfcbkmsg) PURE;
  70. STDMETHOD(GetCommand)(LPCWSTR& lpszCommand) PURE;
  71. STDMETHOD(GetOptions)(DWORD& dwFlags) PURE;
  72. STDMETHOD(GetProximity)(WORD& wNear) PURE;
  73. STDMETHOD(GetGroup)(IITGroup** ppiitGroup) PURE;
  74. STDMETHOD(GetResultCount)(LONG& cRows) PURE;
  75. STDMETHOD(ReInit)() PURE;
  76. };
  77. typedef IITQuery* PITQUERY;
  78. #endif // __ITQUERY_H__