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.

96 lines
2.9 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // EnumCPICCCB.h
  7. //
  8. // Description:
  9. // IClusCfgCallback Connection Point Enumerator implementation.
  10. //
  11. // Maintained By:
  12. // David Potter (DavidP) 19-JUN-2001
  13. // Geoffrey Pease (GPease) 10-NOV-2000
  14. //
  15. //////////////////////////////////////////////////////////////////////////////
  16. #pragma once
  17. //////////////////////////////////////////////////////////////////////////////
  18. // Include Files
  19. //////////////////////////////////////////////////////////////////////////////
  20. //////////////////////////////////////////////////////////////////////////////
  21. // Constant Declarations
  22. //////////////////////////////////////////////////////////////////////////////
  23. //////////////////////////////////////////////////////////////////////////////
  24. //++
  25. //
  26. // class CEnumCPICCCB
  27. //
  28. // Description:
  29. // The class CEnumCPICCCB is an enumerator of connection points
  30. // that are "advised" for callbacks.
  31. //
  32. // Interfaces:
  33. // IEnumConnections
  34. //
  35. //--
  36. //////////////////////////////////////////////////////////////////////////////
  37. class CEnumCPICCCB
  38. : public IEnumConnections
  39. {
  40. friend class CCPIClusCfgCallback;
  41. private:
  42. // IUnknown
  43. LONG m_cRef; // Reference counter
  44. // IEnumConnections
  45. ULONG m_cAlloced; // Alloced number of entries
  46. ULONG m_cCurrent; // Number of entries currently used
  47. ULONG m_cIter; // The Iter
  48. IUnknown * * m_pList; // List of sinks (IUnknown)
  49. BOOL m_fIsClone; // Is this instance a clone?
  50. // INotifyUI
  51. private:
  52. CEnumCPICCCB( void );
  53. ~CEnumCPICCCB( void );
  54. // Private copy constructor to prevent copying.
  55. CEnumCPICCCB( const CEnumCPICCCB & nodeSrc );
  56. // Private assignment operator to prevent copying.
  57. const CEnumCPICCCB & operator = ( const CEnumCPICCCB & nodeSrc );
  58. HRESULT HrInit( BOOL fIsCloneIn = FALSE );
  59. HRESULT HrCopy( CEnumCPICCCB * pecpIn );
  60. HRESULT HrAddConnection( IUnknown * punkIn, DWORD * pdwCookieOut );
  61. HRESULT HrRemoveConnection( DWORD dwCookieIn );
  62. public:
  63. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  64. //
  65. // IUnknown
  66. //
  67. STDMETHOD( QueryInterface )( REFIID riidIn, LPVOID * ppvOut );
  68. STDMETHOD_( ULONG, AddRef )( void );
  69. STDMETHOD_( ULONG, Release )( void );
  70. //
  71. // IEnumConnections
  72. //
  73. STDMETHOD( Next )( ULONG cConnectionsIn, LPCONNECTDATA rgcdIn, ULONG * pcFetchedOut );
  74. STDMETHOD( Skip )( ULONG cConnectionsIn );
  75. STDMETHOD( Reset )( void );
  76. STDMETHOD( Clone )( IEnumConnections ** ppEnumOut );
  77. }; //*** class CEnumCPICCCB