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

Safe HaskellNone
LanguageHaskell98

Network.Protocol.XMPP

Contents

Synopsis

JIDs

data JID Source #

Constructors

JID 
Instances
Eq JID Source # 
Instance details

Defined in Network.Protocol.XMPP.JID

Methods

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

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

Show JID Source # 
Instance details

Defined in Network.Protocol.XMPP.JID

IsString JID Source # 
Instance details

Defined in Network.Protocol.XMPP.JID

data Node Source #

Instances
Eq Node Source # 
Instance details

Defined in Network.Protocol.XMPP.JID

Methods

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

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

Show Node Source # 
Instance details

Defined in Network.Protocol.XMPP.JID

data Domain Source #

Instances
Eq Domain Source # 
Instance details

Defined in Network.Protocol.XMPP.JID

Show Domain Source # 
Instance details

Defined in Network.Protocol.XMPP.JID

Stanzas

data IQType Source #

Constructors

IQGet 
IQSet 
IQResult 
IQError 
Instances
Eq IQType Source # 
Instance details

Defined in Network.Protocol.XMPP.Stanza

Show IQType Source # 
Instance details

Defined in Network.Protocol.XMPP.Stanza

The XMPP monad

data XMPP a Source #

Instances
Monad XMPP Source # 
Instance details

Defined in Network.Protocol.XMPP.Monad

Methods

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

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

return :: a -> XMPP a Source #

fail :: String -> XMPP a Source #

Functor XMPP Source # 
Instance details

Defined in Network.Protocol.XMPP.Monad

Methods

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

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

MonadFix XMPP Source # 
Instance details

Defined in Network.Protocol.XMPP.Monad

Methods

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

Applicative XMPP Source # 
Instance details

Defined in Network.Protocol.XMPP.Monad

Methods

pure :: a -> XMPP a Source #

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

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

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

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

MonadIO XMPP Source # 
Instance details

Defined in Network.Protocol.XMPP.Monad

Methods

liftIO :: IO a -> XMPP a Source #

MonadError XMPP Source # 
Instance details

Defined in Network.Protocol.XMPP.Monad

Associated Types

type ErrorType XMPP :: Type Source #

type ErrorType XMPP Source # 
Instance details

Defined in Network.Protocol.XMPP.Monad

data Server Source #

Constructors

Server 

Fields

data Error Source #

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 Source # 
Instance details

Defined in Network.Protocol.XMPP.Monad

runClient Source #

Arguments

:: Server 
-> JID

Client JID

-> Text

Username

-> Text

Password

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

runComponent Source #

Arguments

:: Server 
-> Text

Server secret

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

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

bindJID :: JID -> XMPP JID Source #

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