blob: 60d17fe367057fd13707632506dd2a02b6e68b65 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
using System;
using System.Threading;
using MediaBrowser.Controller.Session;
using MediaBrowser.Model.SyncPlay;
namespace MediaBrowser.Controller.SyncPlay
{
/// <summary>
/// Interface ISyncPlayController.
/// </summary>
public interface ISyncPlayController
{
/// <summary>
/// Gets the group id.
/// </summary>
/// <value>The group id.</value>
Guid GetGroupId();
/// <summary>
/// Gets the playing item id.
/// </summary>
/// <value>The playing item id.</value>
Guid GetPlayingItemId();
/// <summary>
/// Checks if the group is empty.
/// </summary>
/// <value>If the group is empty.</value>
bool IsGroupEmpty();
/// <summary>
/// Initializes the group with the session's info.
/// </summary>
/// <param name="session">The session.</param>
/// <param name="cancellationToken">The cancellation token.</param>
void CreateGroup(SessionInfo session, CancellationToken cancellationToken);
/// <summary>
/// Adds the session to the group.
/// </summary>
/// <param name="session">The session.</param>
/// <param name="request">The request.</param>
/// <param name="cancellationToken">The cancellation token.</param>
void SessionJoin(SessionInfo session, JoinGroupRequest request, CancellationToken cancellationToken);
/// <summary>
/// Removes the session from the group.
/// </summary>
/// <param name="session">The session.</param>
/// <param name="cancellationToken">The cancellation token.</param>
void SessionLeave(SessionInfo session, CancellationToken cancellationToken);
/// <summary>
/// Handles the requested action by the session.
/// </summary>
/// <param name="session">The session.</param>
/// <param name="request">The requested action.</param>
/// <param name="cancellationToken">The cancellation token.</param>
void HandleRequest(SessionInfo session, PlaybackRequest request, CancellationToken cancellationToken);
/// <summary>
/// Gets the info about the group for the clients.
/// </summary>
/// <value>The group info for the clients.</value>
GroupInfoView GetInfo();
}
}
|