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.

183 lines
3.9 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 2000.
  5. //
  6. // File: cquery.hxx
  7. //
  8. // Contents: Header for file that implements the query object for the LDAP,
  9. // provider. This object supports the IUmiQuery interface.
  10. //
  11. // History: 03-27-00 AjayR Created.
  12. //
  13. //----------------------------------------------------------------------------
  14. #ifndef __CQUERY_H__
  15. #define __CQUERY_H__
  16. class CUmiLDAPQuery : INHERIT_TRACKING,
  17. public IUmiQuery
  18. {
  19. public:
  20. //
  21. // IUnknown support.
  22. //
  23. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  24. DECLARE_STD_REFCOUNTING
  25. // IUmiQuery Methods.
  26. //
  27. STDMETHOD (Set)(
  28. IN LPCWSTR pszLanguage,
  29. IN ULONG uFlags,
  30. IN LPCWSTR pszText
  31. );
  32. STDMETHOD (GetQuery)(
  33. IN OUT ULONG * puLangBufSize,
  34. IN OUT LPWSTR pszLangBuf,
  35. IN OUT ULONG * puQueryTextBufSize,
  36. IN OUT LPWSTR pszQueryTextBuf
  37. );
  38. //
  39. // IUmiPropList methods - none are implemented cause props are all
  40. // interface properties and not on this object.
  41. //
  42. STDMETHOD(Put)(
  43. IN LPCWSTR pszName,
  44. IN ULONG uFlags,
  45. OUT UMI_PROPERTY_VALUES *pProp
  46. )
  47. {
  48. _ulStatus = 0;
  49. RRETURN(E_NOTIMPL);
  50. }
  51. STDMETHOD(Get)(
  52. IN LPCWSTR pszName,
  53. IN ULONG uFlags,
  54. OUT UMI_PROPERTY_VALUES **pProp
  55. )
  56. {
  57. _ulStatus = 0;
  58. RRETURN(E_NOTIMPL);
  59. }
  60. STDMETHODIMP GetAt(
  61. IN LPCWSTR pszName,
  62. IN ULONG uFlags,
  63. IN ULONG uBufferLength,
  64. OUT LPVOID pExistingMem
  65. )
  66. {
  67. _ulStatus = 0;
  68. RRETURN(E_NOTIMPL);
  69. }
  70. STDMETHOD(GetAs)(
  71. IN LPCWSTR pszName,
  72. IN ULONG uFlags,
  73. IN ULONG uCoercionType,
  74. OUT UMI_PROPERTY_VALUES **pProp
  75. )
  76. {
  77. _ulStatus = 0;
  78. RRETURN(E_NOTIMPL);
  79. }
  80. STDMETHOD (Delete)(
  81. IN LPCWSTR pszUrl,
  82. IN OPTIONAL ULONG uFlags
  83. )
  84. {
  85. _ulStatus = 0;
  86. RRETURN(E_NOTIMPL);
  87. }
  88. STDMETHOD(FreeMemory)(
  89. ULONG uReserved,
  90. LPVOID pMem
  91. )
  92. {
  93. _ulStatus = 0;
  94. RRETURN(E_NOTIMPL);
  95. }
  96. STDMETHOD(GetProps)(
  97. IN LPCWSTR *pszNames,
  98. IN ULONG uNameCount,
  99. IN ULONG uFlags,
  100. OUT UMI_PROPERTY_VALUES **pProps
  101. )
  102. {
  103. _ulStatus = 0;
  104. RRETURN(E_NOTIMPL);
  105. }
  106. STDMETHOD(PutProps)(
  107. IN LPCWSTR *pszNames,
  108. IN ULONG uNameCount,
  109. IN ULONG uFlags,
  110. IN UMI_PROPERTY_VALUES *pProps
  111. )
  112. {
  113. _ulStatus = 0;
  114. RRETURN(E_NOTIMPL);
  115. }
  116. STDMETHOD(PutFrom)(
  117. IN LPCWSTR pszName,
  118. IN ULONG uFlags,
  119. IN ULONG uBufferLength,
  120. IN LPVOID pExistingMem
  121. )
  122. {
  123. _ulStatus = 0;
  124. RRETURN(E_NOTIMPL);
  125. }
  126. //
  127. // IUmiBaseObject methods
  128. //
  129. STDMETHOD (GetLastStatus)(
  130. IN ULONG uFlags,
  131. OUT ULONG *puSpecificStatus,
  132. IN REFIID riid,
  133. OUT LPVOID *pStatusObj
  134. );
  135. STDMETHOD (GetInterfacePropList)(
  136. IN ULONG uFlags,
  137. OUT IUmiPropList **pPropList
  138. );
  139. //
  140. // Other routines.
  141. //
  142. CUmiLDAPQuery::CUmiLDAPQuery();
  143. CUmiLDAPQuery::~CUmiLDAPQuery();
  144. static
  145. HRESULT
  146. CUmiLDAPQuery::CreateUmiLDAPQuery(
  147. IID riid,
  148. void FAR* FAR* ppObj
  149. );
  150. //
  151. // Internal/protected routines
  152. //
  153. protected:
  154. void SetLastStatus(ULONG ulStatus);
  155. //
  156. // Member variables.
  157. //
  158. CPropertyManager *_pIntfPropMgr;
  159. LPWSTR _pszQueryText;
  160. LPWSTR _pszLanguage;
  161. ULONG _ulStatus;
  162. };
  163. #endif // __CQUERY_H__