diff options
Diffstat (limited to 'MediaBrowser.Model/ApiClient')
| -rw-r--r-- | MediaBrowser.Model/ApiClient/IConnectionManager.cs | 15 | ||||
| -rw-r--r-- | MediaBrowser.Model/ApiClient/ServerInfo.cs | 16 |
2 files changed, 26 insertions, 5 deletions
diff --git a/MediaBrowser.Model/ApiClient/IConnectionManager.cs b/MediaBrowser.Model/ApiClient/IConnectionManager.cs index 6a2d5c8cf..67bc80e5a 100644 --- a/MediaBrowser.Model/ApiClient/IConnectionManager.cs +++ b/MediaBrowser.Model/ApiClient/IConnectionManager.cs @@ -1,5 +1,6 @@ using MediaBrowser.Model.Dto; using MediaBrowser.Model.Events; +using MediaBrowser.Model.Users; using System; using System.Threading; using System.Threading.Tasks; @@ -50,13 +51,23 @@ namespace MediaBrowser.Model.ApiClient Task<ConnectionResult> Logout(); /// <summary> - /// Authenticates the specified server. + /// Authenticates with a specific server /// </summary> /// <param name="server">The server.</param> /// <param name="username">The username.</param> /// <param name="hash">The hash.</param> /// <param name="rememberLogin">if set to <c>true</c> [remember login].</param> /// <returns>Task.</returns> - Task Authenticate(ServerInfo server, string username, byte[] hash, bool rememberLogin); + Task<AuthenticationResult> Authenticate(ServerInfo server, string username, byte[] hash, bool rememberLogin); + + /// <summary> + /// Authenticates with a specific server + /// </summary> + /// <param name="apiClient">The API client.</param> + /// <param name="username">The username.</param> + /// <param name="hash">The hash.</param> + /// <param name="rememberLogin">if set to <c>true</c> [remember login].</param> + /// <returns>Task.</returns> + Task<AuthenticationResult> Authenticate(IApiClient apiClient, string username, byte[] hash, bool rememberLogin); } } diff --git a/MediaBrowser.Model/ApiClient/ServerInfo.cs b/MediaBrowser.Model/ApiClient/ServerInfo.cs index 966263726..c80a0b1d3 100644 --- a/MediaBrowser.Model/ApiClient/ServerInfo.cs +++ b/MediaBrowser.Model/ApiClient/ServerInfo.cs @@ -11,13 +11,23 @@ namespace MediaBrowser.Model.ApiClient public String RemoteAddress { get; set; } public String UserId { get; set; } public String AccessToken { get; set; } - public List<string> MacAddresses { get; set; } + public List<WakeOnLanInfo> WakeOnLanInfos { get; set; } public ServerInfo() { - MacAddresses = new List<string>(); - + WakeOnLanInfos = new List<WakeOnLanInfo>(); LocalAddress = "http://localhost:8096"; } } + + public class WakeOnLanInfo + { + public string MacAddress { get; set; } + public int Port { get; set; } + + public WakeOnLanInfo() + { + Port = 9; + } + } } |
