SendCommand.cs 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using System;
  2. namespace MediaBrowser.Model.SyncPlay
  3. {
  4. /// <summary>
  5. /// Class SendCommand.
  6. /// </summary>
  7. public class SendCommand
  8. {
  9. /// <summary>
  10. /// Initializes a new instance of the <see cref="SendCommand"/> class.
  11. /// </summary>
  12. /// <param name="groupId">The group identifier.</param>
  13. /// <param name="playlistItemId">The playlist identifier of the playing item.</param>
  14. /// <param name="when">The UTC time when to execute the command.</param>
  15. /// <param name="command">The command.</param>
  16. /// <param name="positionTicks">The position ticks, for commands that require it.</param>
  17. /// <param name="emittedAt">The UTC time when this command has been emitted.</param>
  18. public SendCommand(Guid groupId, Guid playlistItemId, DateTime when, SendCommandType command, long? positionTicks, DateTime emittedAt)
  19. {
  20. GroupId = groupId;
  21. PlaylistItemId = playlistItemId;
  22. When = when;
  23. Command = command;
  24. PositionTicks = positionTicks;
  25. EmittedAt = emittedAt;
  26. }
  27. /// <summary>
  28. /// Gets the group identifier.
  29. /// </summary>
  30. /// <value>The group identifier.</value>
  31. public Guid GroupId { get; }
  32. /// <summary>
  33. /// Gets the playlist identifier of the playing item.
  34. /// </summary>
  35. /// <value>The playlist identifier of the playing item.</value>
  36. public Guid PlaylistItemId { get; }
  37. /// <summary>
  38. /// Gets or sets the UTC time when to execute the command.
  39. /// </summary>
  40. /// <value>The UTC time when to execute the command.</value>
  41. public DateTime When { get; set; }
  42. /// <summary>
  43. /// Gets the position ticks.
  44. /// </summary>
  45. /// <value>The position ticks.</value>
  46. public long? PositionTicks { get; }
  47. /// <summary>
  48. /// Gets the command.
  49. /// </summary>
  50. /// <value>The command.</value>
  51. public SendCommandType Command { get; }
  52. /// <summary>
  53. /// Gets the UTC time when this command has been emitted.
  54. /// </summary>
  55. /// <value>The UTC time when this command has been emitted.</value>
  56. public DateTime EmittedAt { get; }
  57. }
  58. }