aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-07-06 17:23:32 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-07-06 17:23:32 -0400
commit53450bd514eec97d58eb18b8a01feab36475826b (patch)
tree5cd1b4013852619b0e108a8f2442ab893a924441 /MediaBrowser.Model
parentb3054a6a2216e36cc37279a1fc0f4c14e6668c8f (diff)
added a notifications service
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj5
-rw-r--r--MediaBrowser.Model/Notifications/Notification.cs33
-rw-r--r--MediaBrowser.Model/Notifications/NotificationLevel.cs10
-rw-r--r--MediaBrowser.Model/Notifications/NotificationQuery.cs15
-rw-r--r--MediaBrowser.Model/Notifications/NotificationResult.cs9
-rw-r--r--MediaBrowser.Model/Notifications/NotificationsSummary.cs9
-rw-r--r--MediaBrowser.Model/Tasks/TaskResult.cs6
7 files changed, 87 insertions, 0 deletions
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index b3e837dca..b59e54bcf 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -59,6 +59,11 @@
<Compile Include="Net\WebSocketMessage.cs" />
<Compile Include="Net\WebSocketMessageType.cs" />
<Compile Include="Net\WebSocketState.cs" />
+ <Compile Include="Notifications\Notification.cs" />
+ <Compile Include="Notifications\NotificationLevel.cs" />
+ <Compile Include="Notifications\NotificationQuery.cs" />
+ <Compile Include="Notifications\NotificationResult.cs" />
+ <Compile Include="Notifications\NotificationsSummary.cs" />
<Compile Include="Querying\ArtistsQuery.cs" />
<Compile Include="Querying\ItemReviewsResult.cs" />
<Compile Include="Querying\ItemsByNameQuery.cs" />
diff --git a/MediaBrowser.Model/Notifications/Notification.cs b/MediaBrowser.Model/Notifications/Notification.cs
new file mode 100644
index 000000000..14f55b6e1
--- /dev/null
+++ b/MediaBrowser.Model/Notifications/Notification.cs
@@ -0,0 +1,33 @@
+using System;
+
+namespace MediaBrowser.Model.Notifications
+{
+ public class Notification
+ {
+ public Guid Id { get; set; }
+
+ public Guid UserId { get; set; }
+
+ public DateTime Date { get; set; }
+
+ public bool IsRead { get; set; }
+
+ public string Name { get; set; }
+
+ public string Description { get; set; }
+
+ public string Url { get; set; }
+
+ public string Category { get; set; }
+
+ public string RelatedId { get; set; }
+
+ public NotificationLevel Level { get; set; }
+
+ public Notification()
+ {
+ Id = Guid.NewGuid();
+ Date = DateTime.UtcNow;
+ }
+ }
+}
diff --git a/MediaBrowser.Model/Notifications/NotificationLevel.cs b/MediaBrowser.Model/Notifications/NotificationLevel.cs
new file mode 100644
index 000000000..24946e071
--- /dev/null
+++ b/MediaBrowser.Model/Notifications/NotificationLevel.cs
@@ -0,0 +1,10 @@
+
+namespace MediaBrowser.Model.Notifications
+{
+ public enum NotificationLevel
+ {
+ Normal,
+ Warning,
+ Error
+ }
+}
diff --git a/MediaBrowser.Model/Notifications/NotificationQuery.cs b/MediaBrowser.Model/Notifications/NotificationQuery.cs
new file mode 100644
index 000000000..39a7326a6
--- /dev/null
+++ b/MediaBrowser.Model/Notifications/NotificationQuery.cs
@@ -0,0 +1,15 @@
+using System;
+
+namespace MediaBrowser.Model.Notifications
+{
+ public class NotificationQuery
+ {
+ public Guid? UserId { get; set; }
+
+ public bool? IsRead { get; set; }
+
+ public int? StartIndex { get; set; }
+
+ public int? Limit { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/Notifications/NotificationResult.cs b/MediaBrowser.Model/Notifications/NotificationResult.cs
new file mode 100644
index 000000000..a98fe4edb
--- /dev/null
+++ b/MediaBrowser.Model/Notifications/NotificationResult.cs
@@ -0,0 +1,9 @@
+
+namespace MediaBrowser.Model.Notifications
+{
+ public class NotificationResult
+ {
+ public Notification[] Notifications { get; set; }
+ public int TotalRecordCount { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/Notifications/NotificationsSummary.cs b/MediaBrowser.Model/Notifications/NotificationsSummary.cs
new file mode 100644
index 000000000..87dd51a5f
--- /dev/null
+++ b/MediaBrowser.Model/Notifications/NotificationsSummary.cs
@@ -0,0 +1,9 @@
+
+namespace MediaBrowser.Model.Notifications
+{
+ public class NotificationsSummary
+ {
+ public int UnreadCount { get; set; }
+ public NotificationLevel MaxUnreadNotificationLevel { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/Tasks/TaskResult.cs b/MediaBrowser.Model/Tasks/TaskResult.cs
index 46d2c86e7..c04d2f2fe 100644
--- a/MediaBrowser.Model/Tasks/TaskResult.cs
+++ b/MediaBrowser.Model/Tasks/TaskResult.cs
@@ -36,5 +36,11 @@ namespace MediaBrowser.Model.Tasks
/// </summary>
/// <value>The id.</value>
public Guid Id { get; set; }
+
+ /// <summary>
+ /// Gets or sets the error message.
+ /// </summary>
+ /// <value>The error message.</value>
+ public string ErrorMessage { get; set; }
}
}