aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Dlna/Service/BaseService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-20 21:15:46 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-20 21:15:46 -0400
commitda943ebe993a698ceedf730a33b187e8caeeba87 (patch)
treefdfe900fa8c065ed2bd5bc5e6226b4e07c896704 /MediaBrowser.Dlna/Service/BaseService.cs
parent1774e5b1ac9f809fd97c1d95666fc563afa87914 (diff)
separate event managers
Diffstat (limited to 'MediaBrowser.Dlna/Service/BaseService.cs')
-rw-r--r--MediaBrowser.Dlna/Service/BaseService.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/MediaBrowser.Dlna/Service/BaseService.cs b/MediaBrowser.Dlna/Service/BaseService.cs
new file mode 100644
index 000000000..aeea7b8f3
--- /dev/null
+++ b/MediaBrowser.Dlna/Service/BaseService.cs
@@ -0,0 +1,37 @@
+using MediaBrowser.Common.Net;
+using MediaBrowser.Controller.Dlna;
+using MediaBrowser.Dlna.Eventing;
+using MediaBrowser.Model.Logging;
+
+namespace MediaBrowser.Dlna.Service
+{
+ public class BaseService : IEventManager
+ {
+ protected IEventManager EventManager;
+ protected IHttpClient HttpClient;
+ protected ILogger Logger;
+
+ protected BaseService(ILogger logger, IHttpClient httpClient)
+ {
+ Logger = logger;
+ HttpClient = httpClient;
+
+ EventManager = new EventManager(Logger, HttpClient);
+ }
+
+ public EventSubscriptionResponse CancelEventSubscription(string subscriptionId)
+ {
+ return EventManager.CancelEventSubscription(subscriptionId);
+ }
+
+ public EventSubscriptionResponse RenewEventSubscription(string subscriptionId, int? timeoutSeconds)
+ {
+ return EventManager.RenewEventSubscription(subscriptionId, timeoutSeconds);
+ }
+
+ public EventSubscriptionResponse CreateEventSubscription(string notificationType, int? timeoutSeconds, string callbackUrl)
+ {
+ return EventManager.CreateEventSubscription(notificationType, timeoutSeconds, callbackUrl);
+ }
+ }
+}