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.

80 lines
2.0 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2000.
  5. //
  6. // File: P H Y S I C A L D E V I C E I N F O . H
  7. //
  8. // Contents: Manages an UPnP device assembly
  9. //
  10. // Notes:
  11. //
  12. // Author: mbend 12 Sep 2000
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include "uhres.h" // main symbols
  17. #include "upnphost.h"
  18. #include "hostp.h"
  19. #include "UString.h"
  20. #include "ComUtility.h"
  21. #include "Table.h"
  22. #include "RegDef.h"
  23. #include "DeviceInfo.h"
  24. // Typedefs
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CPhysicalDeviceInfo
  27. class CPhysicalDeviceInfo
  28. {
  29. public:
  30. CPhysicalDeviceInfo();
  31. ~CPhysicalDeviceInfo();
  32. HRESULT HrInitialize(
  33. const wchar_t * szProgIdDeviceControlClass,
  34. const wchar_t * szInitString,
  35. const wchar_t * szContainerId,
  36. long nUDNs,
  37. wchar_t * arszUDNs[]);
  38. HRESULT HrInitializeRunning(
  39. const PhysicalDeviceIdentifier & pdi,
  40. IUnknown * pUnkDeviceControl,
  41. const wchar_t * szInitString,
  42. long nUDNs,
  43. wchar_t * arszUDNs[]);
  44. HRESULT HrGetService(
  45. const PhysicalDeviceIdentifier & pdi,
  46. const wchar_t * szUDN,
  47. const wchar_t * szServiceId,
  48. CServiceInfo ** ppServiceInfo);
  49. void Transfer(CPhysicalDeviceInfo & ref);
  50. void Clear();
  51. private:
  52. CPhysicalDeviceInfo(const CPhysicalDeviceInfo &);
  53. CPhysicalDeviceInfo & operator=(const CPhysicalDeviceInfo &);
  54. typedef CTable<UDN, CDeviceInfo> DeviceTable;
  55. DeviceTable m_deviceTable;
  56. CUString m_strProgIdDeviceControl;
  57. CUString m_strInitString;
  58. CUString m_strContainerId;
  59. IUPnPDeviceControlPtr m_pDeviceControl;
  60. BOOL m_bRunning;
  61. };
  62. inline void TypeTransfer(CPhysicalDeviceInfo & dst, CPhysicalDeviceInfo & src)
  63. {
  64. dst.Transfer(src);
  65. }
  66. inline void TypeClear(CPhysicalDeviceInfo & type)
  67. {
  68. type.Clear();
  69. }