haskell-xmpp-1.0: Haskell XMPP (eXtensible Message Passing Protocol, a.k.a. Jabber) library

Portabilityportable
Stabilityexperimental
MaintainerDmitry Astapov <dastapov@gmail.com>, pierre <k.pierre.k@gmail.com>

Network.XMPP.Types

Description

 

Synopsis

Documentation

type XmppMessage = Content PosnSource

XMPP message in the parsed form

type XmppStateT a = StateT Stream IO aSource

XmppStateT is a state transformer over IO monad, using Stream as a state holder. For API, look into Network.XMPP.Stream

data Stream Source

XMPP stream, used as a state in XmppStateT state transformer

Constructors

Stream 

Fields

handle :: Handle

IO handle to the underlying file or socket

idx :: !Int

id of the next message (if needed)

lexemes :: [Token]

Stream of the lexemes coming from server

data StreamType Source

XMPP Stream type, used in stream pretty-printing combinator and the likes

Constructors

Client

Client-to-server

ComponentAccept

FIXME

ComponentConnect

FIXME

Instances

data Stanza Source

Generic XMPP stream atom

Constructors

Message 

Fields

mFrom :: Maybe JID
 
mTo :: JID
 
mId :: String

Message from, to, id attributes

mType :: MessageType

Message type (2.1.1)

mSubject :: String

Subject element (2.1.2.1)

mBody :: String

Body element (2.1.2.2)

mThread :: String

Thread element (2.1.2.3)

mExt :: [Content Posn]

Additional contents, used for extensions

Presence 

Fields

pFrom :: Maybe JID
 
pTo :: Maybe JID
 
pId :: String

Presence from, to, id attributes

pType :: PresenceType

Presence type (2.2.1)

pShowType :: ShowType

Show element (2.2.2.1)

pStatus :: String

Status element (2.2.2.2)

pPriority :: Maybe Integer

Presence priority (2.2.2.3)

pExt :: [Content Posn]

Additional contents, used for extensions

IQ 

Fields

iqFrom :: Maybe JID
 
iqTo :: Maybe JID
 
iqId :: String

IQ id (Core-9.2.3)

iqType :: IQType

IQ type (Core-9.2.3)

iqBody :: [Content Posn]

Child element (Core-9.2.3)

Instances

data IQType Source

Constructors

Get 
Result 
Set 
IQError 

defaultStreamBlockSize :: IntSource

Since XMPP is network-oriented, block size is equal to maximal MTU

isMessage :: Stanza -> BoolSource

Utility functions