aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/Net
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-12-07 10:52:38 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-12-07 10:52:38 -0500
commitf32212d160f5427a56b5b8e0219206930c518b64 (patch)
treeeddda40fe8c4d46cd0a0009939607681da89f03c /MediaBrowser.Common/Net
parent1b1bcabbb12a3ab2c9b8c5b319423eb3860c9987 (diff)
update to service stack v4
Diffstat (limited to 'MediaBrowser.Common/Net')
-rw-r--r--MediaBrowser.Common/Net/IHasResultFactory.cs17
-rw-r--r--MediaBrowser.Common/Net/IHttpResultFactory.cs98
-rw-r--r--MediaBrowser.Common/Net/IHttpServer.cs56
-rw-r--r--MediaBrowser.Common/Net/IRestfulService.cs11
4 files changed, 0 insertions, 182 deletions
diff --git a/MediaBrowser.Common/Net/IHasResultFactory.cs b/MediaBrowser.Common/Net/IHasResultFactory.cs
deleted file mode 100644
index d9da0c7e4e..0000000000
--- a/MediaBrowser.Common/Net/IHasResultFactory.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using ServiceStack.ServiceHost;
-
-namespace MediaBrowser.Common.Net
-{
- /// <summary>
- /// Interface IHasResultFactory
- /// Services that require a ResultFactory should implement this
- /// </summary>
- public interface IHasResultFactory : IRequiresRequestContext
- {
- /// <summary>
- /// Gets or sets the result factory.
- /// </summary>
- /// <value>The result factory.</value>
- IHttpResultFactory ResultFactory { get; set; }
- }
-}
diff --git a/MediaBrowser.Common/Net/IHttpResultFactory.cs b/MediaBrowser.Common/Net/IHttpResultFactory.cs
deleted file mode 100644
index 9f3d05d912..0000000000
--- a/MediaBrowser.Common/Net/IHttpResultFactory.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-using ServiceStack.ServiceHost;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Threading.Tasks;
-
-namespace MediaBrowser.Common.Net
-{
- /// <summary>
- /// Interface IHttpResultFactory
- /// </summary>
- public interface IHttpResultFactory
- {
- /// <summary>
- /// Throws the error.
- /// </summary>
- /// <param name="statusCode">The status code.</param>
- /// <param name="errorMessage">The error message.</param>
- /// <param name="responseHeaders">The response headers.</param>
- void ThrowError(int statusCode, string errorMessage, IDictionary<string, string> responseHeaders = null);
-
- /// <summary>
- /// Gets the result.
- /// </summary>
- /// <param name="content">The content.</param>
- /// <param name="contentType">Type of the content.</param>
- /// <param name="responseHeaders">The response headers.</param>
- /// <returns>System.Object.</returns>
- object GetResult(object content, string contentType, IDictionary<string,string> responseHeaders = null);
-
- /// <summary>
- /// Gets the optimized result.
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <param name="requestContext">The request context.</param>
- /// <param name="result">The result.</param>
- /// <param name="responseHeaders">The response headers.</param>
- /// <returns>System.Object.</returns>
- object GetOptimizedResult<T>(IRequestContext requestContext, T result, IDictionary<string, string> responseHeaders = null)
- where T : class;
-
- /// <summary>
- /// Gets the optimized result using cache.
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <param name="requestContext">The request context.</param>
- /// <param name="cacheKey">The cache key.</param>
- /// <param name="lastDateModified">The last date modified.</param>
- /// <param name="cacheDuration">Duration of the cache.</param>
- /// <param name="factoryFn">The factory function that creates the response object.</param>
- /// <param name="responseHeaders">The response headers.</param>
- /// <returns>System.Object.</returns>
- object GetOptimizedResultUsingCache<T>(IRequestContext requestContext, Guid cacheKey, DateTime lastDateModified, TimeSpan? cacheDuration, Func<T> factoryFn, IDictionary<string, string> responseHeaders = null)
- where T : class;
-
- /// <summary>
- /// Gets the cached result.
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <param name="requestContext">The request context.</param>
- /// <param name="cacheKey">The cache key.</param>
- /// <param name="lastDateModified">The last date modified.</param>
- /// <param name="cacheDuration">Duration of the cache.</param>
- /// <param name="factoryFn">The factory fn.</param>
- /// <param name="contentType">Type of the content.</param>
- /// <param name="responseHeaders">The response headers.</param>
- /// <returns>System.Object.</returns>
- object GetCachedResult<T>(IRequestContext requestContext, Guid cacheKey, DateTime lastDateModified, TimeSpan? cacheDuration, Func<T> factoryFn, string contentType, IDictionary<string, string> responseHeaders = null)
- where T : class;
-
- /// <summary>
- /// Gets the static result.
- /// </summary>
- /// <param name="requestContext">The request context.</param>
- /// <param name="cacheKey">The cache key.</param>
- /// <param name="lastDateModified">The last date modified.</param>
- /// <param name="cacheDuration">Duration of the cache.</param>
- /// <param name="contentType">Type of the content.</param>
- /// <param name="factoryFn">The factory fn.</param>
- /// <param name="responseHeaders">The response headers.</param>
- /// <param name="isHeadRequest">if set to <c>true</c> [is head request].</param>
- /// <returns>System.Object.</returns>
- object GetStaticResult(IRequestContext requestContext, Guid cacheKey, DateTime? lastDateModified,
- TimeSpan? cacheDuration, string contentType, Func<Task<Stream>> factoryFn,
- IDictionary<string, string> responseHeaders = null, bool isHeadRequest = false);
-
- /// <summary>
- /// Gets the static file result.
- /// </summary>
- /// <param name="requestContext">The request context.</param>
- /// <param name="path">The path.</param>
- /// <param name="fileShare">The file share.</param>
- /// <param name="responseHeaders">The response headers.</param>
- /// <param name="isHeadRequest">if set to <c>true</c> [is head request].</param>
- /// <returns>System.Object.</returns>
- object GetStaticFileResult(IRequestContext requestContext, string path, FileShare fileShare = FileShare.Read, IDictionary<string, string> responseHeaders = null, bool isHeadRequest = false);
- }
-}
diff --git a/MediaBrowser.Common/Net/IHttpServer.cs b/MediaBrowser.Common/Net/IHttpServer.cs
deleted file mode 100644
index 8bbaac0391..0000000000
--- a/MediaBrowser.Common/Net/IHttpServer.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MediaBrowser.Common.Net
-{
- /// <summary>
- /// Interface IHttpServer
- /// </summary>
- public interface IHttpServer : IDisposable
- {
- /// <summary>
- /// Gets the URL prefix.
- /// </summary>
- /// <value>The URL prefix.</value>
- string UrlPrefix { get; }
-
- /// <summary>
- /// Starts the specified server name.
- /// </summary>
- /// <param name="urlPrefix">The URL.</param>
- void Start(string urlPrefix);
-
- /// <summary>
- /// Gets a value indicating whether [supports web sockets].
- /// </summary>
- /// <value><c>true</c> if [supports web sockets]; otherwise, <c>false</c>.</value>
- bool SupportsWebSockets { get; }
-
- /// <summary>
- /// Gets the local end points.
- /// </summary>
- /// <value>The local end points.</value>
- IEnumerable<string> LocalEndPoints { get; }
-
- /// <summary>
- /// Stops this instance.
- /// </summary>
- void Stop();
-
- /// <summary>
- /// Gets or sets a value indicating whether [enable HTTP request logging].
- /// </summary>
- /// <value><c>true</c> if [enable HTTP request logging]; otherwise, <c>false</c>.</value>
- bool EnableHttpRequestLogging { get; set; }
-
- /// <summary>
- /// Occurs when [web socket connected].
- /// </summary>
- event EventHandler<WebSocketConnectEventArgs> WebSocketConnected;
-
- /// <summary>
- /// Inits this instance.
- /// </summary>
- void Init(IEnumerable<IRestfulService> services);
- }
-} \ No newline at end of file
diff --git a/MediaBrowser.Common/Net/IRestfulService.cs b/MediaBrowser.Common/Net/IRestfulService.cs
deleted file mode 100644
index 7a1b267951..0000000000
--- a/MediaBrowser.Common/Net/IRestfulService.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using ServiceStack.ServiceHost;
-
-namespace MediaBrowser.Common.Net
-{
- /// <summary>
- /// Interface IRestfulService
- /// </summary>
- public interface IRestfulService : IService
- {
- }
-}