| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Network.Protocol.XMPP
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 {}
- data IQ = IQ {}
- data MessageType
- data PresenceType
- data IQType
- emptyMessage :: MessageType -> Message
- emptyPresence :: PresenceType -> Presence
- emptyIQ :: IQType -> IQ
- data XMPP a
- data Server = Server {}
- data Error
- 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 #
Stanzas
Minimal complete definition
stanzaTo, stanzaFrom, stanzaID, stanzaLang, stanzaPayloads, stanzaToElement
Methods
stanzaFrom :: a -> Maybe JID #
stanzaLang :: a -> Maybe Text #
stanzaPayloads :: a -> [Element] #
data ReceivedStanza #
Constructors
| ReceivedMessage Message | |
| ReceivedPresence Presence | |
| ReceivedIQ IQ |
Instances
| Show ReceivedStanza # | |
Defined in Network.Protocol.XMPP.Stanza Methods showsPrec :: Int -> ReceivedStanza -> ShowS # show :: ReceivedStanza -> String # showList :: [ReceivedStanza] -> ShowS # | |
Constructors
| Message | |
Fields
| |
Constructors
| Presence | |
Fields
| |
data MessageType #
Instances
| Eq MessageType # | |
Defined in Network.Protocol.XMPP.Stanza | |
| Show MessageType # | |
Defined in Network.Protocol.XMPP.Stanza Methods showsPrec :: Int -> MessageType -> ShowS # show :: MessageType -> String # showList :: [MessageType] -> ShowS # | |
data PresenceType #
Constructors
| PresenceAvailable | |
| PresenceUnavailable | |
| PresenceSubscribe | |
| PresenceSubscribed | |
| PresenceUnsubscribe | |
| PresenceUnsubscribed | |
| PresenceProbe | |
| PresenceError |
Instances
| Eq PresenceType # | |
Defined in Network.Protocol.XMPP.Stanza | |
| Show PresenceType # | |
Defined in Network.Protocol.XMPP.Stanza Methods showsPrec :: Int -> PresenceType -> ShowS # show :: PresenceType -> String # showList :: [PresenceType] -> ShowS # | |
emptyMessage :: MessageType -> Message #
emptyPresence :: PresenceType -> Presence #
The XMPP monad
Instances
| Monad XMPP # | |
| Functor XMPP # | |
| MonadFix XMPP # | |
Defined in Network.Protocol.XMPP.Monad | |
| Applicative XMPP # | |
| MonadIO XMPP # | |
Defined in Network.Protocol.XMPP.Monad | |
| MonadError XMPP # | |
| type ErrorType XMPP # | |
Defined in Network.Protocol.XMPP.Monad | |
Constructors
| Server | |
Fields
| |
Constructors
| 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 #
sessionIsSecure :: XMPP Bool #