UpnpDevice.cs 653 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. namespace MediaBrowser.Dlna.Server
  3. {
  4. public sealed class UpnpDevice
  5. {
  6. public readonly Uri Descriptor;
  7. public readonly string Type;
  8. public readonly string USN;
  9. public readonly Guid Uuid;
  10. public UpnpDevice(Guid aUuid, string aType, Uri aDescriptor)
  11. {
  12. Uuid = aUuid;
  13. Type = aType;
  14. Descriptor = aDescriptor;
  15. if (Type.StartsWith("uuid:"))
  16. {
  17. USN = Type;
  18. }
  19. else
  20. {
  21. USN = String.Format("uuid:{0}::{1}", Uuid.ToString(), Type);
  22. }
  23. }
  24. }
  25. }