2020-11-14 15:40:01 -07:00
|
|
|
using System;
|
2020-06-03 02:54:01 -07:00
|
|
|
|
2020-05-06 14:42:53 -07:00
|
|
|
namespace MediaBrowser.Model.SyncPlay
|
2020-04-01 08:52:42 -07:00
|
|
|
{
|
|
|
|
/// <summary>
|
2020-04-15 09:03:58 -07:00
|
|
|
/// Class SendCommand.
|
2020-04-01 08:52:42 -07:00
|
|
|
/// </summary>
|
2020-04-15 09:03:58 -07:00
|
|
|
public class SendCommand
|
2020-04-01 08:52:42 -07:00
|
|
|
{
|
2020-11-14 15:40:01 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Initializes a new instance of the <see cref="SendCommand"/> class.
|
|
|
|
/// </summary>
|
2020-11-15 09:03:27 -07:00
|
|
|
/// <param name="groupId">The group identifier.</param>
|
|
|
|
/// <param name="playlistItemId">The playlist identifier of the playing item.</param>
|
|
|
|
/// <param name="when">The UTC time when to execute the command.</param>
|
|
|
|
/// <param name="command">The command.</param>
|
|
|
|
/// <param name="positionTicks">The position ticks, for commands that require it.</param>
|
|
|
|
/// <param name="emittedAt">The UTC time when this command has been emitted.</param>
|
|
|
|
public SendCommand(Guid groupId, string playlistItemId, DateTime when, SendCommandType command, long? positionTicks, DateTime emittedAt)
|
2020-11-14 15:40:01 -07:00
|
|
|
{
|
2020-11-15 09:03:27 -07:00
|
|
|
GroupId = groupId;
|
|
|
|
PlaylistItemId = playlistItemId;
|
|
|
|
When = when;
|
|
|
|
Command = command;
|
|
|
|
PositionTicks = positionTicks;
|
|
|
|
EmittedAt = emittedAt;
|
2020-11-14 15:40:01 -07:00
|
|
|
}
|
|
|
|
|
2020-04-01 08:52:42 -07:00
|
|
|
/// <summary>
|
2020-11-15 09:03:27 -07:00
|
|
|
/// Gets the group identifier.
|
2020-04-01 08:52:42 -07:00
|
|
|
/// </summary>
|
|
|
|
/// <value>The group identifier.</value>
|
2020-11-15 09:03:27 -07:00
|
|
|
public Guid GroupId { get; }
|
2020-04-01 08:52:42 -07:00
|
|
|
|
2020-09-24 14:04:21 -07:00
|
|
|
/// <summary>
|
2020-11-15 09:03:27 -07:00
|
|
|
/// Gets the playlist identifier of the playing item.
|
2020-09-24 14:04:21 -07:00
|
|
|
/// </summary>
|
2020-10-21 07:42:57 -07:00
|
|
|
/// <value>The playlist identifier of the playing item.</value>
|
2020-11-15 09:03:27 -07:00
|
|
|
public string PlaylistItemId { get; }
|
2020-09-24 14:04:21 -07:00
|
|
|
|
2020-04-01 08:52:42 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the UTC time when to execute the command.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The UTC time when to execute the command.</value>
|
2020-11-14 15:40:01 -07:00
|
|
|
public DateTime When { get; set; }
|
2020-04-01 08:52:42 -07:00
|
|
|
|
|
|
|
/// <summary>
|
2020-11-15 09:03:27 -07:00
|
|
|
/// Gets the position ticks.
|
2020-04-01 08:52:42 -07:00
|
|
|
/// </summary>
|
|
|
|
/// <value>The position ticks.</value>
|
2020-11-15 09:03:27 -07:00
|
|
|
public long? PositionTicks { get; }
|
2020-04-01 08:52:42 -07:00
|
|
|
|
|
|
|
/// <summary>
|
2020-11-15 09:03:27 -07:00
|
|
|
/// Gets the command.
|
2020-04-01 08:52:42 -07:00
|
|
|
/// </summary>
|
|
|
|
/// <value>The command.</value>
|
2020-11-15 09:03:27 -07:00
|
|
|
public SendCommandType Command { get; }
|
2020-04-15 09:03:58 -07:00
|
|
|
|
|
|
|
/// <summary>
|
2020-11-15 09:03:27 -07:00
|
|
|
/// Gets the UTC time when this command has been emitted.
|
2020-04-15 09:03:58 -07:00
|
|
|
/// </summary>
|
|
|
|
/// <value>The UTC time when this command has been emitted.</value>
|
2020-11-15 09:03:27 -07:00
|
|
|
public DateTime EmittedAt { get; }
|
2020-04-01 08:52:42 -07:00
|
|
|
}
|
|
|
|
}
|