-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | RFC 4918 WebDAV support
--   
--   This is a library for the Web Distributed Authoring and Versioning
--   (WebDAV) extensions to HTTP. At present it supports a very small
--   subset of client functionality.
--   
--   In addition, there is an executable, hdav, which can be used for
--   command-line operation.
@package DAV
@version 1.3.1

module Network.Protocol.HTTP.DAV
newtype DAVT m a
DAVT :: ExceptT String (StateT DAVContext m) a -> DAVT m a
[runDAVT] :: DAVT m a -> ExceptT String (StateT DAVContext m) a
evalDAVT :: MonadIO m => DAVURL -> DAVT m a -> m (Either String a)
withDAVContext :: MonadIO m => DAVURL -> (DAVContext -> m a) -> m a
runDAVContext :: MonadIO m => DAVContext -> DAVT m a -> m (Either String a, DAVContext)
setCreds :: MonadIO m => ByteString -> ByteString -> DAVT m ()
setDepth :: MonadIO m => Maybe Depth -> DAVT m ()
setResponseTimeout :: MonadIO m => Maybe Int -> DAVT m ()
setUserAgent :: MonadIO m => ByteString -> DAVT m ()
data DAVContext
DAVContext :: [ByteString] -> Request -> ByteString -> ByteString -> [ByteString] -> Maybe Depth -> Maybe Manager -> Maybe ByteString -> ByteString -> DAVContext
[_allowedMethods] :: DAVContext -> [ByteString]
[_baseRequest] :: DAVContext -> Request
[_basicusername] :: DAVContext -> ByteString
[_basicpassword] :: DAVContext -> ByteString
[_complianceClasses] :: DAVContext -> [ByteString]
[_depth] :: DAVContext -> Maybe Depth
[_httpManager] :: DAVContext -> Maybe Manager
[_lockToken] :: DAVContext -> Maybe ByteString
[_userAgent] :: DAVContext -> ByteString
caldavReportM :: MonadIO m => DAVT m Document
delContentM :: MonadIO m => DAVT m ()
getPropsM :: MonadIO m => DAVT m Document

-- | Note that the entire request body is buffered in memory. To stream
--   large files use withContentM instead.
getContentM :: MonadIO m => DAVT m (Maybe ByteString, ByteString)
withContentM :: MonadIO m => (Response BodyReader -> IO a) -> DAVT m a
mkCol :: (MonadIO m, MonadBase IO m, MonadCatch m) => DAVT m Bool
moveContentM :: MonadIO m => ByteString -> DAVT m ()
putPropsM :: MonadIO m => Document -> DAVT m ()

-- | Note that the entire request body is buffered in memory; not suitable
--   for large files.
putContentM :: MonadIO m => (Maybe ByteString, ByteString) -> DAVT m ()

-- | To send a large file, pass eg a RequestBodyStream containing the
--   file's content.
putContentM' :: MonadIO m => (Maybe ByteString, RequestBody) -> DAVT m ()
withLockIfPossible :: (MonadIO m, MonadBase IO m) => Bool -> DAVT m a -> DAVT m a
withLockIfPossibleForDelete :: (MonadIO m, MonadBase IO m) => Bool -> DAVT m a -> DAVT m a

-- | Normally, DAVT actions act on the url that is provided to eg,
--   evalDAVT. Sometimes, it's useful to adjust the url that is acted on,
--   while remaining in the same DAV session.
--   
--   inLocation temporarily adjusts the url's path, while performing a DAVT
--   action.
--   
--   For example:
--   
--   <pre>
--   import System.FilePath.Posix -- posix for url path manipulation
--   
--   mkColRecursive d = do
--     let parent = takeDirectory d
--     when (parent /= d) $
--       mkColRecursive parent
--     inDAVLocation (&lt;/&gt; d) mkCol
--   </pre>
--   
--   Note that operations that modify the DAVContext (such as setCreds and
--   setCreds) can be run inside davLocation, but will not have any effect
--   on the calling DAVContext.
inDAVLocation :: MonadIO m => (String -> String) -> DAVT m a -> DAVT m a

-- | Gets the path of the url that DAVT actions will act on.
getDAVLocation :: Monad m => DAVT m String
mkDAVContext :: MonadIO m => DAVURL -> m DAVContext

-- | <i>Deprecated: deprecated because http-client deprecated
--   closeManager</i>
closeDAVContext :: MonadIO m => DAVContext -> m ()
data Depth
Depth0 :: Depth
Depth1 :: Depth
DepthInfinity :: Depth
data DAVContext
DAVContext :: [ByteString] -> Request -> ByteString -> ByteString -> [ByteString] -> Maybe Depth -> Maybe Manager -> Maybe ByteString -> ByteString -> DAVContext
[_allowedMethods] :: DAVContext -> [ByteString]
[_baseRequest] :: DAVContext -> Request
[_basicusername] :: DAVContext -> ByteString
[_basicpassword] :: DAVContext -> ByteString
[_complianceClasses] :: DAVContext -> [ByteString]
[_depth] :: DAVContext -> Maybe Depth
[_httpManager] :: DAVContext -> Maybe Manager
[_lockToken] :: DAVContext -> Maybe ByteString
[_userAgent] :: DAVContext -> ByteString
userAgent :: Lens' DAVContext ByteString
lockToken :: Lens' DAVContext (Maybe ByteString)
httpManager :: Lens' DAVContext (Maybe Manager)
depth :: Lens' DAVContext (Maybe Depth)
complianceClasses :: Lens' DAVContext [ByteString]
basicusername :: Lens' DAVContext ByteString
basicpassword :: Lens' DAVContext ByteString
baseRequest :: Lens' DAVContext Request
allowedMethods :: Lens' DAVContext [ByteString]
instance GHC.Base.Monad m => Control.Monad.State.Class.MonadState Network.Protocol.HTTP.DAV.TH.DAVContext (Network.Protocol.HTTP.DAV.DAVT m)
instance GHC.Base.Monad m => GHC.Base.MonadPlus (Network.Protocol.HTTP.DAV.DAVT m)
instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Network.Protocol.HTTP.DAV.DAVT m)
instance Control.Monad.Fix.MonadFix m => Control.Monad.Fix.MonadFix (Network.Protocol.HTTP.DAV.DAVT m)
instance GHC.Base.Monad m => Control.Monad.Error.Class.MonadError GHC.Base.String (Network.Protocol.HTTP.DAV.DAVT m)
instance Control.Monad.Base.MonadBase b m => Control.Monad.Base.MonadBase b (Network.Protocol.HTTP.DAV.DAVT m)
instance GHC.Base.Monad m => GHC.Base.Monad (Network.Protocol.HTTP.DAV.DAVT m)
instance GHC.Base.Functor m => GHC.Base.Functor (Network.Protocol.HTTP.DAV.DAVT m)
instance GHC.Base.Monad m => GHC.Base.Applicative (Network.Protocol.HTTP.DAV.DAVT m)
instance GHC.Base.Monad m => GHC.Base.Alternative (Network.Protocol.HTTP.DAV.DAVT m)
instance Data.Default.Class.Default Network.Protocol.HTTP.DAV.TH.DAVContext
instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (Network.Protocol.HTTP.DAV.DAVT m)
instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (Network.Protocol.HTTP.DAV.DAVT m)
instance Control.Monad.Trans.Class.MonadTrans Network.Protocol.HTTP.DAV.DAVT
