LiveTvServiceInfo.cs 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. using System;
  2. using System.Collections.Generic;
  3. namespace MediaBrowser.Model.LiveTv
  4. {
  5. /// <summary>
  6. /// Class ServiceInfo
  7. /// </summary>
  8. public class LiveTvServiceInfo
  9. {
  10. /// <summary>
  11. /// Gets or sets the name.
  12. /// </summary>
  13. /// <value>The name.</value>
  14. public string Name { get; set; }
  15. /// <summary>
  16. /// Gets or sets the home page URL.
  17. /// </summary>
  18. /// <value>The home page URL.</value>
  19. public string HomePageUrl { get; set; }
  20. /// <summary>
  21. /// Gets or sets the status.
  22. /// </summary>
  23. /// <value>The status.</value>
  24. public LiveTvServiceStatus Status { get; set; }
  25. /// <summary>
  26. /// Gets or sets the status message.
  27. /// </summary>
  28. /// <value>The status message.</value>
  29. public string StatusMessage { get; set; }
  30. /// <summary>
  31. /// Gets or sets the version.
  32. /// </summary>
  33. /// <value>The version.</value>
  34. public string Version { get; set; }
  35. /// <summary>
  36. /// Gets or sets a value indicating whether this instance has update available.
  37. /// </summary>
  38. /// <value><c>true</c> if this instance has update available; otherwise, <c>false</c>.</value>
  39. public bool HasUpdateAvailable { get; set; }
  40. public List<LiveTvTunerInfoDto> Tuners { get; set; }
  41. public LiveTvServiceInfo()
  42. {
  43. Tuners = new List<LiveTvTunerInfoDto>();
  44. }
  45. }
  46. public class GuideInfo
  47. {
  48. /// <summary>
  49. /// Gets or sets the start date.
  50. /// </summary>
  51. /// <value>The start date.</value>
  52. public DateTime StartDate { get; set; }
  53. /// <summary>
  54. /// Gets or sets the end date.
  55. /// </summary>
  56. /// <value>The end date.</value>
  57. public DateTime EndDate { get; set; }
  58. }
  59. public class LiveTvInfo
  60. {
  61. /// <summary>
  62. /// Gets or sets the services.
  63. /// </summary>
  64. /// <value>The services.</value>
  65. public List<LiveTvServiceInfo> Services { get; set; }
  66. /// <summary>
  67. /// Gets or sets the name of the active service.
  68. /// </summary>
  69. /// <value>The name of the active service.</value>
  70. public string ActiveServiceName { get; set; }
  71. /// <summary>
  72. /// Gets or sets a value indicating whether this instance is enabled.
  73. /// </summary>
  74. /// <value><c>true</c> if this instance is enabled; otherwise, <c>false</c>.</value>
  75. public bool IsEnabled { get; set; }
  76. /// <summary>
  77. /// Gets or sets the enabled users.
  78. /// </summary>
  79. /// <value>The enabled users.</value>
  80. public List<string> EnabledUsers { get; set; }
  81. /// <summary>
  82. /// Gets or sets the status.
  83. /// </summary>
  84. /// <value>The status.</value>
  85. public LiveTvServiceStatus Status { get; set; }
  86. /// <summary>
  87. /// Gets or sets the status message.
  88. /// </summary>
  89. /// <value>The status message.</value>
  90. public string StatusMessage { get; set; }
  91. public LiveTvInfo()
  92. {
  93. Services = new List<LiveTvServiceInfo>();
  94. EnabledUsers = new List<string>();
  95. }
  96. }
  97. public class LiveTvTunerInfoDto
  98. {
  99. /// <summary>
  100. /// Gets or sets the type of the source.
  101. /// </summary>
  102. /// <value>The type of the source.</value>
  103. public string SourceType { get; set; }
  104. /// <summary>
  105. /// Gets or sets the name.
  106. /// </summary>
  107. /// <value>The name.</value>
  108. public string Name { get; set; }
  109. /// <summary>
  110. /// Gets or sets the identifier.
  111. /// </summary>
  112. /// <value>The identifier.</value>
  113. public string Id { get; set; }
  114. /// <summary>
  115. /// Gets or sets the status.
  116. /// </summary>
  117. /// <value>The status.</value>
  118. public LiveTvTunerStatus Status { get; set; }
  119. /// <summary>
  120. /// Gets or sets the channel identifier.
  121. /// </summary>
  122. /// <value>The channel identifier.</value>
  123. public string ChannelId { get; set; }
  124. /// <summary>
  125. /// Gets or sets the name of the channel.
  126. /// </summary>
  127. /// <value>The name of the channel.</value>
  128. public string ChannelName { get; set; }
  129. /// <summary>
  130. /// Gets or sets the recording identifier.
  131. /// </summary>
  132. /// <value>The recording identifier.</value>
  133. public string RecordingId { get; set; }
  134. /// <summary>
  135. /// Gets or sets the name of the program.
  136. /// </summary>
  137. /// <value>The name of the program.</value>
  138. public string ProgramName { get; set; }
  139. /// <summary>
  140. /// Gets or sets the clients.
  141. /// </summary>
  142. /// <value>The clients.</value>
  143. public List<string> Clients { get; set; }
  144. public LiveTvTunerInfoDto()
  145. {
  146. Clients = new List<string>();
  147. }
  148. }
  149. public enum LiveTvServiceStatus
  150. {
  151. Ok = 0,
  152. Unavailable = 1
  153. }
  154. public enum LiveTvTunerStatus
  155. {
  156. Available = 0,
  157. Disabled = 1,
  158. RecordingTv = 2,
  159. LiveTv = 3
  160. }
  161. }