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

@ -68,6 +68,12 @@
<Compile Include="..\MediaBrowser.Model\ApiClient\IApiClient.cs">
<Link>ApiClient\IApiClient.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\ApiClient\IServerEvents.cs">
<Link>ApiClient\IServerEvents.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\ApiClient\ServerEventArgs.cs">
<Link>ApiClient\ServerEventArgs.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\Configuration\BaseApplicationConfiguration.cs">
<Link>Configuration\BaseApplicationConfiguration.cs</Link>
</Compile>

View File

@ -52,6 +52,15 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\MediaBrowser.Model\ApiClient\HttpResponseEventArgs.cs">
<Link>ApiClient\HttpResponseEventArgs.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\ApiClient\IServerEvents.cs">
<Link>ApiClient\IServerEvents.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\ApiClient\ServerEventArgs.cs">
<Link>ApiClient\ServerEventArgs.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\Configuration\BaseApplicationConfiguration.cs">
<Link>Configuration\BaseApplicationConfiguration.cs</Link>
</Compile>

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; }
}
}

View File

@ -45,6 +45,8 @@
<Compile Include="ApiClient\HttpResponseEventArgs.cs" />
<Compile Include="ApiClient\IApiClient.cs" />
<Compile Include="ApiClient\ApiClientExtensions.cs" />
<Compile Include="ApiClient\IServerEvents.cs" />
<Compile Include="ApiClient\ServerEventArgs.cs" />
<Compile Include="Configuration\BaseApplicationConfiguration.cs" />
<Compile Include="Configuration\ManualLoginCategory.cs" />
<Compile Include="Configuration\ServerConfiguration.cs" />

View File

@ -5,9 +5,9 @@
<File FileName="MediaBrowser.Server.Implementations\HttpServer\HttpServer.cs" Line="1" Column="1" />
<File FileName="MediaBrowser.Server.Mono\FFMpeg\FFMpegDownloader.cs" Line="1" Column="1" />
<File FileName="MediaBrowser.Server.Mono\Networking\NetworkManager.cs" Line="1" Column="1" />
<File FileName="MediaBrowser.ServerApplication\ApplicationHost.cs" Line="525" Column="50" />
<File FileName="MediaBrowser.ServerApplication\ApplicationHost.cs" Line="1" Column="1" />
<File FileName="MediaBrowser.Server.Mono\Native\NativeApp.cs" Line="1" Column="1" />
<File FileName="MediaBrowser.Server.Mono\Program.cs" Line="250" Column="64" />
<File FileName="MediaBrowser.Server.Mono\Program.cs" Line="193" Column="25" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common.Internal</id>
<version>3.0.223</version>
<version>3.0.224</version>
<title>MediaBrowser.Common.Internal</title>
<authors>Luke</authors>
<owners>ebr,Luke,scottisafool</owners>
@ -12,7 +12,7 @@
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
<dependency id="MediaBrowser.Common" version="3.0.223" />
<dependency id="MediaBrowser.Common" version="3.0.224" />
<dependency id="NLog" version="2.0.1.2" />
<dependency id="ServiceStack.Text" version="3.9.58" />
<dependency id="SimpleInjector" version="2.3.2" />

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common</id>
<version>3.0.223</version>
<version>3.0.224</version>
<title>MediaBrowser.Common</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>MediaBrowser.Server.Core</id>
<version>3.0.223</version>
<version>3.0.224</version>
<title>Media Browser.Server.Core</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>
@ -12,7 +12,7 @@
<description>Contains core components required to build plugins for Media Browser Server.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
<dependency id="MediaBrowser.Common" version="3.0.223" />
<dependency id="MediaBrowser.Common" version="3.0.224" />
</dependencies>
</metadata>
<files>