SessionInfoDto.cs 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. using MediaBrowser.Model.Entities;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Diagnostics;
  6. namespace MediaBrowser.Model.Session
  7. {
  8. [DebuggerDisplay("Client = {Client}, Username = {UserName}")]
  9. public class SessionInfoDto : INotifyPropertyChanged
  10. {
  11. /// <summary>
  12. /// Gets or sets a value indicating whether this instance can seek.
  13. /// </summary>
  14. /// <value><c>true</c> if this instance can seek; otherwise, <c>false</c>.</value>
  15. public bool CanSeek { get; set; }
  16. /// <summary>
  17. /// Gets or sets the remote end point.
  18. /// </summary>
  19. /// <value>The remote end point.</value>
  20. public string RemoteEndPoint { get; set; }
  21. /// <summary>
  22. /// Gets or sets the queueable media types.
  23. /// </summary>
  24. /// <value>The queueable media types.</value>
  25. public List<string> QueueableMediaTypes { get; set; }
  26. /// <summary>
  27. /// Gets or sets the playable media types.
  28. /// </summary>
  29. /// <value>The playable media types.</value>
  30. public List<string> PlayableMediaTypes { get; set; }
  31. /// <summary>
  32. /// Gets or sets the id.
  33. /// </summary>
  34. /// <value>The id.</value>
  35. public string Id { get; set; }
  36. /// <summary>
  37. /// Gets or sets the user id.
  38. /// </summary>
  39. /// <value>The user id.</value>
  40. public string UserId { get; set; }
  41. /// <summary>
  42. /// Gets or sets the name of the user.
  43. /// </summary>
  44. /// <value>The name of the user.</value>
  45. public string UserName { get; set; }
  46. /// <summary>
  47. /// Gets or sets the additional users present.
  48. /// </summary>
  49. /// <value>The additional users present.</value>
  50. public List<SessionUserInfo> AdditionalUsers { get; set; }
  51. /// <summary>
  52. /// Gets or sets the application version.
  53. /// </summary>
  54. /// <value>The application version.</value>
  55. public string ApplicationVersion { get; set; }
  56. /// <summary>
  57. /// Gets or sets the type of the client.
  58. /// </summary>
  59. /// <value>The type of the client.</value>
  60. public string Client { get; set; }
  61. /// <summary>
  62. /// Gets or sets the last activity date.
  63. /// </summary>
  64. /// <value>The last activity date.</value>
  65. public DateTime LastActivityDate { get; set; }
  66. /// <summary>
  67. /// Gets or sets the now viewing context.
  68. /// </summary>
  69. /// <value>The now viewing context.</value>
  70. public string NowViewingContext { get; set; }
  71. /// <summary>
  72. /// Gets or sets the type of the now viewing item.
  73. /// </summary>
  74. /// <value>The type of the now viewing item.</value>
  75. public string NowViewingItemType { get; set; }
  76. /// <summary>
  77. /// Gets or sets the now viewing item identifier.
  78. /// </summary>
  79. /// <value>The now viewing item identifier.</value>
  80. public string NowViewingItemId { get; set; }
  81. /// <summary>
  82. /// Gets or sets the name of the now viewing item.
  83. /// </summary>
  84. /// <value>The name of the now viewing item.</value>
  85. public string NowViewingItemName { get; set; }
  86. /// <summary>
  87. /// Gets or sets the name of the device.
  88. /// </summary>
  89. /// <value>The name of the device.</value>
  90. public string DeviceName { get; set; }
  91. /// <summary>
  92. /// Gets or sets a value indicating whether this instance is paused.
  93. /// </summary>
  94. /// <value><c>true</c> if this instance is paused; otherwise, <c>false</c>.</value>
  95. public bool IsPaused { get; set; }
  96. /// <summary>
  97. /// Gets or sets a value indicating whether this instance is muted.
  98. /// </summary>
  99. /// <value><c>true</c> if this instance is muted; otherwise, <c>false</c>.</value>
  100. public bool IsMuted { get; set; }
  101. /// <summary>
  102. /// Gets or sets the now playing item.
  103. /// </summary>
  104. /// <value>The now playing item.</value>
  105. public BaseItemInfo NowPlayingItem { get; set; }
  106. /// <summary>
  107. /// Gets or sets the now playing position ticks.
  108. /// </summary>
  109. /// <value>The now playing position ticks.</value>
  110. public long? NowPlayingPositionTicks { get; set; }
  111. /// <summary>
  112. /// Gets or sets the device id.
  113. /// </summary>
  114. /// <value>The device id.</value>
  115. public string DeviceId { get; set; }
  116. /// <summary>
  117. /// Gets or sets a value indicating whether [supports fullscreen toggle].
  118. /// </summary>
  119. /// <value><c>true</c> if [supports fullscreen toggle]; otherwise, <c>false</c>.</value>
  120. public bool SupportsFullscreenToggle { get; set; }
  121. /// <summary>
  122. /// Gets or sets a value indicating whether [supports remote control].
  123. /// </summary>
  124. /// <value><c>true</c> if [supports remote control]; otherwise, <c>false</c>.</value>
  125. public bool SupportsRemoteControl { get; set; }
  126. /// <summary>
  127. /// Gets or sets a value indicating whether [supports osd toggle].
  128. /// </summary>
  129. /// <value><c>true</c> if [supports osd toggle]; otherwise, <c>false</c>.</value>
  130. public bool SupportsOsdToggle { get; set; }
  131. /// <summary>
  132. /// Gets or sets a value indicating whether [supports navigation commands].
  133. /// </summary>
  134. /// <value><c>true</c> if [supports navigation commands]; otherwise, <c>false</c>.</value>
  135. public bool SupportsNavigationControl { get; set; }
  136. public event PropertyChangedEventHandler PropertyChanged;
  137. public SessionInfoDto()
  138. {
  139. AdditionalUsers = new List<SessionUserInfo>();
  140. PlayableMediaTypes = new List<string>();
  141. QueueableMediaTypes = new List<string>();
  142. }
  143. }
  144. /// <summary>
  145. /// Class SessionUserInfo.
  146. /// </summary>
  147. public class SessionUserInfo
  148. {
  149. /// <summary>
  150. /// Gets or sets the user identifier.
  151. /// </summary>
  152. /// <value>The user identifier.</value>
  153. public string UserId { get; set; }
  154. /// <summary>
  155. /// Gets or sets the name of the user.
  156. /// </summary>
  157. /// <value>The name of the user.</value>
  158. public string UserName { get; set; }
  159. }
  160. public class ClientCapabilities
  161. {
  162. public List<string> PlayableMediaTypes { get; set; }
  163. public ClientCapabilities()
  164. {
  165. PlayableMediaTypes = new List<string>();
  166. }
  167. }
  168. }