JBClientStream Class Reference

A Jabber client to server stream. More...

#include <yatejabber.h>

Inheritance diagram for JBClientStream:

JBStream RefObject GenObject

List of all members.

Public Member Functions

virtual ~JBClientStream ()
XMPPUserRosterroster ()
JIDResourcegetResource ()
XMPPUsergetRemote (const JabberID &jid)
virtual Error sendStanza (XMLElement *stanza, const char *senderId=0)

Protected Member Functions

 JBClientStream (JBEngine *engine, XMPPServerInfo &info, const JabberID &jid, const NamedList &params)
 JBClientStream (JBEngine *engine, const JabberID &jid, const String &password, const SocketAddr &address, bool autoRestart, unsigned int maxRestart, u_int64_t incRestartInterval, bool allowPlainAuth=false, bool outgoing=true)
virtual void streamRunning ()
virtual void processRunning (XMLElement *xml)
virtual bool checkDestination (XMLElement *xml, bool &respond)

Friends

class JBEngine


Detailed Description

A Jabber client to server stream.

This class holds a Jabber client stream used to connect an user to its server


Constructor & Destructor Documentation

virtual ~JBClientStream (  )  [virtual]

Destructor

JBClientStream ( JBEngine engine,
XMPPServerInfo info,
const JabberID jid,
const NamedList params 
) [protected]

Constructor. Build an outgoing stream

Parameters:
engine The engine that owns this stream
info Structure containing data used to connect to remote server
jid Client's full Jabber ID
params Other stream parameters

JBClientStream ( JBEngine engine,
const JabberID jid,
const String password,
const SocketAddr address,
bool  autoRestart,
unsigned int  maxRestart,
u_int64_t  incRestartInterval,
bool  allowPlainAuth = false,
bool  outgoing = true 
) [protected]

Constructor

Parameters:
engine The engine that owns this stream
jid User's JID
password Password used for authentication
address The remote address to connect to
autoRestart True to auto restart the stream
maxRestart The maximum restart attempts allowed
incRestartInterval The interval to increase the restart counter
allowPlainAuth Allow plain text password authentication
outgoing Stream direction


Member Function Documentation

XMPPUserRoster* roster (  )  [inline]

Get the roster of this stream's client

Returns:
Valid XMPPUserRoster

JIDResource* getResource (  )  [inline]

Get the client's resource

Returns:
The client's resource

XMPPUser* getRemote ( const JabberID jid  ) 

Get a remote user from roster

Parameters:
jid The user's bare jid
Returns:
Referenced XMPPUser object or 0 if not found

virtual Error sendStanza ( XMLElement stanza,
const char *  senderId = 0 
) [virtual]

Send a stanza. This method is thread safe

Parameters:
stanza Element to send
senderId Optional sender's id. Used for notification events
Returns:
The result of posting the stanza

Reimplemented from JBStream.

virtual void streamRunning (  )  [protected, virtual]

Notification from parent when steam is authenticated: get roster from server

Reimplemented from JBStream.

virtual void processRunning ( XMLElement xml  )  [protected, virtual]

Process a received stanza in Running state

Parameters:
xml Valid XMLElement pointer

Reimplemented from JBStream.

virtual bool checkDestination ( XMLElement xml,
bool &  respond 
) [protected, virtual]

Check the 'to' attribute of a received element against the local jid. Accept empty or bare/full jid match. Set the 'to' attribute to local jid if empty

Parameters:
xml The received element
respond Action to be taken if not accepted. Always false on exit
Returns:
False to reject it

Reimplemented from JBStream.


The documentation for this class was generated from the following file:

Generated on Mon Aug 11 16:18:53 2008 for Yate by  doxygen 1.5.6