aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/ApiClient
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-08 16:09:53 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-08 16:09:53 -0400
commitf02c3260273a09f465c4e7a97d8b90f0f6909734 (patch)
tree180760af62fcddc1964e000c6c57bd368dce836d /MediaBrowser.Model/ApiClient
parent374dd8d44152e49f4616a9c8c3d36e8793ed037e (diff)
Removed guids from the model project
Diffstat (limited to 'MediaBrowser.Model/ApiClient')
-rw-r--r--MediaBrowser.Model/ApiClient/IApiClient.cs38
-rw-r--r--MediaBrowser.Model/ApiClient/IServerEvents.cs55
-rw-r--r--MediaBrowser.Model/ApiClient/ServerEventArgs.cs148
3 files changed, 75 insertions, 166 deletions
diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs
index c9f5f3ae7..bfc631c79 100644
--- a/MediaBrowser.Model/ApiClient/IApiClient.cs
+++ b/MediaBrowser.Model/ApiClient/IApiClient.cs
@@ -138,7 +138,7 @@ namespace MediaBrowser.Model.ApiClient
/// <param name="notificationIdList">The notification id list.</param>
/// <param name="isRead">if set to <c>true</c> [is read].</param>
/// <returns>Task.</returns>
- Task MarkNotificationsRead(string userId, IEnumerable<Guid> notificationIdList, bool isRead);
+ Task MarkNotificationsRead(string userId, IEnumerable<string> notificationIdList, bool isRead);
/// <summary>
/// Gets the notifications summary.
@@ -447,7 +447,7 @@ namespace MediaBrowser.Model.ApiClient
/// <param name="id">The id.</param>
/// <returns>Task{TaskInfo}.</returns>
/// <exception cref="ArgumentNullException">id</exception>
- Task<TaskInfo> GetScheduledTaskAsync(Guid id);
+ Task<TaskInfo> GetScheduledTaskAsync(string id);
/// <summary>
/// Gets a user by id
@@ -582,6 +582,38 @@ namespace MediaBrowser.Model.ApiClient
Task SendCommandAsync(string sessionId, GeneralCommand command);
/// <summary>
+ /// Sends the string.
+ /// </summary>
+ /// <param name="sessionId">The session identifier.</param>
+ /// <param name="text">The text.</param>
+ /// <returns>Task.</returns>
+ Task SendString(string sessionId, string text);
+
+ /// <summary>
+ /// Sets the volume.
+ /// </summary>
+ /// <param name="sessionId">The session identifier.</param>
+ /// <param name="volume">The volume.</param>
+ /// <returns>Task.</returns>
+ Task SetVolume(string sessionId, int volume);
+
+ /// <summary>
+ /// Sets the index of the audio stream.
+ /// </summary>
+ /// <param name="sessionId">The session identifier.</param>
+ /// <param name="volume">The volume.</param>
+ /// <returns>Task.</returns>
+ Task SetAudioStreamIndex(string sessionId, int? volume);
+
+ /// <summary>
+ /// Sets the index of the subtitle stream.
+ /// </summary>
+ /// <param name="sessionId">The session identifier.</param>
+ /// <param name="volume">The volume.</param>
+ /// <returns>Task.</returns>
+ Task SetSubtitleStreamIndex(string sessionId, int? volume);
+
+ /// <summary>
/// Instructs the client to display a message to the user
/// </summary>
/// <param name="sessionId">The session id.</param>
@@ -632,7 +664,7 @@ namespace MediaBrowser.Model.ApiClient
/// <param name="triggers">The triggers.</param>
/// <returns>Task{RequestResult}.</returns>
/// <exception cref="ArgumentNullException">id</exception>
- Task UpdateScheduledTaskTriggersAsync(Guid id, TaskTriggerInfo[] triggers);
+ Task UpdateScheduledTaskTriggersAsync(string id, TaskTriggerInfo[] triggers);
/// <summary>
/// Gets the display preferences.
diff --git a/MediaBrowser.Model/ApiClient/IServerEvents.cs b/MediaBrowser.Model/ApiClient/IServerEvents.cs
index e13f3cc2c..8e46f3d9f 100644
--- a/MediaBrowser.Model/ApiClient/IServerEvents.cs
+++ b/MediaBrowser.Model/ApiClient/IServerEvents.cs
@@ -1,4 +1,11 @@
-using System;
+using MediaBrowser.Model.Dto;
+using MediaBrowser.Model.Entities;
+using MediaBrowser.Model.Events;
+using MediaBrowser.Model.Plugins;
+using MediaBrowser.Model.Session;
+using MediaBrowser.Model.Tasks;
+using MediaBrowser.Model.Updates;
+using System;
namespace MediaBrowser.Model.ApiClient
{
@@ -10,59 +17,59 @@ namespace MediaBrowser.Model.ApiClient
/// <summary>
/// Occurs when [user deleted].
/// </summary>
- event EventHandler<UserDeletedEventArgs> UserDeleted;
+ event EventHandler<GenericEventArgs<string>> UserDeleted;
/// <summary>
/// Occurs when [scheduled task started].
/// </summary>
- event EventHandler<ScheduledTaskStartedEventArgs> ScheduledTaskStarted;
+ event EventHandler<GenericEventArgs<string>> ScheduledTaskStarted;
/// <summary>
/// Occurs when [scheduled task ended].
/// </summary>
- event EventHandler<ScheduledTaskEndedEventArgs> ScheduledTaskEnded;
+ event EventHandler<GenericEventArgs<TaskResult>> ScheduledTaskEnded;
/// <summary>
/// Occurs when [package installing].
/// </summary>
- event EventHandler<PackageInstallationEventArgs> PackageInstalling;
+ event EventHandler<GenericEventArgs<InstallationInfo>> PackageInstalling;
/// <summary>
/// Occurs when [package installation failed].
/// </summary>
- event EventHandler<PackageInstallationEventArgs> PackageInstallationFailed;
+ event EventHandler<GenericEventArgs<InstallationInfo>> PackageInstallationFailed;
/// <summary>
/// Occurs when [package installation completed].
/// </summary>
- event EventHandler<PackageInstallationEventArgs> PackageInstallationCompleted;
+ event EventHandler<GenericEventArgs<InstallationInfo>> PackageInstallationCompleted;
/// <summary>
/// Occurs when [package installation cancelled].
/// </summary>
- event EventHandler<PackageInstallationEventArgs> PackageInstallationCancelled;
+ event EventHandler<GenericEventArgs<InstallationInfo>> PackageInstallationCancelled;
/// <summary>
/// Occurs when [user updated].
/// </summary>
- event EventHandler<UserUpdatedEventArgs> UserUpdated;
+ event EventHandler<GenericEventArgs<UserDto>> UserUpdated;
/// <summary>
/// Occurs when [plugin uninstalled].
/// </summary>
- event EventHandler<PluginUninstallEventArgs> PluginUninstalled;
+ event EventHandler<GenericEventArgs<PluginInfo>> PluginUninstalled;
/// <summary>
/// Occurs when [library changed].
/// </summary>
- event EventHandler<LibraryChangedEventArgs> LibraryChanged;
+ event EventHandler<GenericEventArgs<LibraryUpdateInfo>> LibraryChanged;
/// <summary>
/// Occurs when [browse command].
/// </summary>
- event EventHandler<BrowseRequestEventArgs> BrowseCommand;
+ event EventHandler<GenericEventArgs<BrowseRequest>> BrowseCommand;
/// <summary>
/// Occurs when [play command].
/// </summary>
- event EventHandler<PlayRequestEventArgs> PlayCommand;
+ event EventHandler<GenericEventArgs<PlayRequest>> PlayCommand;
/// <summary>
/// Occurs when [playstate command].
/// </summary>
- event EventHandler<PlaystateRequestEventArgs> PlaystateCommand;
+ event EventHandler<GenericEventArgs<PlaystateRequest>> PlaystateCommand;
/// <summary>
/// Occurs when [message command].
/// </summary>
- event EventHandler<MessageCommandEventArgs> MessageCommand;
+ event EventHandler<GenericEventArgs<MessageCommand>> MessageCommand;
/// <summary>
/// Occurs when [system command].
/// </summary>
@@ -88,6 +95,22 @@ namespace MediaBrowser.Model.ApiClient
/// </summary>
event EventHandler<EventArgs> ServerShuttingDown;
/// <summary>
+ /// Occurs when [send text command].
+ /// </summary>
+ event EventHandler<GenericEventArgs<string>> SendTextCommand;
+ /// <summary>
+ /// Occurs when [set volume command].
+ /// </summary>
+ event EventHandler<GenericEventArgs<int>> SetVolumeCommand;
+ /// <summary>
+ /// Occurs when [set audio stream index command].
+ /// </summary>
+ event EventHandler<GenericEventArgs<int>> SetAudioStreamIndexCommand;
+ /// <summary>
+ /// Occurs when [set video stream index command].
+ /// </summary>
+ event EventHandler<GenericEventArgs<int>> SetVideoStreamIndexCommand;
+ /// <summary>
/// Occurs when [sessions updated].
/// </summary>
event EventHandler<SessionUpdatesEventArgs> SessionsUpdated;
@@ -98,7 +121,7 @@ namespace MediaBrowser.Model.ApiClient
/// <summary>
/// Occurs when [user data changed].
/// </summary>
- event EventHandler<UserDataChangedEventArgs> UserDataChanged;
+ event EventHandler<GenericEventArgs<UserDataChangeInfo>> UserDataChanged;
/// <summary>
/// Occurs when [connected].
/// </summary>
diff --git a/MediaBrowser.Model/ApiClient/ServerEventArgs.cs b/MediaBrowser.Model/ApiClient/ServerEventArgs.cs
index 6637edd74..ad0defe68 100644
--- a/MediaBrowser.Model/ApiClient/ServerEventArgs.cs
+++ b/MediaBrowser.Model/ApiClient/ServerEventArgs.cs
@@ -1,155 +1,9 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Plugins;
-using MediaBrowser.Model.Session;
-using MediaBrowser.Model.Tasks;
-using MediaBrowser.Model.Updates;
+using MediaBrowser.Model.Session;
using System;
namespace MediaBrowser.Model.ApiClient
{
/// <summary>
- /// Class UserDeletedEventArgs
- /// </summary>
- public class UserDeletedEventArgs : EventArgs
- {
- /// <summary>
- /// Gets or sets the id.
- /// </summary>
- /// <value>The id.</value>
- public string Id { get; set; }
- }
-
- public class UserDataChangedEventArgs : EventArgs
- {
- /// <summary>
- /// Gets or sets the user.
- /// </summary>
- /// <value>The user.</value>
- public UserDataChangeInfo ChangeInfo { get; set; }
- }
-
- /// <summary>
- /// Class UserUpdatedEventArgs
- /// </summary>
- public class UserUpdatedEventArgs : EventArgs
- {
- /// <summary>
- /// Gets or sets the user.
- /// </summary>
- /// <value>The user.</value>
- public UserDto User { get; set; }
- }
-
- /// <summary>
- /// Class ScheduledTaskStartedEventArgs
- /// </summary>
- public class ScheduledTaskStartedEventArgs : EventArgs
- {
- /// <summary>
- /// Gets or sets the name.
- /// </summary>
- /// <value>The name.</value>
- public string Name { get; set; }
- }
-
- /// <summary>
- /// Class ScheduledTaskEndedEventArgs
- /// </summary>
- public class ScheduledTaskEndedEventArgs : EventArgs
- {
- /// <summary>
- /// Gets or sets the result.
- /// </summary>
- /// <value>The result.</value>
- public TaskResult Result { get; set; }
- }
-
- /// <summary>
- /// Class PackageInstallationEventArgs
- /// </summary>
- public class PackageInstallationEventArgs : EventArgs
- {
- /// <summary>
- /// Gets or sets the installation info.
- /// </summary>
- /// <value>The installation info.</value>
- public InstallationInfo InstallationInfo { get; set; }
- }
-
- /// <summary>
- /// Class PluginUninstallEventArgs
- /// </summary>
- public class PluginUninstallEventArgs : EventArgs
- {
- /// <summary>
- /// Gets or sets the plugin info.
- /// </summary>
- /// <value>The plugin info.</value>
- public PluginInfo PluginInfo { get; set; }
- }
-
- /// <summary>
- /// Class LibraryChangedEventArgs
- /// </summary>
- public class LibraryChangedEventArgs : EventArgs
- {
- /// <summary>
- /// Gets or sets the update info.
- /// </summary>
- /// <value>The update info.</value>
- public LibraryUpdateInfo UpdateInfo { get; set; }
- }
-
- /// <summary>
- /// Class BrowseRequestEventArgs
- /// </summary>
- public class BrowseRequestEventArgs : EventArgs
- {
- /// <summary>
- /// Gets or sets the request.
- /// </summary>
- /// <value>The request.</value>
- public BrowseRequest Request { get; set; }
- }
-
- /// <summary>
- /// Class PlayRequestEventArgs
- /// </summary>
- public class PlayRequestEventArgs : EventArgs
- {
- /// <summary>
- /// Gets or sets the request.
- /// </summary>
- /// <value>The request.</value>
- public PlayRequest Request { get; set; }
- }
-
- /// <summary>
- /// Class PlaystateRequestEventArgs
- /// </summary>
- public class PlaystateRequestEventArgs : EventArgs
- {
- /// <summary>
- /// Gets or sets the request.
- /// </summary>
- /// <value>The request.</value>
- public PlaystateRequest Request { get; set; }
- }
-
- /// <summary>
- /// Class MessageCommandEventArgs
- /// </summary>
- public class MessageCommandEventArgs : EventArgs
- {
- /// <summary>
- /// Gets or sets the request.
- /// </summary>
- /// <value>The request.</value>
- public MessageCommand Request { get; set; }
- }
-
- /// <summary>
/// Class SystemCommandEventArgs
/// </summary>
public class GeneralCommandEventArgs : EventArgs