Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
The URIHandler
is an interface that is implemented by Source and Sink
Element
to unify handling of URI.
An application can use the following functions to quickly get an element
that handles the given URI for reading or writing
(elementMakeFromUri
).
Source and Sink plugins should implement this interface when possible.
- newtype URIHandler = URIHandler (ManagedPtr URIHandler)
- noURIHandler :: Maybe URIHandler
- class ManagedPtrNewtype a => IsURIHandler a
- data URIHandlerGetProtocolsMethodInfo
- uRIHandlerGetProtocols :: (HasCallStack, MonadIO m, IsURIHandler a) => a -> m (Maybe [Text])
- data URIHandlerGetUriMethodInfo
- uRIHandlerGetUri :: (HasCallStack, MonadIO m, IsURIHandler a) => a -> m (Maybe Text)
- data URIHandlerGetUriTypeMethodInfo
- uRIHandlerGetUriType :: (HasCallStack, MonadIO m, IsURIHandler a) => a -> m URIType
- data URIHandlerSetUriMethodInfo
- uRIHandlerSetUri :: (HasCallStack, MonadIO m, IsURIHandler a) => a -> Text -> m ()
Exported types
newtype URIHandler Source #
WrappedPtr URIHandler Source # | |
IsURIHandler URIHandler Source # | |
((~) * info (ResolveURIHandlerMethod t URIHandler), MethodInfo * info URIHandler p) => IsLabel t (URIHandler -> p) Source # | |
((~) * info (ResolveURIHandlerMethod t URIHandler), MethodInfo * info URIHandler p) => IsLabelProxy t (URIHandler -> p) Source # | |
HasAttributeList * URIHandler Source # | |
type AttributeList URIHandler Source # | |
type SignalList URIHandler Source # | |
class ManagedPtrNewtype a => IsURIHandler a Source #
Methods
getProtocols
data URIHandlerGetProtocolsMethodInfo Source #
((~) * signature (m (Maybe [Text])), MonadIO m, IsURIHandler a) => MethodInfo * URIHandlerGetProtocolsMethodInfo a signature Source # | |
uRIHandlerGetProtocols Source #
:: (HasCallStack, MonadIO m, IsURIHandler a) | |
=> a |
|
-> m (Maybe [Text]) | Returns: the
supported protocols. Returns |
Gets the list of protocols supported by handler
. This list may not be
modified.
getUri
data URIHandlerGetUriMethodInfo Source #
((~) * signature (m (Maybe Text)), MonadIO m, IsURIHandler a) => MethodInfo * URIHandlerGetUriMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsURIHandler a) | |
=> a |
|
-> m (Maybe Text) | Returns: the URI currently handled by
the |
Gets the currently handled URI.
getUriType
data URIHandlerGetUriTypeMethodInfo Source #
((~) * signature (m URIType), MonadIO m, IsURIHandler a) => MethodInfo * URIHandlerGetUriTypeMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsURIHandler a) | |
=> a |
|
-> m URIType | Returns: the |
Gets the type of the given URI handler
setUri
data URIHandlerSetUriMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m, IsURIHandler a) => MethodInfo * URIHandlerSetUriMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsURIHandler a) | |
=> a |
|
-> Text |
|
-> m () | (Can throw |
Tries to set the URI of the given handler.