From e83a3e710be75da138ef7b79d7351a4075151efc Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 3 Oct 2014 23:18:57 -0400 Subject: [PATCH] update connection manager --- MediaBrowser.Model/ApiClient/IApiClient.cs | 10 +++++-- .../ApiClient/IConnectionManager.cs | 26 ++++--------------- Nuget/MediaBrowser.Common.Internal.nuspec | 4 +-- Nuget/MediaBrowser.Common.nuspec | 2 +- Nuget/MediaBrowser.Model.Signed.nuspec | 2 +- Nuget/MediaBrowser.Server.Core.nuspec | 4 +-- 6 files changed, 19 insertions(+), 29 deletions(-) diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs index 3efdea70d4..6fb72d507f 100644 --- a/MediaBrowser.Model/ApiClient/IApiClient.cs +++ b/MediaBrowser.Model/ApiClient/IApiClient.cs @@ -2,6 +2,7 @@ using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Events; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Notifications; @@ -28,10 +29,15 @@ namespace MediaBrowser.Model.ApiClient public interface IApiClient : IServerEvents, IDisposable { /// - /// Occurs when [HTTP response received]. + /// Occurs when [remote logged out]. /// - event EventHandler HttpResponseReceived; + event EventHandler RemoteLoggedOut; + /// + /// Occurs when [authenticated]. + /// + event EventHandler> Authenticated; + /// /// Gets the API URL. /// diff --git a/MediaBrowser.Model/ApiClient/IConnectionManager.cs b/MediaBrowser.Model/ApiClient/IConnectionManager.cs index 67bc80e5a8..03d3472d25 100644 --- a/MediaBrowser.Model/ApiClient/IConnectionManager.cs +++ b/MediaBrowser.Model/ApiClient/IConnectionManager.cs @@ -1,6 +1,5 @@ using MediaBrowser.Model.Dto; using MediaBrowser.Model.Events; -using MediaBrowser.Model.Users; using System; using System.Threading; using System.Threading.Tasks; @@ -14,6 +13,11 @@ namespace MediaBrowser.Model.ApiClient /// event EventHandler> Connected; + /// + /// Occurs when [remote logged out]. + /// + event EventHandler RemoteLoggedOut; + /// /// Gets the API client. /// @@ -49,25 +53,5 @@ namespace MediaBrowser.Model.ApiClient /// /// Task<ConnectionResult>. Task Logout(); - - /// - /// Authenticates with a specific server - /// - /// The server. - /// The username. - /// The hash. - /// if set to true [remember login]. - /// Task. - Task Authenticate(ServerInfo server, string username, byte[] hash, bool rememberLogin); - - /// - /// Authenticates with a specific server - /// - /// The API client. - /// The username. - /// The hash. - /// if set to true [remember login]. - /// Task. - Task Authenticate(IApiClient apiClient, string username, byte[] hash, bool rememberLogin); } } diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec index faf1f48b2e..ef6502a7a1 100644 --- a/Nuget/MediaBrowser.Common.Internal.nuspec +++ b/Nuget/MediaBrowser.Common.Internal.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common.Internal - 3.0.460 + 3.0.462 MediaBrowser.Common.Internal Luke ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption. Copyright © Media Browser 2013 - + diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec index d3f8ccc6f4..75c7439b2d 100644 --- a/Nuget/MediaBrowser.Common.nuspec +++ b/Nuget/MediaBrowser.Common.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common - 3.0.460 + 3.0.462 MediaBrowser.Common Media Browser Team ebr,Luke,scottisafool diff --git a/Nuget/MediaBrowser.Model.Signed.nuspec b/Nuget/MediaBrowser.Model.Signed.nuspec index df18dc9e58..027d23a210 100644 --- a/Nuget/MediaBrowser.Model.Signed.nuspec +++ b/Nuget/MediaBrowser.Model.Signed.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Model.Signed - 3.0.460 + 3.0.462 MediaBrowser.Model - Signed Edition Media Browser Team ebr,Luke,scottisafool diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec index da7f371f14..326d8214ea 100644 --- a/Nuget/MediaBrowser.Server.Core.nuspec +++ b/Nuget/MediaBrowser.Server.Core.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Server.Core - 3.0.460 + 3.0.462 Media Browser.Server.Core Media Browser Team ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains core components required to build plugins for Media Browser Server. Copyright © Media Browser 2013 - +