using System; using System.Threading.Tasks; using MediaBrowser.Controller.Authentication; using MediaBrowser.Controller.Net; using MediaBrowser.Model.QuickConnect; namespace MediaBrowser.Controller.QuickConnect { /// /// Quick connect standard interface. /// public interface IQuickConnect { /// /// Gets a value indicating whether quick connect is enabled or not. /// bool IsEnabled { get; } /// /// Initiates a new quick connect request. /// /// The initiator authorization info. /// A quick connect result with tokens to proceed or throws an exception if not active. QuickConnectResult TryConnect(AuthorizationInfo authorizationInfo); /// /// Checks the status of an individual request. /// /// Unique secret identifier of the request. /// Quick connect result. QuickConnectResult CheckRequestStatus(string secret); /// /// Authorizes a quick connect request to connect as the calling user. /// /// User id. /// Identifying code for the request. /// A boolean indicating if the authorization completed successfully. Task AuthorizeRequest(Guid userId, string code); /// /// Gets the authorized request for the secret. /// /// The secret. /// The authentication result. AuthenticationResult GetAuthorizedRequest(string secret); } }