aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/ApiClient
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/ApiClient')
-rw-r--r--MediaBrowser.Model/ApiClient/ConnectionMode.cs8
-rw-r--r--MediaBrowser.Model/ApiClient/ConnectionResult.cs13
-rw-r--r--MediaBrowser.Model/ApiClient/ConnectionState.cs9
-rw-r--r--MediaBrowser.Model/ApiClient/GeneralCommandEventArgs.cs3
-rw-r--r--MediaBrowser.Model/ApiClient/IServerEvents.cs16
-rw-r--r--MediaBrowser.Model/ApiClient/ServerInfo.cs11
-rw-r--r--MediaBrowser.Model/ApiClient/SessionUpdatesEventArgs.cs5
-rw-r--r--MediaBrowser.Model/ApiClient/WakeOnLanInfo.cs13
8 files changed, 47 insertions, 31 deletions
diff --git a/MediaBrowser.Model/ApiClient/ConnectionMode.cs b/MediaBrowser.Model/ApiClient/ConnectionMode.cs
new file mode 100644
index 000000000..f14c88a09
--- /dev/null
+++ b/MediaBrowser.Model/ApiClient/ConnectionMode.cs
@@ -0,0 +1,8 @@
+namespace MediaBrowser.Model.ApiClient
+{
+ public enum ConnectionMode
+ {
+ Local = 1,
+ Remote = 2
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Model/ApiClient/ConnectionResult.cs b/MediaBrowser.Model/ApiClient/ConnectionResult.cs
index 348f059b4..0b6c0bfe9 100644
--- a/MediaBrowser.Model/ApiClient/ConnectionResult.cs
+++ b/MediaBrowser.Model/ApiClient/ConnectionResult.cs
@@ -12,17 +12,4 @@ namespace MediaBrowser.Model.ApiClient
State = ConnectionState.Unavailable;
}
}
-
- public enum ConnectionState
- {
- Unavailable = 1,
- ServerSignIn = 2,
- SignedIn = 3
- }
-
- public enum ConnectionMode
- {
- Local = 1,
- Remote = 2
- }
}
diff --git a/MediaBrowser.Model/ApiClient/ConnectionState.cs b/MediaBrowser.Model/ApiClient/ConnectionState.cs
new file mode 100644
index 000000000..9374c77f6
--- /dev/null
+++ b/MediaBrowser.Model/ApiClient/ConnectionState.cs
@@ -0,0 +1,9 @@
+namespace MediaBrowser.Model.ApiClient
+{
+ public enum ConnectionState
+ {
+ Unavailable = 1,
+ ServerSignIn = 2,
+ SignedIn = 3
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Model/ApiClient/GeneralCommandEventArgs.cs b/MediaBrowser.Model/ApiClient/GeneralCommandEventArgs.cs
index ce518a7cc..3c0b09da8 100644
--- a/MediaBrowser.Model/ApiClient/GeneralCommandEventArgs.cs
+++ b/MediaBrowser.Model/ApiClient/GeneralCommandEventArgs.cs
@@ -1,12 +1,11 @@
using MediaBrowser.Model.Session;
-using System;
namespace MediaBrowser.Model.ApiClient
{
/// <summary>
/// Class SystemCommandEventArgs
/// </summary>
- public class GeneralCommandEventArgs : EventArgs
+ public class GeneralCommandEventArgs
{
/// <summary>
/// Gets or sets the command.
diff --git a/MediaBrowser.Model/ApiClient/IServerEvents.cs b/MediaBrowser.Model/ApiClient/IServerEvents.cs
index 72b499157..88faad388 100644
--- a/MediaBrowser.Model/ApiClient/IServerEvents.cs
+++ b/MediaBrowser.Model/ApiClient/IServerEvents.cs
@@ -69,7 +69,7 @@ namespace MediaBrowser.Model.ApiClient
/// <summary>
/// Occurs when [system command].
/// </summary>
- event EventHandler<GeneralCommandEventArgs> GeneralCommand;
+ event EventHandler<GenericEventArgs<GeneralCommandEventArgs>> GeneralCommand;
/// <summary>
/// Occurs when [notification added].
/// </summary>
@@ -109,7 +109,7 @@ namespace MediaBrowser.Model.ApiClient
/// <summary>
/// Occurs when [sessions updated].
/// </summary>
- event EventHandler<SessionUpdatesEventArgs> SessionsUpdated;
+ event EventHandler<GenericEventArgs<SessionUpdatesEventArgs>> SessionsUpdated;
/// <summary>
/// Occurs when [restart required].
/// </summary>
@@ -118,5 +118,17 @@ namespace MediaBrowser.Model.ApiClient
/// Occurs when [user data changed].
/// </summary>
event EventHandler<GenericEventArgs<UserDataChangeInfo>> UserDataChanged;
+ /// <summary>
+ /// Occurs when [playback start].
+ /// </summary>
+ event EventHandler<GenericEventArgs<SessionInfoDto>> PlaybackStart;
+ /// <summary>
+ /// Occurs when [playback stopped].
+ /// </summary>
+ event EventHandler<GenericEventArgs<SessionInfoDto>> PlaybackStopped;
+ /// <summary>
+ /// Occurs when [session ended].
+ /// </summary>
+ event EventHandler<GenericEventArgs<SessionInfoDto>> SessionEnded;
}
}
diff --git a/MediaBrowser.Model/ApiClient/ServerInfo.cs b/MediaBrowser.Model/ApiClient/ServerInfo.cs
index c80a0b1d3..0656337ba 100644
--- a/MediaBrowser.Model/ApiClient/ServerInfo.cs
+++ b/MediaBrowser.Model/ApiClient/ServerInfo.cs
@@ -19,15 +19,4 @@ namespace MediaBrowser.Model.ApiClient
LocalAddress = "http://localhost:8096";
}
}
-
- public class WakeOnLanInfo
- {
- public string MacAddress { get; set; }
- public int Port { get; set; }
-
- public WakeOnLanInfo()
- {
- Port = 9;
- }
- }
}
diff --git a/MediaBrowser.Model/ApiClient/SessionUpdatesEventArgs.cs b/MediaBrowser.Model/ApiClient/SessionUpdatesEventArgs.cs
index 483ee45d0..af9a0986b 100644
--- a/MediaBrowser.Model/ApiClient/SessionUpdatesEventArgs.cs
+++ b/MediaBrowser.Model/ApiClient/SessionUpdatesEventArgs.cs
@@ -1,12 +1,11 @@
-using System;
-using MediaBrowser.Model.Session;
+using MediaBrowser.Model.Session;
namespace MediaBrowser.Model.ApiClient
{
/// <summary>
/// Class SessionUpdatesEventArgs
/// </summary>
- public class SessionUpdatesEventArgs : EventArgs
+ public class SessionUpdatesEventArgs
{
public SessionInfoDto[] Sessions { get; set; }
}
diff --git a/MediaBrowser.Model/ApiClient/WakeOnLanInfo.cs b/MediaBrowser.Model/ApiClient/WakeOnLanInfo.cs
new file mode 100644
index 000000000..f7a3c4ebb
--- /dev/null
+++ b/MediaBrowser.Model/ApiClient/WakeOnLanInfo.cs
@@ -0,0 +1,13 @@
+namespace MediaBrowser.Model.ApiClient
+{
+ public class WakeOnLanInfo
+ {
+ public string MacAddress { get; set; }
+ public int Port { get; set; }
+
+ public WakeOnLanInfo()
+ {
+ Port = 9;
+ }
+ }
+} \ No newline at end of file