diff options
| author | WWWesten <4700006+WWWesten@users.noreply.github.com> | 2021-11-01 23:43:29 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-01 23:43:29 +0500 |
| commit | 0a14279e2a21bcb9654a06a2d49e1e4f0cc5329c (patch) | |
| tree | e1b1bd603b011ca98e5793e356326bf4a35a7050 /MediaBrowser.Model/SyncPlay | |
| parent | f2817fef743eeb75a00782ceea363b2d3e7dc9f2 (diff) | |
| parent | 76eeb8f655424d295e73ced8349c6fefee6ddb12 (diff) | |
Merge branch 'jellyfin:master' into master
Diffstat (limited to 'MediaBrowser.Model/SyncPlay')
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/GroupInfoDto.cs | 58 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/GroupQueueMode.cs | 18 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/GroupRepeatMode.cs | 23 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/GroupShuffleMode.cs | 18 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/GroupStateType.cs | 28 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/GroupStateUpdate.cs | 31 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/GroupUpdate.cs | 42 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/GroupUpdateType.cs | 63 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/PlayQueueUpdate.cs | 82 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/PlayQueueUpdateReason.cs | 58 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/PlaybackRequestType.cs | 93 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/QueueItem.cs | 31 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/RequestType.cs | 33 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/SendCommand.cs | 65 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/SendCommandType.cs | 28 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/SyncPlayBroadcastType.cs | 28 | ||||
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/UtcTimeResponse.cs | 33 |
17 files changed, 732 insertions, 0 deletions
diff --git a/MediaBrowser.Model/SyncPlay/GroupInfoDto.cs b/MediaBrowser.Model/SyncPlay/GroupInfoDto.cs new file mode 100644 index 0000000000..8c0960b830 --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/GroupInfoDto.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; + +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Class GroupInfoDto. + /// </summary> + public class GroupInfoDto + { + /// <summary> + /// Initializes a new instance of the <see cref="GroupInfoDto"/> class. + /// </summary> + /// <param name="groupId">The group identifier.</param> + /// <param name="groupName">The group name.</param> + /// <param name="state">The group state.</param> + /// <param name="participants">The participants.</param> + /// <param name="lastUpdatedAt">The date when this DTO has been created.</param> + public GroupInfoDto(Guid groupId, string groupName, GroupStateType state, IReadOnlyList<string> participants, DateTime lastUpdatedAt) + { + GroupId = groupId; + GroupName = groupName; + State = state; + Participants = participants; + LastUpdatedAt = lastUpdatedAt; + } + + /// <summary> + /// Gets the group identifier. + /// </summary> + /// <value>The group identifier.</value> + public Guid GroupId { get; } + + /// <summary> + /// Gets the group name. + /// </summary> + /// <value>The group name.</value> + public string GroupName { get; } + + /// <summary> + /// Gets the group state. + /// </summary> + /// <value>The group state.</value> + public GroupStateType State { get; } + + /// <summary> + /// Gets the participants. + /// </summary> + /// <value>The participants.</value> + public IReadOnlyList<string> Participants { get; } + + /// <summary> + /// Gets the date when this DTO has been created. + /// </summary> + /// <value>The date when this DTO has been created.</value> + public DateTime LastUpdatedAt { get; } + } +} diff --git a/MediaBrowser.Model/SyncPlay/GroupQueueMode.cs b/MediaBrowser.Model/SyncPlay/GroupQueueMode.cs new file mode 100644 index 0000000000..5c9c2627b9 --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/GroupQueueMode.cs @@ -0,0 +1,18 @@ +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Enum GroupQueueMode. + /// </summary> + public enum GroupQueueMode + { + /// <summary> + /// Insert items at the end of the queue. + /// </summary> + Queue = 0, + + /// <summary> + /// Insert items after the currently playing item. + /// </summary> + QueueNext = 1 + } +} diff --git a/MediaBrowser.Model/SyncPlay/GroupRepeatMode.cs b/MediaBrowser.Model/SyncPlay/GroupRepeatMode.cs new file mode 100644 index 0000000000..4895e57b7f --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/GroupRepeatMode.cs @@ -0,0 +1,23 @@ +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Enum GroupRepeatMode. + /// </summary> + public enum GroupRepeatMode + { + /// <summary> + /// Repeat one item only. + /// </summary> + RepeatOne = 0, + + /// <summary> + /// Cycle the playlist. + /// </summary> + RepeatAll = 1, + + /// <summary> + /// Do not repeat. + /// </summary> + RepeatNone = 2 + } +} diff --git a/MediaBrowser.Model/SyncPlay/GroupShuffleMode.cs b/MediaBrowser.Model/SyncPlay/GroupShuffleMode.cs new file mode 100644 index 0000000000..de860883c0 --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/GroupShuffleMode.cs @@ -0,0 +1,18 @@ +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Enum GroupShuffleMode. + /// </summary> + public enum GroupShuffleMode + { + /// <summary> + /// Sorted playlist. + /// </summary> + Sorted = 0, + + /// <summary> + /// Shuffled playlist. + /// </summary> + Shuffle = 1 + } +} diff --git a/MediaBrowser.Model/SyncPlay/GroupStateType.cs b/MediaBrowser.Model/SyncPlay/GroupStateType.cs new file mode 100644 index 0000000000..7aa454f928 --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/GroupStateType.cs @@ -0,0 +1,28 @@ +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Enum GroupState. + /// </summary> + public enum GroupStateType + { + /// <summary> + /// The group is in idle state. No media is playing. + /// </summary> + Idle = 0, + + /// <summary> + /// The group is in wating state. Playback is paused. Will start playing when users are ready. + /// </summary> + Waiting = 1, + + /// <summary> + /// The group is in paused state. Playback is paused. Will resume on play command. + /// </summary> + Paused = 2, + + /// <summary> + /// The group is in playing state. Playback is advancing. + /// </summary> + Playing = 3 + } +} diff --git a/MediaBrowser.Model/SyncPlay/GroupStateUpdate.cs b/MediaBrowser.Model/SyncPlay/GroupStateUpdate.cs new file mode 100644 index 0000000000..7f7deb86bb --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/GroupStateUpdate.cs @@ -0,0 +1,31 @@ +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Class GroupStateUpdate. + /// </summary> + public class GroupStateUpdate + { + /// <summary> + /// Initializes a new instance of the <see cref="GroupStateUpdate"/> class. + /// </summary> + /// <param name="state">The state of the group.</param> + /// <param name="reason">The reason of the state change.</param> + public GroupStateUpdate(GroupStateType state, PlaybackRequestType reason) + { + State = state; + Reason = reason; + } + + /// <summary> + /// Gets the state of the group. + /// </summary> + /// <value>The state of the group.</value> + public GroupStateType State { get; } + + /// <summary> + /// Gets the reason of the state change. + /// </summary> + /// <value>The reason of the state change.</value> + public PlaybackRequestType Reason { get; } + } +} diff --git a/MediaBrowser.Model/SyncPlay/GroupUpdate.cs b/MediaBrowser.Model/SyncPlay/GroupUpdate.cs new file mode 100644 index 0000000000..6f159d653c --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/GroupUpdate.cs @@ -0,0 +1,42 @@ +using System; + +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Class GroupUpdate. + /// </summary> + /// <typeparam name="T">The type of the data of the message.</typeparam> + public class GroupUpdate<T> + { + /// <summary> + /// Initializes a new instance of the <see cref="GroupUpdate{T}"/> class. + /// </summary> + /// <param name="groupId">The group identifier.</param> + /// <param name="type">The update type.</param> + /// <param name="data">The update data.</param> + public GroupUpdate(Guid groupId, GroupUpdateType type, T data) + { + GroupId = groupId; + Type = type; + Data = data; + } + + /// <summary> + /// Gets the group identifier. + /// </summary> + /// <value>The group identifier.</value> + public Guid GroupId { get; } + + /// <summary> + /// Gets the update type. + /// </summary> + /// <value>The update type.</value> + public GroupUpdateType Type { get; } + + /// <summary> + /// Gets the update data. + /// </summary> + /// <value>The update data.</value> + public T Data { get; } + } +} diff --git a/MediaBrowser.Model/SyncPlay/GroupUpdateType.cs b/MediaBrowser.Model/SyncPlay/GroupUpdateType.cs new file mode 100644 index 0000000000..907d1defe0 --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/GroupUpdateType.cs @@ -0,0 +1,63 @@ +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Enum GroupUpdateType. + /// </summary> + public enum GroupUpdateType + { + /// <summary> + /// The user-joined update. Tells members of a group about a new user. + /// </summary> + UserJoined, + + /// <summary> + /// The user-left update. Tells members of a group that a user left. + /// </summary> + UserLeft, + + /// <summary> + /// The group-joined update. Tells a user that the group has been joined. + /// </summary> + GroupJoined, + + /// <summary> + /// The group-left update. Tells a user that the group has been left. + /// </summary> + GroupLeft, + + /// <summary> + /// The group-state update. Tells members of the group that the state changed. + /// </summary> + StateUpdate, + + /// <summary> + /// The play-queue update. Tells a user the playing queue of the group. + /// </summary> + PlayQueue, + + /// <summary> + /// The not-in-group error. Tells a user that they don't belong to a group. + /// </summary> + NotInGroup, + + /// <summary> + /// The group-does-not-exist error. Sent when trying to join a non-existing group. + /// </summary> + GroupDoesNotExist, + + /// <summary> + /// The create-group-denied error. Sent when a user tries to create a group without required permissions. + /// </summary> + CreateGroupDenied, + + /// <summary> + /// The join-group-denied error. Sent when a user tries to join a group without required permissions. + /// </summary> + JoinGroupDenied, + + /// <summary> + /// The library-access-denied error. Sent when a user tries to join a group without required access to the library. + /// </summary> + LibraryAccessDenied + } +} diff --git a/MediaBrowser.Model/SyncPlay/PlayQueueUpdate.cs b/MediaBrowser.Model/SyncPlay/PlayQueueUpdate.cs new file mode 100644 index 0000000000..cce99c77d5 --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/PlayQueueUpdate.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; + +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Class PlayQueueUpdate. + /// </summary> + public class PlayQueueUpdate + { + /// <summary> + /// Initializes a new instance of the <see cref="PlayQueueUpdate"/> class. + /// </summary> + /// <param name="reason">The reason for the update.</param> + /// <param name="lastUpdate">The UTC time of the last change to the playing queue.</param> + /// <param name="playlist">The playlist.</param> + /// <param name="playingItemIndex">The playing item index in the playlist.</param> + /// <param name="startPositionTicks">The start position ticks.</param> + /// <param name="isPlaying">The playing item status.</param> + /// <param name="shuffleMode">The shuffle mode.</param> + /// <param name="repeatMode">The repeat mode.</param> + public PlayQueueUpdate(PlayQueueUpdateReason reason, DateTime lastUpdate, IReadOnlyList<QueueItem> playlist, int playingItemIndex, long startPositionTicks, bool isPlaying, GroupShuffleMode shuffleMode, GroupRepeatMode repeatMode) + { + Reason = reason; + LastUpdate = lastUpdate; + Playlist = playlist; + PlayingItemIndex = playingItemIndex; + StartPositionTicks = startPositionTicks; + IsPlaying = isPlaying; + ShuffleMode = shuffleMode; + RepeatMode = repeatMode; + } + + /// <summary> + /// Gets the request type that originated this update. + /// </summary> + /// <value>The reason for the update.</value> + public PlayQueueUpdateReason Reason { get; } + + /// <summary> + /// Gets the UTC time of the last change to the playing queue. + /// </summary> + /// <value>The UTC time of the last change to the playing queue.</value> + public DateTime LastUpdate { get; } + + /// <summary> + /// Gets the playlist. + /// </summary> + /// <value>The playlist.</value> + public IReadOnlyList<QueueItem> Playlist { get; } + + /// <summary> + /// Gets the playing item index in the playlist. + /// </summary> + /// <value>The playing item index in the playlist.</value> + public int PlayingItemIndex { get; } + + /// <summary> + /// Gets the start position ticks. + /// </summary> + /// <value>The start position ticks.</value> + public long StartPositionTicks { get; } + + /// <summary> + /// Gets a value indicating whether the current item is playing. + /// </summary> + /// <value>The playing item status.</value> + public bool IsPlaying { get; } + + /// <summary> + /// Gets the shuffle mode. + /// </summary> + /// <value>The shuffle mode.</value> + public GroupShuffleMode ShuffleMode { get; } + + /// <summary> + /// Gets the repeat mode. + /// </summary> + /// <value>The repeat mode.</value> + public GroupRepeatMode RepeatMode { get; } + } +} diff --git a/MediaBrowser.Model/SyncPlay/PlayQueueUpdateReason.cs b/MediaBrowser.Model/SyncPlay/PlayQueueUpdateReason.cs new file mode 100644 index 0000000000..b609f4b1bd --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/PlayQueueUpdateReason.cs @@ -0,0 +1,58 @@ +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Enum PlayQueueUpdateReason. + /// </summary> + public enum PlayQueueUpdateReason + { + /// <summary> + /// A user is requesting to play a new playlist. + /// </summary> + NewPlaylist = 0, + + /// <summary> + /// A user is changing the playing item. + /// </summary> + SetCurrentItem = 1, + + /// <summary> + /// A user is removing items from the playlist. + /// </summary> + RemoveItems = 2, + + /// <summary> + /// A user is moving an item in the playlist. + /// </summary> + MoveItem = 3, + + /// <summary> + /// A user is adding items the queue. + /// </summary> + Queue = 4, + + /// <summary> + /// A user is adding items to the queue, after the currently playing item. + /// </summary> + QueueNext = 5, + + /// <summary> + /// A user is requesting the next item in queue. + /// </summary> + NextItem = 6, + + /// <summary> + /// A user is requesting the previous item in queue. + /// </summary> + PreviousItem = 7, + + /// <summary> + /// A user is changing repeat mode. + /// </summary> + RepeatMode = 8, + + /// <summary> + /// A user is changing shuffle mode. + /// </summary> + ShuffleMode = 9 + } +} diff --git a/MediaBrowser.Model/SyncPlay/PlaybackRequestType.cs b/MediaBrowser.Model/SyncPlay/PlaybackRequestType.cs new file mode 100644 index 0000000000..4429623dd9 --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/PlaybackRequestType.cs @@ -0,0 +1,93 @@ +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Enum PlaybackRequestType. + /// </summary> + public enum PlaybackRequestType + { + /// <summary> + /// A user is setting a new playlist. + /// </summary> + Play = 0, + + /// <summary> + /// A user is changing the playlist item. + /// </summary> + SetPlaylistItem = 1, + + /// <summary> + /// A user is removing items from the playlist. + /// </summary> + RemoveFromPlaylist = 2, + + /// <summary> + /// A user is moving an item in the playlist. + /// </summary> + MovePlaylistItem = 3, + + /// <summary> + /// A user is adding items to the playlist. + /// </summary> + Queue = 4, + + /// <summary> + /// A user is requesting an unpause command for the group. + /// </summary> + Unpause = 5, + + /// <summary> + /// A user is requesting a pause command for the group. + /// </summary> + Pause = 6, + + /// <summary> + /// A user is requesting a stop command for the group. + /// </summary> + Stop = 7, + + /// <summary> + /// A user is requesting a seek command for the group. + /// </summary> + Seek = 8, + + /// <summary> + /// A user is signaling that playback is buffering. + /// </summary> + Buffer = 9, + + /// <summary> + /// A user is signaling that playback resumed. + /// </summary> + Ready = 10, + + /// <summary> + /// A user is requesting next item in playlist. + /// </summary> + NextItem = 11, + + /// <summary> + /// A user is requesting previous item in playlist. + /// </summary> + PreviousItem = 12, + + /// <summary> + /// A user is setting the repeat mode. + /// </summary> + SetRepeatMode = 13, + + /// <summary> + /// A user is setting the shuffle mode. + /// </summary> + SetShuffleMode = 14, + + /// <summary> + /// A user is reporting their ping. + /// </summary> + Ping = 15, + + /// <summary> + /// A user is requesting to be ignored on group wait. + /// </summary> + IgnoreWait = 16 + } +} diff --git a/MediaBrowser.Model/SyncPlay/QueueItem.cs b/MediaBrowser.Model/SyncPlay/QueueItem.cs new file mode 100644 index 0000000000..a6dcc109ed --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/QueueItem.cs @@ -0,0 +1,31 @@ +using System; + +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Class QueueItem. + /// </summary> + public class QueueItem + { + /// <summary> + /// Initializes a new instance of the <see cref="QueueItem"/> class. + /// </summary> + /// <param name="itemId">The item identifier.</param> + public QueueItem(Guid itemId) + { + ItemId = itemId; + } + + /// <summary> + /// Gets the item identifier. + /// </summary> + /// <value>The item identifier.</value> + public Guid ItemId { get; } + + /// <summary> + /// Gets the playlist identifier of the item. + /// </summary> + /// <value>The playlist identifier of the item.</value> + public Guid PlaylistItemId { get; } = Guid.NewGuid(); + } +} diff --git a/MediaBrowser.Model/SyncPlay/RequestType.cs b/MediaBrowser.Model/SyncPlay/RequestType.cs new file mode 100644 index 0000000000..a6e397dcd6 --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/RequestType.cs @@ -0,0 +1,33 @@ +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Enum RequestType. + /// </summary> + public enum RequestType + { + /// <summary> + /// A user is requesting to create a new group. + /// </summary> + NewGroup = 0, + + /// <summary> + /// A user is requesting to join a group. + /// </summary> + JoinGroup = 1, + + /// <summary> + /// A user is requesting to leave a group. + /// </summary> + LeaveGroup = 2, + + /// <summary> + /// A user is requesting the list of available groups. + /// </summary> + ListGroups = 3, + + /// <summary> + /// A user is sending a playback command to a group. + /// </summary> + Playback = 4 + } +} diff --git a/MediaBrowser.Model/SyncPlay/SendCommand.cs b/MediaBrowser.Model/SyncPlay/SendCommand.cs new file mode 100644 index 0000000000..73cb50876d --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/SendCommand.cs @@ -0,0 +1,65 @@ +using System; + +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Class SendCommand. + /// </summary> + public class SendCommand + { + /// <summary> + /// Initializes a new instance of the <see cref="SendCommand"/> class. + /// </summary> + /// <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, Guid playlistItemId, DateTime when, SendCommandType command, long? positionTicks, DateTime emittedAt) + { + GroupId = groupId; + PlaylistItemId = playlistItemId; + When = when; + Command = command; + PositionTicks = positionTicks; + EmittedAt = emittedAt; + } + + /// <summary> + /// Gets the group identifier. + /// </summary> + /// <value>The group identifier.</value> + public Guid GroupId { get; } + + /// <summary> + /// Gets the playlist identifier of the playing item. + /// </summary> + /// <value>The playlist identifier of the playing item.</value> + public Guid PlaylistItemId { get; } + + /// <summary> + /// Gets or sets the UTC time when to execute the command. + /// </summary> + /// <value>The UTC time when to execute the command.</value> + public DateTime When { get; set; } + + /// <summary> + /// Gets the position ticks. + /// </summary> + /// <value>The position ticks.</value> + public long? PositionTicks { get; } + + /// <summary> + /// Gets the command. + /// </summary> + /// <value>The command.</value> + public SendCommandType Command { get; } + + /// <summary> + /// Gets the UTC time when this command has been emitted. + /// </summary> + /// <value>The UTC time when this command has been emitted.</value> + public DateTime EmittedAt { get; } + } +} diff --git a/MediaBrowser.Model/SyncPlay/SendCommandType.cs b/MediaBrowser.Model/SyncPlay/SendCommandType.cs new file mode 100644 index 0000000000..e6b17c60ae --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/SendCommandType.cs @@ -0,0 +1,28 @@ +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Enum SendCommandType. + /// </summary> + public enum SendCommandType + { + /// <summary> + /// The unpause command. Instructs users to unpause playback. + /// </summary> + Unpause = 0, + + /// <summary> + /// The pause command. Instructs users to pause playback. + /// </summary> + Pause = 1, + + /// <summary> + /// The stop command. Instructs users to stop playback. + /// </summary> + Stop = 2, + + /// <summary> + /// The seek command. Instructs users to seek to a specified time. + /// </summary> + Seek = 3 + } +} diff --git a/MediaBrowser.Model/SyncPlay/SyncPlayBroadcastType.cs b/MediaBrowser.Model/SyncPlay/SyncPlayBroadcastType.cs new file mode 100644 index 0000000000..29dbb11b38 --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/SyncPlayBroadcastType.cs @@ -0,0 +1,28 @@ +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Used to filter the sessions of a group. + /// </summary> + public enum SyncPlayBroadcastType + { + /// <summary> + /// All sessions will receive the message. + /// </summary> + AllGroup = 0, + + /// <summary> + /// Only the specified session will receive the message. + /// </summary> + CurrentSession = 1, + + /// <summary> + /// All sessions, except the current one, will receive the message. + /// </summary> + AllExceptCurrentSession = 2, + + /// <summary> + /// Only sessions that are not buffering will receive the message. + /// </summary> + AllReady = 3 + } +} diff --git a/MediaBrowser.Model/SyncPlay/UtcTimeResponse.cs b/MediaBrowser.Model/SyncPlay/UtcTimeResponse.cs new file mode 100644 index 0000000000..219e7b1e0c --- /dev/null +++ b/MediaBrowser.Model/SyncPlay/UtcTimeResponse.cs @@ -0,0 +1,33 @@ +using System; + +namespace MediaBrowser.Model.SyncPlay +{ + /// <summary> + /// Class UtcTimeResponse. + /// </summary> + public class UtcTimeResponse + { + /// <summary> + /// Initializes a new instance of the <see cref="UtcTimeResponse"/> class. + /// </summary> + /// <param name="requestReceptionTime">The UTC time when request has been received.</param> + /// <param name="responseTransmissionTime">The UTC time when response has been sent.</param> + public UtcTimeResponse(DateTime requestReceptionTime, DateTime responseTransmissionTime) + { + RequestReceptionTime = requestReceptionTime; + ResponseTransmissionTime = responseTransmissionTime; + } + + /// <summary> + /// Gets the UTC time when request has been received. + /// </summary> + /// <value>The UTC time when request has been received.</value> + public DateTime RequestReceptionTime { get; } + + /// <summary> + /// Gets the UTC time when response has been sent. + /// </summary> + /// <value>The UTC time when response has been sent.</value> + public DateTime ResponseTransmissionTime { get; } + } +} |
