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.

99 lines
3.2 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1999.
  5. //
  6. // File: qsession.hxx
  7. //
  8. // Contents: Query Session. Implements ICiCQuerySession interface.
  9. //
  10. // Classes: CQuerySession
  11. //
  12. // History: 12-Dec-96 SitaramR Created
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include <ciintf.h>
  17. #include <catalog.hxx>
  18. #include <seccache.hxx>
  19. //+---------------------------------------------------------------------------
  20. //
  21. // Class: CQuerySession
  22. //
  23. // Purpose: Implements ICiCQuerySession interface
  24. //
  25. // History: 12-Dec-96 SitaramR Created
  26. //
  27. //----------------------------------------------------------------------------
  28. class CQuerySession : INHERIT_VIRTUAL_UNWIND, public ICiCQuerySession
  29. {
  30. INLINE_UNWIND( CQuerySession )
  31. public:
  32. //
  33. // From IUnknown
  34. //
  35. virtual SCODE STDMETHODCALLTYPE QueryInterface( REFIID riid, void **ppvObject );
  36. virtual ULONG STDMETHODCALLTYPE AddRef();
  37. virtual ULONG STDMETHODCALLTYPE Release();
  38. //
  39. // From ICiCQuerySession
  40. //
  41. virtual SCODE STDMETHODCALLTYPE Init( ULONG nProps,
  42. const FULLPROPSPEC *const *apPropSpec,
  43. IDBProperties *pDBProperties,
  44. ICiQueryPropertyMapper *pQueryPropertyMapper);
  45. virtual SCODE STDMETHODCALLTYPE GetEnumOption( CI_ENUM_OPTIONS *pEnumOption);
  46. virtual SCODE STDMETHODCALLTYPE CreatePropRetriever( ICiCPropRetriever **ppICiCPropRetriever);
  47. virtual SCODE STDMETHODCALLTYPE CreateDeferredPropRetriever(
  48. ICiCDeferredPropRetriever **ppICiCDefPropRetriever);
  49. virtual SCODE STDMETHODCALLTYPE CreateEnumerator( ICiCScopeEnumerator **ppICiCEnumerator);
  50. //
  51. // Local methods
  52. //
  53. CQuerySession( PCatalog& cat );
  54. private:
  55. virtual ~CQuerySession();
  56. BOOL IsAnyScopeDeep() const;
  57. void GetNormalizedScopes(WCHAR const * const *aScopes,
  58. ULONG const * aDepths,
  59. ULONG cScopes,
  60. ULONG cCatalogs,
  61. CDynArray<WCHAR> & aNormalizedScopes );
  62. void CleanupScope( XArray<WCHAR> & xScope,
  63. DWORD dwDepth,
  64. WCHAR const * pwcScope );
  65. inline BOOL IsVScope( DWORD dwDepth )
  66. {
  67. return 0 != ( dwDepth & QUERY_VIRTUAL_PATH );
  68. }
  69. PCatalog& _cat; // Catalog
  70. BOOL _fUsePathAlias; // Is client remote
  71. XRestriction _xScope; // Scope
  72. CSecurityCache _secCache; // Security check
  73. CiMetaData _eType; // Enumeration type
  74. XInterface<ICiQueryPropertyMapper> _xQueryPropMapper; // Propspec <-> pid
  75. ULONG _cRefs; // Refcount
  76. };