jellyfin-server/MediaBrowser.Controller/QuickConnect/IQuickConnect.cs

40 lines
1.4 KiB
C#
Raw Normal View History

2020-04-15 19:28:42 +00:00
using System;
using System.Threading.Tasks;
2021-04-14 00:01:21 +00:00
using MediaBrowser.Controller.Session;
2020-04-15 19:28:42 +00:00
using MediaBrowser.Model.QuickConnect;
namespace MediaBrowser.Controller.QuickConnect
{
/// <summary>
/// Quick connect standard interface.
/// </summary>
public interface IQuickConnect
{
/// <summary>
2021-06-18 17:31:47 +00:00
/// Gets a value indicating whether quick connect is enabled or not.
/// </summary>
2021-06-18 17:31:47 +00:00
bool IsEnabled { get; }
2020-04-15 19:28:42 +00:00
/// <summary>
/// Initiates a new quick connect request.
/// </summary>
2020-07-27 04:13:14 +00:00
/// <returns>A quick connect result with tokens to proceed or throws an exception if not active.</returns>
2020-08-17 21:36:45 +00:00
QuickConnectResult TryConnect();
2020-04-15 19:28:42 +00:00
/// <summary>
/// Checks the status of an individual request.
/// </summary>
/// <param name="secret">Unique secret identifier of the request.</param>
/// <returns>Quick connect result.</returns>
QuickConnectResult CheckRequestStatus(string secret);
/// <summary>
/// Authorizes a quick connect request to connect as the calling user.
/// </summary>
2020-08-17 21:36:45 +00:00
/// <param name="userId">User id.</param>
2020-06-18 06:58:58 +00:00
/// <param name="code">Identifying code for the request.</param>
2020-04-15 19:28:42 +00:00
/// <returns>A boolean indicating if the authorization completed successfully.</returns>
Task<bool> AuthorizeRequest(Guid userId, string code);
2020-04-15 19:28:42 +00:00
}
}