using System.Collections.Generic;
using System.Net;
using Mtp2Dav.WebDAVSharp.Server._1d2086a502937936ebc6bfe19cfa15d855be1c31.Adapters;
using Mtp2Dav.WebDAVSharp.Server._1d2086a502937936ebc6bfe19cfa15d855be1c31.Stores;
namespace Mtp2Dav.WebDAVSharp.Server._1d2086a502937936ebc6bfe19cfa15d855be1c31.MethodHandlers
{
///
/// This class implements the PUT HTTP method for WebDAV#.
///
internal class WebDavUnlockMethodHandler : WebDavMethodHandlerBase, IWebDavMethodHandler
{
///
/// Gets the collection of the names of the HTTP methods handled by this instance.
///
///
/// The names.
///
public IEnumerable Names => new[]
{
"UNLOCK"
};
///
/// Processes the request.
///
/// The through which the request came in from the client.
///
/// The
/// object containing both the request and response
/// objects to use.
///
/// The that the is hosting.
public void ProcessRequest(WebDavServer server, IHttpListenerContext context, IWebDavStore store)
{
// Get the parent collection of the item
var collection = GetParentCollection(server, store, context.Request.Url);
// Get the item from the collection
var item = GetItemFromCollection(collection, context.Request.Url);
/***************************************************************************************************
* Send the response
***************************************************************************************************/
context.SendSimpleResponse(HttpStatusCode.NoContent);
}
}
}