-- 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.0.2

module Network.Protocol.HTTP.DAV
newtype DAVT m a
DAVT :: EitherT String (StateT DAVContext m) a -> DAVT m a
runDAVT :: DAVT m a -> EitherT String (StateT DAVContext m) a
evalDAVT :: MonadIO m => DAVURL -> DAVT m a -> m (Either String a)
withDAVContext :: (MonadIO m, MonadMask 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, MonadCatch m, MonadMask m) => Bool -> DAVT m a -> DAVT m a
withLockIfPossibleForDelete :: (MonadIO m, MonadBase IO m, MonadCatch m, MonadMask 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
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 Monad m => Applicative (DAVT m)
instance Monad m => Functor (DAVT m)
instance Monad m => Monad (DAVT m)
instance MonadBase b m => MonadBase b (DAVT m)
instance Monad m => MonadError String (DAVT m)
instance MonadFix m => MonadFix (DAVT m)
instance MonadIO m => MonadIO (DAVT m)
instance Monad m => MonadPlus (DAVT m)
instance Monad m => MonadState DAVContext (DAVT m)
instance MonadTrans DAVT
instance MonadThrow m => MonadThrow (DAVT m)
instance MonadMask m => MonadMask (DAVT m)
instance MonadCatch m => MonadCatch (DAVT m)
instance MonadMask m => MonadMask (EitherT e m)
instance Default DAVContext
