17 #include "clientbase.h"
129 Client(
const std::string& server );
141 Client(
const JID& jid,
const std::string& password,
int port = -1 );
164 {
return bindOperation( resource,
true ); }
175 bool selectResource(
const std::string& resource );
194 {
return bindOperation( resource,
false ); }
200 const std::string&
resource()
const {
return m_jid.resource(); }
213 void setStreamManagement(
bool enable =
true,
bool resume =
true );
224 void ackStreamManagement();
233 void reqStreamManagement();
239 int priority()
const {
return m_presence.priority(); }
245 void setUsername(
const std::string &username );
251 void setResource(
const std::string &resource ) { m_jid.setResource( resource ); }
335 GLOOX_DEPRECATED
void setForceNonSasl(
bool force =
true ) { m_forceNonSasl = force; }
342 void disableRoster();
390 ResourceBind(
const std::string& resource,
bool bind =
true );
396 ResourceBind(
const Tag* tag );
407 const std::string& resource()
const {
return m_resource; }
413 const JID& jid()
const {
return m_jid; }
420 bool unbind()
const {
return !m_bind; }
423 virtual const std::string& filterString()
const;
426 virtual StanzaExtension* newInstance(
const Tag* tag )
const
428 return new ResourceBind( tag );
432 virtual Tag* tag()
const;
435 virtual StanzaExtension* clone()
const
437 return new ResourceBind( *
this );
441 std::string m_resource;
452 class SessionCreation :
public StanzaExtension
464 ~SessionCreation() {}
467 virtual const std::string& filterString()
const {
return EmptyString; }
470 virtual StanzaExtension* newInstance(
const Tag* tag )
const
471 { (void)tag;
return 0; }
474 virtual Tag* tag()
const;
477 virtual StanzaExtension* clone()
const
482 virtual void handleStartNode(
const Tag* ) {}
483 virtual bool handleNormalNode( Tag* tag );
485 virtual void handleIqIDForward(
const IQ& iq,
int context );
487 int getStreamFeatures( Tag* tag );
488 int getSaslMechs( Tag* tag );
489 int getCompressionMethods( Tag* tag );
490 void processResourceBind(
const IQ& iq );
491 void processCreateSession(
const IQ& iq );
492 void sendPresence( Presence& pres );
493 void createSession();
496 virtual void rosterFilled();
497 virtual void cleanup();
498 bool bindOperation(
const std::string& resource,
bool bind );
499 void sendStreamManagement();
505 CtxResourceBind = 1000,
507 CtxSessionEstablishment
510 RosterManager* m_rosterManager;
519 std::string m_smLocation;
524 int m_streamFeatures;
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
This class implements a basic Jabber/XMPP Client.
RosterManager * rosterManager()
GLOOX_DEPRECATED void setForceNonSasl(bool force=true)
bool bindResource(const std::string &resource)
bool unbindResource(const std::string &resource)
const std::string & resource() const
void setResource(const std::string &resource)
bool hasClientStateIndication() const
bool hasResourceBind() const
This class is an implementation of XEP-0078 (Non-SASL Authentication).
This class implements an XML parser.
An abstraction of a presence stanza.
This class implements Jabber/XMPP roster handling in the jabber:iq:roster namespace.
This class abstracts a stanza extension, which is usually an XML child element in a specific namespac...
This is an abstraction of an XML element.
The namespace for the gloox library.
@ StreamFeatureClientStateIndication
const std::string EmptyString
const std::string XMLNS_CLIENT_STATE_INDICATION