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.

91 lines
2.5 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995.
  5. //
  6. // File: DisQuery.hxx
  7. //
  8. // Contents: PIInternalQuery for distributed implementation.
  9. //
  10. // Classes: CDistributedQuery
  11. //
  12. // History: 05-Jun-95 KyleP Created
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include <oldquery.hxx>
  17. //+---------------------------------------------------------------------------
  18. //
  19. // Class: CDistributedQuery
  20. //
  21. // Purpose: IInternalQuery for distributed implementation.
  22. //
  23. // History: 07-Jun-95 KyleP Created.
  24. //
  25. //----------------------------------------------------------------------------
  26. class CDistributedQuery : INHERIT_VIRTUAL_UNWIND, public PIInternalQuery
  27. {
  28. INLINE_UNWIND( CDistributedQuery )
  29. public:
  30. CDistributedQuery( unsigned cChild );
  31. //
  32. // IUnknown methods.
  33. //
  34. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void ** ppvObj);
  35. STDMETHOD_(ULONG,AddRef) (THIS);
  36. STDMETHOD_(ULONG,Release) (THIS);
  37. void Execute (IUnknown * pUnkOuter,
  38. RESTRICTION * pRestriction,
  39. CPidMapperWithNames & PidMap,
  40. CColumnSet & rColumns,
  41. CSortSet & rSort,
  42. XPtr<CMRowsetProps> & xRstProps,
  43. CCategorizationSet & rCateg,
  44. ULONG cRowsets,
  45. IUnknown ** ppUnknowns,
  46. CAccessorBag & aAccessors,
  47. IUnknown * pUnkCreator = 0);
  48. BOOL IsQueryActive( ) { return _aChild[0]->IsQueryActive(); }
  49. //
  50. // Local methods
  51. //
  52. inline void Add( PIInternalQuery * pQuery, unsigned pos );
  53. private:
  54. ~CDistributedQuery();
  55. XArray<PIInternalQuery *> _aChild;
  56. };
  57. //+-------------------------------------------------------------------------
  58. //
  59. // Member: CDistributedQuery::Add, public
  60. //
  61. // Synopsis: Add child node to distributed query.
  62. //
  63. // Arguments: [pQuery] -- Child query.
  64. // [pos] -- Position to add.
  65. //
  66. // History: 07-Jun-95 KyleP Created
  67. //
  68. //--------------------------------------------------------------------------
  69. inline void CDistributedQuery::Add( PIInternalQuery * pQuery, unsigned pos )
  70. {
  71. Win4Assert( 0 == _aChild[pos] );
  72. _aChild[pos] = pQuery;
  73. }