2020-04-01 17:52:42 +02:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using MediaBrowser.Controller.Session;
|
|
|
|
using MediaBrowser.Model.Syncplay;
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Syncplay
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Interface ISyncplayManager.
|
|
|
|
/// </summary>
|
|
|
|
public interface ISyncplayManager
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a new group.
|
|
|
|
/// </summary>
|
2020-04-04 17:56:21 +02:00
|
|
|
/// <param name="session">The session that's creating the group.</param>
|
|
|
|
void NewGroup(SessionInfo session);
|
2020-04-01 17:52:42 +02:00
|
|
|
|
|
|
|
/// <summary>
|
2020-04-04 17:56:21 +02:00
|
|
|
/// Adds the session to a group.
|
2020-04-01 17:52:42 +02:00
|
|
|
/// </summary>
|
2020-04-04 17:56:21 +02:00
|
|
|
/// <param name="session">The session.</param>
|
2020-04-01 17:52:42 +02:00
|
|
|
/// <param name="groupId">The group id.</param>
|
2020-04-04 17:56:21 +02:00
|
|
|
void JoinGroup(SessionInfo session, string groupId);
|
2020-04-01 17:52:42 +02:00
|
|
|
|
|
|
|
/// <summary>
|
2020-04-04 17:56:21 +02:00
|
|
|
/// Removes the session from a group.
|
2020-04-01 17:52:42 +02:00
|
|
|
/// </summary>
|
2020-04-04 17:56:21 +02:00
|
|
|
/// <param name="session">The session.</param>
|
|
|
|
void LeaveGroup(SessionInfo session);
|
2020-04-01 17:52:42 +02:00
|
|
|
|
|
|
|
/// <summary>
|
2020-04-04 17:56:21 +02:00
|
|
|
/// Gets list of available groups for a session.
|
2020-04-01 17:52:42 +02:00
|
|
|
/// </summary>
|
2020-04-04 17:56:21 +02:00
|
|
|
/// <param name="session">The session.</param>
|
2020-04-01 17:52:42 +02:00
|
|
|
/// <value>The list of available groups.</value>
|
2020-04-04 17:56:21 +02:00
|
|
|
List<GroupInfoView> ListGroups(SessionInfo session);
|
2020-04-01 17:52:42 +02:00
|
|
|
|
|
|
|
/// <summary>
|
2020-04-04 17:56:21 +02:00
|
|
|
/// Handle a request by a session in a group.
|
2020-04-01 17:52:42 +02:00
|
|
|
/// </summary>
|
2020-04-04 17:56:21 +02:00
|
|
|
/// <param name="session">The session.</param>
|
2020-04-01 17:52:42 +02:00
|
|
|
/// <param name="request">The request.</param>
|
2020-04-04 17:56:21 +02:00
|
|
|
void HandleRequest(SessionInfo session, SyncplayRequestInfo request);
|
2020-04-01 17:52:42 +02:00
|
|
|
|
|
|
|
/// <summary>
|
2020-04-04 17:56:21 +02:00
|
|
|
/// Maps a session to a group.
|
2020-04-01 17:52:42 +02:00
|
|
|
/// </summary>
|
2020-04-04 17:56:21 +02:00
|
|
|
/// <param name="session">The session.</param>
|
2020-04-01 17:52:42 +02:00
|
|
|
/// <param name="group">The group.</param>
|
|
|
|
/// <exception cref="InvalidOperationException"></exception>
|
2020-04-04 17:56:21 +02:00
|
|
|
void MapSessionToGroup(SessionInfo session, ISyncplayController group);
|
2020-04-01 17:52:42 +02:00
|
|
|
|
|
|
|
/// <summary>
|
2020-04-04 17:56:21 +02:00
|
|
|
/// Unmaps a session from a group.
|
2020-04-01 17:52:42 +02:00
|
|
|
/// </summary>
|
2020-04-04 17:56:21 +02:00
|
|
|
/// <param name="session">The session.</param>
|
2020-04-01 17:52:42 +02:00
|
|
|
/// <param name="group">The group.</param>
|
|
|
|
/// <exception cref="InvalidOperationException"></exception>
|
2020-04-04 17:56:21 +02:00
|
|
|
void UnmapSessionFromGroup(SessionInfo session, ISyncplayController group);
|
2020-04-01 17:52:42 +02:00
|
|
|
}
|
|
|
|
}
|