diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2021-08-18 02:46:59 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-18 02:46:59 -0400 |
| commit | 72d3f7020ad80ce1a53eeae8c5d57abeb22a4679 (patch) | |
| tree | dd43e663838cdc7d99a4af565523df58ae23c856 /MediaBrowser.Controller/QuickConnect/IQuickConnect.cs | |
| parent | 7aef0fce444e6d8e06386553ec7ea1401a01bbb1 (diff) | |
| parent | e5cbafdb6b47377052e0d638908ef96e30a997d6 (diff) | |
Merge branch 'master' into patch-2
Diffstat (limited to 'MediaBrowser.Controller/QuickConnect/IQuickConnect.cs')
| -rw-r--r-- | MediaBrowser.Controller/QuickConnect/IQuickConnect.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/QuickConnect/IQuickConnect.cs b/MediaBrowser.Controller/QuickConnect/IQuickConnect.cs new file mode 100644 index 000000000..ad34c8604 --- /dev/null +++ b/MediaBrowser.Controller/QuickConnect/IQuickConnect.cs @@ -0,0 +1,37 @@ +using System; +using MediaBrowser.Model.QuickConnect; + +namespace MediaBrowser.Controller.QuickConnect +{ + /// <summary> + /// Quick connect standard interface. + /// </summary> + public interface IQuickConnect + { + /// <summary> + /// Gets a value indicating whether quick connect is enabled or not. + /// </summary> + bool IsEnabled { get; } + + /// <summary> + /// Initiates a new quick connect request. + /// </summary> + /// <returns>A quick connect result with tokens to proceed or throws an exception if not active.</returns> + QuickConnectResult TryConnect(); + + /// <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> + /// <param name="userId">User id.</param> + /// <param name="code">Identifying code for the request.</param> + /// <returns>A boolean indicating if the authorization completed successfully.</returns> + bool AuthorizeRequest(Guid userId, string code); + } +} |
