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;
428 return new ResourceBind( tag );
432 virtual Tag* tag()
const;
437 return new ResourceBind( *
this );
441 std::string m_resource;
464 ~SessionCreation() {}
467 virtual const std::string& filterString()
const {
return EmptyString; }
471 { (void)tag;
return 0; }
474 virtual Tag* tag()
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
519 std::string m_smLocation;
524 int m_streamFeatures;
GLOOX_DEPRECATED void setForceNonSasl(bool force=true)
bool hasResourceBind() const
An abstraction of an IQ stanza.
This class implements a basic Jabber/XMPP Client.
This class implements an XML parser.
const std::string & resource() const
This class is an implementation of XEP-0078 (Non-SASL Authentication).
RosterManager * rosterManager()
const std::string XMLNS_CLIENT_STATE_INDICATION
void setResource(const std::string &resource)
bool bindResource(const std::string &resource)
An abstraction of a presence stanza.
bool hasClientStateIndication() const
The namespace for the gloox library.
This class abstracts a stanza extension, which is usually an XML child element in a specific namespac...
This class implements Jabber/XMPP roster handling in the jabber:iq:roster namespace.
bool unbindResource(const std::string &resource)
const std::string EmptyString
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
This is an abstraction of an XML element.