-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Client library for the XMPP protocol.
--   
--   Client library for the XMPP protocol.
@package network-protocol-xmpp
@version 0.4.8

module Network.Protocol.XMPP
data JID
JID :: Maybe Node -> Domain -> Maybe Resource -> JID
[jidNode] :: JID -> Maybe Node
[jidDomain] :: JID -> Domain
[jidResource] :: JID -> Maybe Resource
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
stanzaTo :: Stanza a => a -> Maybe JID
stanzaFrom :: Stanza a => a -> Maybe JID
stanzaID :: Stanza a => a -> Maybe Text
stanzaLang :: Stanza a => a -> Maybe Text
stanzaPayloads :: Stanza a => a -> [Element]
data ReceivedStanza
ReceivedMessage :: Message -> ReceivedStanza
ReceivedPresence :: Presence -> ReceivedStanza
ReceivedIQ :: IQ -> ReceivedStanza
data Message
Message :: MessageType -> Maybe JID -> Maybe JID -> Maybe Text -> Maybe Text -> [Element] -> Message
[messageType] :: Message -> MessageType
[messageTo] :: Message -> Maybe JID
[messageFrom] :: Message -> Maybe JID
[messageID] :: Message -> Maybe Text
[messageLang] :: Message -> Maybe Text
[messagePayloads] :: Message -> [Element]
data Presence
Presence :: PresenceType -> Maybe JID -> Maybe JID -> Maybe Text -> Maybe Text -> [Element] -> Presence
[presenceType] :: Presence -> PresenceType
[presenceTo] :: Presence -> Maybe JID
[presenceFrom] :: Presence -> Maybe JID
[presenceID] :: Presence -> Maybe Text
[presenceLang] :: Presence -> Maybe Text
[presencePayloads] :: Presence -> [Element]
data IQ
IQ :: IQType -> Maybe JID -> Maybe JID -> Maybe Text -> Maybe Text -> Maybe Element -> IQ
[iqType] :: IQ -> IQType
[iqTo] :: IQ -> Maybe JID
[iqFrom] :: IQ -> Maybe JID
[iqID] :: IQ -> Maybe Text
[iqLang] :: IQ -> Maybe Text
[iqPayload] :: IQ -> Maybe Element
data MessageType
MessageNormal :: MessageType
MessageChat :: MessageType
MessageGroupChat :: MessageType
MessageHeadline :: MessageType
MessageError :: MessageType
data PresenceType
PresenceAvailable :: PresenceType
PresenceUnavailable :: PresenceType
PresenceSubscribe :: PresenceType
PresenceSubscribed :: PresenceType
PresenceUnsubscribe :: PresenceType
PresenceUnsubscribed :: PresenceType
PresenceProbe :: PresenceType
PresenceError :: PresenceType
data IQType
IQGet :: IQType
IQSet :: IQType
IQResult :: IQType
IQError :: IQType
emptyMessage :: MessageType -> Message
emptyPresence :: PresenceType -> Presence
emptyIQ :: IQType -> IQ
data XMPP a
data Server
Server :: JID -> HostName -> PortID -> Server
[serverJID] :: Server -> JID
[serverHostname] :: Server -> HostName
[serverPort] :: Server -> PortID
data Error

-- | 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.
AuthenticationFailure :: Element -> Error

-- | There was an error while authenticating with the remote host.
AuthenticationError :: Text -> Error

-- | An unrecognized or malformed <a>Stanza</a> was received from the
--   remote host.
InvalidStanza :: Element -> Error

-- | The remote host sent an invalid reply to a resource bind request.
InvalidBindResult :: ReceivedStanza -> Error

-- | There was an error with the underlying transport.
TransportError :: Text -> Error

-- | The remote host did not send a stream ID when accepting a component
--   connection.
NoComponentStreamID :: 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

-- | Send a <tt>&lt;bind&gt;</tt> message for the given <a>JID</a>,
--   returning the server's reply. In most cases the reply will be the same
--   as the input. However, if the input has no <a>Resource</a>, the
--   returned <a>JID</a> will contain a generated <a>Resource</a>.
--   
--   Clients must bind a <a>JID</a> before sending any <a>Stanza</a>s.
bindJID :: JID -> XMPP JID
data Session
getSession :: XMPP Session
sessionIsSecure :: XMPP Bool
runXMPP :: Session -> XMPP a -> IO (Either Error a)
