MediaReceiverRegistrarXmlBuilder.cs 2.1 KB

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