mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 22:08:27 +01:00
Create common interface for SyncPlay requests
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using MediaBrowser.Model.SyncPlay;
|
||||
|
||||
namespace MediaBrowser.Controller.SyncPlay.Requests
|
||||
{
|
||||
/// <summary>
|
||||
/// Class JoinGroupRequest.
|
||||
/// </summary>
|
||||
public class JoinGroupRequest : ISyncPlayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="JoinGroupRequest"/> class.
|
||||
/// </summary>
|
||||
/// <param name="groupId">The identifier of the group to join.</param>
|
||||
public JoinGroupRequest(Guid groupId)
|
||||
{
|
||||
GroupId = groupId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the group identifier.
|
||||
/// </summary>
|
||||
/// <value>The identifier of the group to join.</value>
|
||||
public Guid GroupId { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public RequestType Type { get; } = RequestType.JoinGroup;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using MediaBrowser.Model.SyncPlay;
|
||||
|
||||
namespace MediaBrowser.Controller.SyncPlay.Requests
|
||||
{
|
||||
/// <summary>
|
||||
/// Class LeaveGroupRequest.
|
||||
/// </summary>
|
||||
public class LeaveGroupRequest : ISyncPlayRequest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public RequestType Type { get; } = RequestType.LeaveGroup;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using MediaBrowser.Model.SyncPlay;
|
||||
|
||||
namespace MediaBrowser.Controller.SyncPlay.Requests
|
||||
{
|
||||
/// <summary>
|
||||
/// Class ListGroupsRequest.
|
||||
/// </summary>
|
||||
public class ListGroupsRequest : ISyncPlayRequest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public RequestType Type { get; } = RequestType.ListGroups;
|
||||
}
|
||||
}
|
||||
28
MediaBrowser.Controller/SyncPlay/Requests/NewGroupRequest.cs
Normal file
28
MediaBrowser.Controller/SyncPlay/Requests/NewGroupRequest.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using MediaBrowser.Model.SyncPlay;
|
||||
|
||||
namespace MediaBrowser.Controller.SyncPlay.Requests
|
||||
{
|
||||
/// <summary>
|
||||
/// Class NewGroupRequest.
|
||||
/// </summary>
|
||||
public class NewGroupRequest : ISyncPlayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NewGroupRequest"/> class.
|
||||
/// </summary>
|
||||
/// <param name="groupName">The name of the new group.</param>
|
||||
public NewGroupRequest(string groupName)
|
||||
{
|
||||
GroupName = groupName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the group name.
|
||||
/// </summary>
|
||||
/// <value>The name of the new group.</value>
|
||||
public string GroupName { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public RequestType Type { get; } = RequestType.NewGroup;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user