| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Network.Protocol.XMPP
- 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
Constructors
| Message | |
Fields
| |
Constructors
| Presence | |
Fields
| |
Constructors
| IQ | |
data MessageType #
Instances
data PresenceType #
Constructors
| PresenceAvailable | |
| PresenceUnavailable | |
| PresenceSubscribe | |
| PresenceSubscribed | |
| PresenceUnsubscribe | |
| PresenceUnsubscribed | |
| PresenceProbe | |
| PresenceError |
Instances
emptyMessage :: MessageType -> Message #
emptyPresence :: PresenceType -> Presence #
The 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 #