Source code of Windows XP (NT5)
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.

63 lines
1.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2000.
  5. //
  6. // File: C D Y N A M I C C O N T E N T S O U R C E . H
  7. //
  8. // Contents:
  9. //
  10. // Notes:
  11. //
  12. // Author: mbend 17 Aug 2000
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include "uhres.h" // main symbols
  17. #include "ComUtility.h"
  18. #include "Array.h"
  19. #include "hostp.h"
  20. /////////////////////////////////////////////////////////////////////////////
  21. // TestObject
  22. class ATL_NO_VTABLE CDynamicContentSource :
  23. public CComObjectRootEx<CComMultiThreadModel>,
  24. public CComCoClass<CDynamicContentSource, &CLSID_UPnPDynamicContentSource>,
  25. public IUPnPDynamicContentSource
  26. {
  27. public:
  28. CDynamicContentSource();
  29. DECLARE_CLASSFACTORY_SINGLETON(CDynamicContentSource)
  30. DECLARE_REGISTRY_RESOURCEID(IDR_DYNAMIC_CONTENT_SOURCE)
  31. DECLARE_NOT_AGGREGATABLE(CDynamicContentSource)
  32. BEGIN_COM_MAP(CDynamicContentSource)
  33. COM_INTERFACE_ENTRY(IUPnPDynamicContentSource)
  34. END_COM_MAP()
  35. public:
  36. // IUPnPDynamicContentSource methods
  37. STDMETHOD(GetContent)(
  38. /*[in]*/ REFGUID guidContent,
  39. /*[out]*/ long * pnHeaderCount,
  40. /*[out, string, size_is(,*pnHeaderCount,)]*/ wchar_t *** parszHeaders,
  41. /*[out]*/ long * pnBytes,
  42. /*[out, size_is(,*pnBytes)]*/ byte ** parBytes);
  43. STDMETHOD(RegisterProvider)(
  44. /*[in]*/ IUPnPDynamicContentProvider * pProvider);
  45. STDMETHOD(UnregisterProvider)(
  46. /*[in]*/ IUPnPDynamicContentProvider * pProvider);
  47. private:
  48. typedef SmartComPtr<IUPnPDynamicContentProvider> IUPnPDynamicContentProviderPtr;
  49. typedef CUArray<IUPnPDynamicContentProviderPtr> ProviderArray;
  50. ProviderArray m_providerArray;
  51. };