added IServerEvents

This commit is contained in:
Luke Pulverenti
2013-10-08 20:14:42 -04:00
parent 39c8dc654a
commit 5267460391
9 changed files with 299 additions and 7 deletions

View File

@@ -0,0 +1,104 @@
using System;
namespace MediaBrowser.Model.ApiClient
{
/// <summary>
/// Interface IServerEvents
/// </summary>
public interface IServerEvents
{
/// <summary>
/// Occurs when [user deleted].
/// </summary>
event EventHandler<UserDeletedEventArgs> UserDeleted;
/// <summary>
/// Occurs when [scheduled task started].
/// </summary>
event EventHandler<ScheduledTaskStartedEventArgs> ScheduledTaskStarted;
/// <summary>
/// Occurs when [scheduled task ended].
/// </summary>
event EventHandler<ScheduledTaskEndedEventArgs> ScheduledTaskEnded;
/// <summary>
/// Occurs when [package installing].
/// </summary>
event EventHandler<PackageInstallationEventArgs> PackageInstalling;
/// <summary>
/// Occurs when [package installation failed].
/// </summary>
event EventHandler<PackageInstallationEventArgs> PackageInstallationFailed;
/// <summary>
/// Occurs when [package installation completed].
/// </summary>
event EventHandler<PackageInstallationEventArgs> PackageInstallationCompleted;
/// <summary>
/// Occurs when [package installation cancelled].
/// </summary>
event EventHandler<PackageInstallationEventArgs> PackageInstallationCancelled;
/// <summary>
/// Occurs when [user updated].
/// </summary>
event EventHandler<UserUpdatedEventArgs> UserUpdated;
/// <summary>
/// Occurs when [plugin uninstalled].
/// </summary>
event EventHandler<PluginUninstallEventArgs> PluginUninstalled;
/// <summary>
/// Occurs when [library changed].
/// </summary>
event EventHandler<LibraryChangedEventArgs> LibraryChanged;
/// <summary>
/// Occurs when [browse command].
/// </summary>
event EventHandler<BrowseRequestEventArgs> BrowseCommand;
/// <summary>
/// Occurs when [play command].
/// </summary>
event EventHandler<PlayRequestEventArgs> PlayCommand;
/// <summary>
/// Occurs when [playstate command].
/// </summary>
event EventHandler<PlaystateRequestEventArgs> PlaystateCommand;
/// <summary>
/// Occurs when [message command].
/// </summary>
event EventHandler<MessageCommandEventArgs> MessageCommand;
/// <summary>
/// Occurs when [system command].
/// </summary>
event EventHandler<SystemCommandEventArgs> SystemCommand;
/// <summary>
/// Occurs when [notification added].
/// </summary>
event EventHandler<EventArgs> NotificationAdded;
/// <summary>
/// Occurs when [notification updated].
/// </summary>
event EventHandler<EventArgs> NotificationUpdated;
/// <summary>
/// Occurs when [notifications marked read].
/// </summary>
event EventHandler<EventArgs> NotificationsMarkedRead;
/// <summary>
/// Occurs when [server restarting].
/// </summary>
event EventHandler<EventArgs> ServerRestarting;
/// <summary>
/// Occurs when [server shutting down].
/// </summary>
event EventHandler<EventArgs> ServerShuttingDown;
/// <summary>
/// Occurs when [sessions updated].
/// </summary>
event EventHandler<SessionUpdatesEventArgs> SessionsUpdated;
/// <summary>
/// Occurs when [restart required].
/// </summary>
event EventHandler<EventArgs> RestartRequired;
/// <summary>
/// Occurs when [user data changed].
/// </summary>
event EventHandler<UserDataChangedEventArgs> UserDataChanged;
}
}

View File

@@ -0,0 +1,171 @@
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 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 SystemCommandEventArgs : EventArgs
{
/// <summary>
/// Gets or sets the command.
/// </summary>
/// <value>The command.</value>
public SystemCommand Command { get; set; }
}
/// <summary>
/// Class SessionUpdatesEventArgs
/// </summary>
public class SessionUpdatesEventArgs : EventArgs
{
public SessionInfoDto[] Sessions { get; set; }
}
}