class JBClientStream

A Jabber client to server stream. More...

Full nameTelEngine::JBClientStream
Definition#include <libs/yjingle/yatejabber.h>
InheritsTelEngine::JBStream [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods


Detailed Description

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

 ~JBClientStream ()

~JBClientStream

[virtual]

Destructor

inline XMPPUserRoster*  roster ()

roster

Get the roster of this stream's client

Returns: Valid XMPPUserRoster

inline JIDResource*  getResource ()

getResource

Get the client's resource

Returns: The client's resource

void*  getObject (const String& name)

getObject

[const virtual]

Get an object from this stream

Parameters:
nameThe name of the object to get

Returns: Pointer to the object or 0 if not found

Reimplemented from JBStream.

XMPPUser*  getRemote (const JabberID& jid)

getRemote

Get a remote user from roster

Parameters:
jidThe user's bare jid

Returns: Referenced XMPPUser object or 0 if not found

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

sendStanza

[virtual]

Send a stanza. This method is thread safe

Parameters:
stanzaElement to send
senderIdOptional sender's id. Used for notification events

Returns: The result of posting the stanza

Reimplemented from JBStream.

 JBClientStream (JBEngine* engine, XMPPServerInfo& info, const JabberID& jid, const NamedList& params)

JBClientStream

[protected]

Constructor. Build an outgoing stream

Parameters:
engineThe engine that owns this stream
infoStructure containing data used to connect to remote server
jidClient's full Jabber ID
paramsOther 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)

JBClientStream

[protected]

Constructor

Parameters:
engineThe engine that owns this stream
jidUser's JID
passwordPassword used for authentication
addressThe remote address to connect to
autoRestartTrue to auto restart the stream
maxRestartThe maximum restart attempts allowed
incRestartIntervalThe interval to increase the restart counter
allowPlainAuthAllow plain text password authentication
outgoingStream direction

void  streamRunning ()

streamRunning

[protected virtual]

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

Reimplemented from JBStream.

void  processRunning (XMLElement* xml)

processRunning

[protected virtual]

Process a received stanza in Running state

Parameters:
xmlValid XMLElement pointer

Reimplemented from JBStream.

bool  checkDestination (XMLElement* xml, bool& respond)

checkDestination

[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:
xmlThe received element
respondAction to be taken if not accepted. Always false on exit

Returns: False to reject it

Reimplemented from JBStream.


Generated by: paulc on bussard on Wed Oct 21 01:57:30 2009, using kdoc 2.0a54.