using MediaBrowser.Model.Connect;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Events;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Model.ApiClient
{
public interface IConnectionManager
{
///
/// Occurs when [connected].
///
event EventHandler> Connected;
///
/// Occurs when [local user sign in].
///
event EventHandler> LocalUserSignIn;
///
/// Occurs when [connect user sign in].
///
event EventHandler> ConnectUserSignIn;
///
/// Occurs when [local user sign out].
///
event EventHandler LocalUserSignOut;
///
/// Occurs when [connect user sign out].
///
event EventHandler ConnectUserSignOut;
[Obsolete]
event EventHandler RemoteLoggedOut;
///
/// Gets the connect user.
///
/// The connect user.
ConnectUser ConnectUser { get; }
///
/// Gets the API client.
///
/// The item.
/// MediaBrowser.Model.ApiClient.IApiClient.
IApiClient GetApiClient(BaseItemDto item);
///
/// Connects the specified cancellation token.
///
/// The cancellation token.
/// Task<ConnectionResult>.
Task Connect(CancellationToken cancellationToken);
///
/// Connects the specified server.
///
/// The server.
/// The cancellation token.
/// Task<ConnectionResult>.
Task Connect(ServerInfo server, CancellationToken cancellationToken);
///
/// Connects the specified server.
///
/// The address.
/// The cancellation token.
/// Task<ConnectionResult>.
Task Connect(string address, CancellationToken cancellationToken);
///
/// Logouts this instance.
///
/// Task<ConnectionResult>.
Task Logout();
///
/// Logins to connect.
///
/// Task.
Task LoginToConnect(string username, string password);
///
/// Gets the active api client instance
///
[Obsolete]
IApiClient CurrentApiClient { get; }
///
/// Creates the pin.
///
/// Task<PinCreationResult>.
Task CreatePin();
///
/// Gets the pin status.
///
/// The pin.
/// Task<PinStatusResult>.
Task GetPinStatus(PinCreationResult pin);
///
/// Exchanges the pin.
///
/// The pin.
/// Task.
Task ExchangePin(PinCreationResult pin);
///
/// Gets the available servers.
///
/// The cancellation token.
Task> GetAvailableServers(CancellationToken cancellationToken);
}
}