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.

70 lines
1.9 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2000.
  5. //
  6. // File: D E V I C E M A N A G E R . H
  7. //
  8. // Contents: Registrar collection of physical devices and device information
  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 "PhysicalDeviceInfo.h"
  24. // Typedefs
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CDeviceManager
  27. class CDeviceManager
  28. {
  29. public:
  30. CDeviceManager();
  31. ~CDeviceManager();
  32. // Lifetime operations
  33. HRESULT HrShutdown();
  34. // Device registration
  35. HRESULT HrAddDevice(
  36. const PhysicalDeviceIdentifier & pdi,
  37. const wchar_t * szProgIdDeviceControlClass,
  38. const wchar_t * szInitString,
  39. const wchar_t * szContainerId,
  40. long nUDNs,
  41. wchar_t ** arszUDNs);
  42. HRESULT HrAddRunningDevice(
  43. const PhysicalDeviceIdentifier & pdi,
  44. IUnknown * pUnkDeviceControl,
  45. const wchar_t * szInitString,
  46. long nUDNs,
  47. wchar_t ** arszUDNs);
  48. HRESULT HrRemoveDevice(const PhysicalDeviceIdentifier & pdi);
  49. HRESULT HrGetService(
  50. const wchar_t * szUDN,
  51. const wchar_t * szServiceId,
  52. CServiceInfo ** ppServiceInfo);
  53. BOOL FHasDevice(const PhysicalDeviceIdentifier & pdi);
  54. private:
  55. CDeviceManager(const CDeviceManager &);
  56. CDeviceManager & operator=(const CDeviceManager &);
  57. typedef CTable<PhysicalDeviceIdentifier, CPhysicalDeviceInfo> PhysicalDeviceTable;
  58. typedef CTable<UDN, PhysicalDeviceIdentifier> UDNMappingTable;
  59. PhysicalDeviceTable m_physicalDeviceTable;
  60. UDNMappingTable m_udnMappingTable;
  61. };