A Jabber client to server stream. More...
#include <yatejabber.h>
Public Member Functions | |
| virtual | ~JBClientStream () |
| XMPPUserRoster * | roster () |
| JIDResource * | getResource () |
| virtual void * | getObject (const String &name) const |
| XMPPUser * | getRemote (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 ¶ms) | |
| 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 |
A Jabber client to server stream.
This class holds a Jabber client stream used to connect an user to its server
| virtual ~JBClientStream | ( | ) | [virtual] |
Destructor
| JBClientStream | ( | JBEngine * | engine, | |
| XMPPServerInfo & | info, | |||
| const JabberID & | jid, | |||
| const NamedList & | params | |||
| ) | [protected] |
Constructor. Build an outgoing stream
| 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
| 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 |
| 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
| xml | The received element | |
| respond | Action to be taken if not accepted. Always false on exit |
Reimplemented from JBStream.
| virtual void* getObject | ( | const String & | name | ) | const [virtual] |
Get an object from this stream
| name | The name of the object to get |
Reimplemented from JBStream.
Get a remote user from roster
| jid | The user's bare jid |
| JIDResource* getResource | ( | ) | [inline] |
Get the client's resource
| virtual void processRunning | ( | XMLElement * | xml | ) | [protected, virtual] |
Process a received stanza in Running state
| xml | Valid XMLElement pointer |
Reimplemented from JBStream.
| XMPPUserRoster* roster | ( | ) | [inline] |
Get the roster of this stream's client
| virtual Error sendStanza | ( | XMLElement * | stanza, | |
| const char * | senderId = 0 | |||
| ) | [virtual] |
Send a stanza. This method is thread safe
| stanza | Element to send | |
| senderId | Optional sender's id. Used for notification events |
Reimplemented from JBStream.
| virtual void streamRunning | ( | ) | [protected, virtual] |
Notification from parent when steam is authenticated: get roster from server
Reimplemented from JBStream.
1.6.3