Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data JID = JID {}
- data Node
- data Domain
- data Resource
- strNode :: Node -> Text
- strDomain :: Domain -> Text
- strResource :: Resource -> Text
- parseJID :: Text -> Maybe JID
- formatJID :: JID -> Text
- class Stanza a where
- data ReceivedStanza
- data Message = Message {
- messageType :: MessageType
- messageTo :: Maybe JID
- messageFrom :: Maybe JID
- messageID :: Maybe Text
- messageLang :: Maybe Text
- messagePayloads :: [Element]
- data Presence = Presence {
- presenceType :: PresenceType
- presenceTo :: Maybe JID
- presenceFrom :: Maybe JID
- presenceID :: Maybe Text
- presenceLang :: Maybe Text
- presencePayloads :: [Element]
- data IQ = IQ {}
- data MessageType
- data PresenceType
- data IQType
- emptyMessage :: MessageType -> Message
- emptyPresence :: PresenceType -> Presence
- emptyIQ :: IQType -> IQ
- data XMPP a
- data Server = Server {
- serverJID :: JID
- serverHostname :: HostName
- serverPort :: PortID
- data Error
- = AuthenticationFailure Element
- | AuthenticationError Text
- | InvalidStanza Element
- | InvalidBindResult ReceivedStanza
- | TransportError Text
- | NoComponentStreamID
- runClient :: Server -> JID -> Text -> Text -> XMPP a -> IO (Either Error a)
- runComponent :: Server -> Text -> XMPP a -> IO (Either Error a)
- putStanza :: Stanza a => a -> XMPP ()
- getStanza :: XMPP ReceivedStanza
- bindJID :: JID -> XMPP JID
- data Session
- getSession :: XMPP Session
- sessionIsSecure :: XMPP Bool
- runXMPP :: Session -> XMPP a -> IO (Either Error a)
JIDs
strResource :: Resource -> Text Source #
Stanzas
stanzaTo :: a -> Maybe JID Source #
stanzaFrom :: a -> Maybe JID Source #
stanzaID :: a -> Maybe Text Source #
stanzaLang :: a -> Maybe Text Source #
stanzaPayloads :: a -> [Element] Source #
data ReceivedStanza Source #
Instances
Show ReceivedStanza Source # | |
Defined in Network.Protocol.XMPP.Stanza showsPrec :: Int -> ReceivedStanza -> ShowS show :: ReceivedStanza -> String showList :: [ReceivedStanza] -> ShowS |
Message | |
|
Presence | |
|
data MessageType Source #
Instances
Eq MessageType Source # | |
Defined in Network.Protocol.XMPP.Stanza (==) :: MessageType -> MessageType -> Bool (/=) :: MessageType -> MessageType -> Bool | |
Show MessageType Source # | |
Defined in Network.Protocol.XMPP.Stanza showsPrec :: Int -> MessageType -> ShowS show :: MessageType -> String showList :: [MessageType] -> ShowS |
data PresenceType Source #
PresenceAvailable | |
PresenceUnavailable | |
PresenceSubscribe | |
PresenceSubscribed | |
PresenceUnsubscribe | |
PresenceUnsubscribed | |
PresenceProbe | |
PresenceError |
Instances
Eq PresenceType Source # | |
Defined in Network.Protocol.XMPP.Stanza (==) :: PresenceType -> PresenceType -> Bool (/=) :: PresenceType -> PresenceType -> Bool | |
Show PresenceType Source # | |
Defined in Network.Protocol.XMPP.Stanza showsPrec :: Int -> PresenceType -> ShowS show :: PresenceType -> String showList :: [PresenceType] -> ShowS |
emptyMessage :: MessageType -> Message Source #
emptyPresence :: PresenceType -> Presence Source #
The XMPP monad
Instances
Monad XMPP Source # | |
Functor XMPP Source # | |
MonadFix XMPP Source # | |
Defined in Network.Protocol.XMPP.Monad | |
Applicative XMPP Source # | |
MonadIO XMPP Source # | |
Defined in Network.Protocol.XMPP.Monad | |
MonadError XMPP Source # | |
Defined in Network.Protocol.XMPP.Monad type ErrorType XMPP :: * throwError :: ErrorType XMPP -> XMPP a catchError :: XMPP a -> (ErrorType XMPP -> XMPP a) -> XMPP a | |
type ErrorType XMPP Source # | |
Defined in Network.Protocol.XMPP.Monad |
Server | |
|
AuthenticationFailure Element | The remote host refused the specified authentication credentials. The included XML element is the error value that the server provided. It may contain additional information about why authentication failed. |
AuthenticationError Text | There was an error while authenticating with the remote host. |
InvalidStanza Element | An unrecognized or malformed |
InvalidBindResult ReceivedStanza | The remote host sent an invalid reply to a resource bind request. |
TransportError Text | There was an error with the underlying transport. |
NoComponentStreamID | The remote host did not send a stream ID when accepting a component connection. |
Resuming sessions
getSession :: XMPP Session Source #
sessionIsSecure :: XMPP Bool Source #