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.

154 lines
4.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Monarch / Index Server Parser
  4. // Copyright (c) Microsoft Corporation, 1997 - 1998.
  5. //
  6. // File: MParser.idl
  7. //
  8. // Contents: Interface definition
  9. //
  10. //--------------------------------------------------------------------------
  11. #ifdef IMPORT_IDL_DEPENDENTS
  12. import "oaidl.idl";
  13. #endif
  14. #include "idlmulti.h"
  15. cpp_quote("//+---------------------------------------------------------------------------")
  16. cpp_quote("//")
  17. cpp_quote("// Microsoft Content Index SQL Parser")
  18. cpp_quote("// Copyright (C) Microsoft Corporation, 1997 - 1998.")
  19. cpp_quote("//")
  20. cpp_quote("//----------------------------------------------------------------------------")
  21. cpp_quote("")
  22. cpp_quote("")
  23. cpp_quote("//----------------------------------------------------------------------------")
  24. cpp_quote("//")
  25. cpp_quote("// Function Prototypes ")
  26. cpp_quote("//")
  27. cpp_quote("//----------------------------------------------------------------------------")
  28. cpp_quote(" HRESULT __stdcall MakeIParser(IParser** ppIParser); ")
  29. cpp_quote("")
  30. cpp_quote("")
  31. //
  32. // Enumerated values for Properties on IParserTreeProperties
  33. //
  34. enum PTPROPS {
  35. PTPROPS_SCOPE = 1,
  36. PTPROPS_DEPTH,
  37. PTPROPS_CATALOG,
  38. PTPROPS_MACHINE,
  39. PTPROPS_CIRESTRICTION,
  40. PTPROPS_ERR_IDS,
  41. PTPROPS_ERR_HR,
  42. PTPROPS_ERR_DISPPARAM,
  43. };
  44. //+-------------------------------------------------------------------------
  45. //
  46. // Supported Dialects
  47. //
  48. //+-------------------------------------------------------------------------
  49. cpp_quote("#ifdef DBINITCONSTANTS")
  50. cpp_quote("extern const GUID DBGUID_MSSQLTEXT = {0x03fb9b70,0x7fba,0x11d0,{0xa2,0x59,0x00,0x80,0xc7,0x8c,0x88,0x95}};")
  51. cpp_quote("extern const GUID DBGUID_MSSQLJAWS = {0xe4ab8511,0x4a52,0x11d1,{0xb6,0xd5,0x00,0xc0,0x4f,0xd6,0x11,0xd0}};")
  52. cpp_quote("#else // !DBINITCONSTANTS")
  53. cpp_quote("extern const GUID DBGUID_MSSQLTEXT;")
  54. cpp_quote("extern const GUID DBGUID_MSSQLJAWS;")
  55. cpp_quote("#endif // DBINITCONSTANTS")
  56. typedef struct tagDBCOMMANDTREE DBCOMMANDTREE;
  57. interface IColumnMapperCreator;
  58. //+-------------------------------------------------------------------------
  59. //
  60. // Interface : IParserVerify
  61. //
  62. // Description : Callback interface that allows the parser to validate
  63. // bInterface that encapsulates infromation about a particular
  64. // query.
  65. //
  66. //+-------------------------------------------------------------------------
  67. LOCAL_INTERFACE(186442B3-472E-11d1-8952-00C04FD611D7)
  68. interface IParserVerify : IUnknown
  69. {
  70. HRESULT VerifyMachine(
  71. [in] LPCWSTR pcwszMachine
  72. );
  73. HRESULT VerifyCatalog(
  74. [in] LPCWSTR pcwszMachine,
  75. [in] LPCWSTR pcwszCatalog
  76. );
  77. }
  78. //+-------------------------------------------------------------------------
  79. //
  80. // Interface : IParserTreeProperties
  81. //
  82. // Description : Interface that encapsulates infromation about a particular
  83. // query.
  84. //
  85. //+-------------------------------------------------------------------------
  86. LOCAL_INTERFACE(186442B2-472E-11d1-8952-00C04FD611D7)
  87. interface IParserTreeProperties : IUnknown
  88. {
  89. HRESULT GetProperties(
  90. [in] ULONG eParseProp,
  91. [in, out] VARIANT* vParseProp
  92. );
  93. }
  94. //+-------------------------------------------------------------------------
  95. //
  96. // Interface : IParserSession
  97. //
  98. // Description : Interface containing methods to create and manipulate trees
  99. // and text.
  100. //
  101. //+-------------------------------------------------------------------------
  102. LOCAL_INTERFACE(186442B1-472E-11d1-8952-00C04FD611D7)
  103. interface IParserSession : IUnknown
  104. {
  105. HRESULT ToTree(
  106. [in] LCID lcidVal,
  107. [in] LPCWSTR pcwszText,
  108. [out] DBCOMMANDTREE** ppTree,
  109. [out] IParserTreeProperties** ppPTProperties
  110. );
  111. HRESULT FreeTree(
  112. [in, out] DBCOMMANDTREE** ppTree
  113. );
  114. HRESULT SetCatalog(
  115. [in] LPCWSTR pcwszCatalog
  116. );
  117. }
  118. //+-------------------------------------------------------------------------
  119. //
  120. // Interface : IParser
  121. //
  122. // Description : Interface used to configure parser and create session
  123. // context in which to translate the text to tree
  124. //
  125. //+-------------------------------------------------------------------------
  126. LOCAL_INTERFACE(186442B0-472E-11d1-8952-00C04FD611D7)
  127. interface IParser : IUnknown
  128. {
  129. HRESULT CreateSession(
  130. [in] const GUID* pguidDialect,
  131. [in] LPCWSTR pwszMachine,
  132. [in] IParserVerify* ppIParserVerfiy,
  133. [in] IColumnMapperCreator* pIColMapCreator,
  134. [out] IParserSession** ppIParserSession
  135. );
  136. }