MediaReceiverRegistrarXmlBuilder.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. using System.Collections.Generic;
  2. using Emby.Dlna.Common;
  3. using Emby.Dlna.Service;
  4. namespace Emby.Dlna.MediaReceiverRegistrar
  5. {
  6. public class MediaReceiverRegistrarXmlBuilder
  7. {
  8. public string GetXml()
  9. {
  10. return new ServiceXmlBuilder().GetXml(new ServiceActionListBuilder().GetActions(),
  11. GetStateVariables());
  12. }
  13. private static IEnumerable<StateVariable> GetStateVariables()
  14. {
  15. var list = new List<StateVariable>();
  16. list.Add(new StateVariable
  17. {
  18. Name = "AuthorizationGrantedUpdateID",
  19. DataType = "ui4",
  20. SendsEvents = true
  21. });
  22. list.Add(new StateVariable
  23. {
  24. Name = "A_ARG_TYPE_DeviceID",
  25. DataType = "string",
  26. SendsEvents = false
  27. });
  28. list.Add(new StateVariable
  29. {
  30. Name = "AuthorizationDeniedUpdateID",
  31. DataType = "ui4",
  32. SendsEvents = true
  33. });
  34. list.Add(new StateVariable
  35. {
  36. Name = "ValidationSucceededUpdateID",
  37. DataType = "ui4",
  38. SendsEvents = true
  39. });
  40. list.Add(new StateVariable
  41. {
  42. Name = "A_ARG_TYPE_RegistrationRespMsg",
  43. DataType = "bin.base64",
  44. SendsEvents = false
  45. });
  46. list.Add(new StateVariable
  47. {
  48. Name = "A_ARG_TYPE_RegistrationReqMsg",
  49. DataType = "bin.base64",
  50. SendsEvents = false
  51. });
  52. list.Add(new StateVariable
  53. {
  54. Name = "ValidationRevokedUpdateID",
  55. DataType = "ui4",
  56. SendsEvents = true
  57. });
  58. list.Add(new StateVariable
  59. {
  60. Name = "A_ARG_TYPE_Result",
  61. DataType = "int",
  62. SendsEvents = false
  63. });
  64. return list;
  65. }
  66. }
  67. }