network-protocol-xmpp-0.4.8: Client library for the XMPP protocol.

Safe HaskellNone
LanguageHaskell98

Network.Protocol.XMPP

Contents

Synopsis

JIDs

data JID #

Constructors

JID 
Instances
Eq JID # 
Instance details

Defined in Network.Protocol.XMPP.JID

Methods

(==) :: JID -> JID -> Bool #

(/=) :: JID -> JID -> Bool #

Show JID # 
Instance details

Defined in Network.Protocol.XMPP.JID

Methods

showsPrec :: Int -> JID -> ShowS #

show :: JID -> String #

showList :: [JID] -> ShowS #

IsString JID # 
Instance details

Defined in Network.Protocol.XMPP.JID

Methods

fromString :: String -> JID #

data Node #

Instances
Eq Node # 
Instance details

Defined in Network.Protocol.XMPP.JID

Methods

(==) :: Node -> Node -> Bool #

(/=) :: Node -> Node -> Bool #

Show Node # 
Instance details

Defined in Network.Protocol.XMPP.JID

Methods

showsPrec :: Int -> Node -> ShowS #

show :: Node -> String #

showList :: [Node] -> ShowS #

data Domain #

Instances
Eq Domain # 
Instance details

Defined in Network.Protocol.XMPP.JID

Methods

(==) :: Domain -> Domain -> Bool #

(/=) :: Domain -> Domain -> Bool #

Show Domain # 
Instance details

Defined in Network.Protocol.XMPP.JID

data Resource #

Instances
Eq Resource # 
Instance details

Defined in Network.Protocol.XMPP.JID

Show Resource # 
Instance details

Defined in Network.Protocol.XMPP.JID

Stanzas

data IQ #

Constructors

IQ 
Instances
Show IQ # 
Instance details

Defined in Network.Protocol.XMPP.Stanza

Methods

showsPrec :: Int -> IQ -> ShowS #

show :: IQ -> String #

showList :: [IQ] -> ShowS #

Stanza IQ # 
Instance details

Defined in Network.Protocol.XMPP.Stanza

data IQType #

Constructors

IQGet 
IQSet 
IQResult 
IQError 
Instances
Eq IQType # 
Instance details

Defined in Network.Protocol.XMPP.Stanza

Methods

(==) :: IQType -> IQType -> Bool #

(/=) :: IQType -> IQType -> Bool #

Show IQType # 
Instance details

Defined in Network.Protocol.XMPP.Stanza

The XMPP monad

data XMPP a #

Instances
Monad XMPP # 
Instance details

Defined in Network.Protocol.XMPP.Monad

Methods

(>>=) :: XMPP a -> (a -> XMPP b) -> XMPP b #

(>>) :: XMPP a -> XMPP b -> XMPP b #

return :: a -> XMPP a #

fail :: String -> XMPP a #

Functor XMPP # 
Instance details

Defined in Network.Protocol.XMPP.Monad

Methods

fmap :: (a -> b) -> XMPP a -> XMPP b #

(<$) :: a -> XMPP b -> XMPP a #

MonadFix XMPP # 
Instance details

Defined in Network.Protocol.XMPP.Monad

Methods

mfix :: (a -> XMPP a) -> XMPP a #

Applicative XMPP # 
Instance details

Defined in Network.Protocol.XMPP.Monad

Methods

pure :: a -> XMPP a #

(<*>) :: XMPP (a -> b) -> XMPP a -> XMPP b #

liftA2 :: (a -> b -> c) -> XMPP a -> XMPP b -> XMPP c #

(*>) :: XMPP a -> XMPP b -> XMPP b #

(<*) :: XMPP a -> XMPP b -> XMPP a #

MonadIO XMPP # 
Instance details

Defined in Network.Protocol.XMPP.Monad

Methods

liftIO :: IO a -> XMPP a #

MonadError XMPP # 
Instance details

Defined in Network.Protocol.XMPP.Monad

Associated Types

type ErrorType XMPP :: * #

Methods

throwError :: ErrorType XMPP -> XMPP a #

catchError :: XMPP a -> (ErrorType XMPP -> XMPP a) -> XMPP a #

type ErrorType XMPP # 
Instance details

Defined in Network.Protocol.XMPP.Monad

data Server #

Constructors

Server 

data Error #

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 Stanza was received from the remote host.

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.

Instances
Show Error # 
Instance details

Defined in Network.Protocol.XMPP.Monad

Methods

showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

runClient #

Arguments

:: Server 
-> JID

Client JID

-> Text

Username

-> Text

Password

-> XMPP a 
-> IO (Either Error a) 

runComponent #

Arguments

:: Server 
-> Text

Server secret

-> XMPP a 
-> IO (Either Error a) 

putStanza :: Stanza a => a -> XMPP () #

bindJID :: JID -> XMPP JID #

Send a <bind> message for the given JID, returning the server's reply. In most cases the reply will be the same as the input. However, if the input has no Resource, the returned JID will contain a generated Resource.

Clients must bind a JID before sending any Stanzas.

Resuming sessions

data Session #