using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Events;
using System;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Model.ApiClient
{
public interface IConnectionManager
{
///
/// Occurs when [connected].
///
event EventHandler> Connected;
///
/// Occurs when [remote logged out].
///
event EventHandler RemoteLoggedOut;
///
/// 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();
}
}