You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/MediaBrowser.Controller/Connect/IConnectManager.cs

74 lines
2.5 KiB

using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Connect;
10 years ago
using System.Collections.Generic;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Connect
{
public interface IConnectManager
{
/// <summary>
/// Gets the wan API address.
/// </summary>
/// <value>The wan API address.</value>
string WanApiAddress { get; }
/// <summary>
/// Links the user.
/// </summary>
/// <param name="userId">The user identifier.</param>
/// <param name="connectUsername">The connect username.</param>
/// <returns>Task.</returns>
Task<UserLinkResult> LinkUser(string userId, string connectUsername);
/// <summary>
/// Removes the link.
/// </summary>
/// <param name="userId">The user identifier.</param>
/// <returns>Task.</returns>
10 years ago
Task RemoveConnect(string userId);
10 years ago
/// <summary>
/// Invites the user.
/// </summary>
10 years ago
/// <param name="request">The request.</param>
10 years ago
/// <returns>Task&lt;UserLinkResult&gt;.</returns>
10 years ago
Task<UserLinkResult> InviteUser(ConnectAuthorizationRequest request);
10 years ago
/// <summary>
/// Gets the pending guests.
/// </summary>
/// <returns>Task&lt;List&lt;ConnectAuthorization&gt;&gt;.</returns>
Task<List<ConnectAuthorization>> GetPendingGuests();
/// <summary>
/// Cancels the authorization.
/// </summary>
/// <param name="id">The identifier.</param>
/// <returns>Task.</returns>
Task CancelAuthorization(string id);
/// <summary>
/// Authenticates the specified username.
/// </summary>
/// <param name="username">The username.</param>
/// <param name="passwordMd5">The password MD5.</param>
/// <returns>Task.</returns>
Task Authenticate(string username, string passwordMd5);
/// <summary>
/// Gets the local user.
/// </summary>
/// <param name="connectUserId">The connect user identifier.</param>
/// <returns>Task&lt;User&gt;.</returns>
Task<User> GetLocalUser(string connectUserId);
/// <summary>
/// Determines whether [is authorization token valid] [the specified token].
/// </summary>
/// <param name="token">The token.</param>
/// <returns><c>true</c> if [is authorization token valid] [the specified token]; otherwise, <c>false</c>.</returns>
bool IsAuthorizationTokenValid(string token);
}
}