gloox  1.0.9
Public Member Functions | List of all members
Client Class Reference

#include <linklocalclient.h>

Inheritance diagram for Client:
Inheritance graph
[legend]

Public Member Functions

 Client (const JID &jid)
virtual ~Client ()
bool connect ()
bool connect (const std::string &service, const std::string &type, const std::string &domain, int interface=0)
virtual ConnectionError recv (int timeout=-1)
virtual void handleConnect (const ConnectionBase *connection)
- Public Member Functions inherited from Client
 Client (const std::string &server)
 Client (const JID &jid, const std::string &password, int port=-1)
bool bindResource (const std::string &resource)
bool selectResource (const std::string &resource)
bool hasResourceBind () const
bool unbindResource (const std::string &resource)
const std::string & resource () const
void setStreamManagement (bool enable=true, bool resume=true)
void ackStreamManagement ()
void reqStreamManagement ()
int priority () const
void setUsername (const std::string &username)
void setResource (const std::string &resource)
void setPresence (const JID &to, Presence::PresenceType pres, int priority, const std::string &status=EmptyString)
void setPresence (Presence::PresenceType pres, int priority, const std::string &status=EmptyString)
void setPresence ()
Presencepresence ()
GLOOX_DEPRECATED void setForceNonSasl (bool force=true)
void disableRoster ()
RosterManagerrosterManager ()
void disconnect ()
bool login ()
- Public Member Functions inherited from ClientBase
 ClientBase (const std::string &ns, const std::string &server, int port=-1)
 ClientBase (const std::string &ns, const std::string &password, const std::string &server, int port=-1)
virtual ~ClientBase ()
bool connect (bool block=true)
virtual const std::string & username () const
const JIDjid ()
void setSasl (bool sasl)
void setTls (TLSPolicy tls)
void setCompression (bool compression)
void setPort (int port)
void setServer (const std::string &server)
void setPassword (const std::string &password)
const std::string & server () const
bool sasl () const
TLSPolicy tls () const
bool compression () const
int port () const
virtual const std::string & password () const
virtual Discodisco () const
const std::string getID ()
void send (Tag *tag)
void send (IQ &iq, IqHandler *ih, int context, bool del=false)
void send (const IQ &iq)
void send (const Message &msg)
void send (const Subscription &sub)
void send (const Presence &pres)
bool authed () const
ConnectionState state () const
const std::string & xmlLang () const
void setXmlLang (const std::string &xmllang)
ConnectionBaseconnectionImpl () const
void setConnectionImpl (ConnectionBase *cb)
TLSBaseencryptionImpl () const
void setEncryptionImpl (TLSBase *tb)
CompressionBasecompressionImpl () const
void setCompressionImpl (CompressionBase *cb)
void whitespacePing ()
void xmppPing (const JID &to, EventHandler *eh)
void setAuthzid (const JID &authzid)
void setAuthcid (const std::string &authcid)
void setSASLMechanisms (int mechanisms)
void registerStanzaExtension (StanzaExtension *ext)
bool removeStanzaExtension (int ext)
void registerConnectionListener (ConnectionListener *cl)
void registerIqHandler (IqHandler *ih, int exttype)
void removeIDHandler (IqHandler *ih)
void registerMessageHandler (MessageHandler *mh)
void removeMessageHandler (MessageHandler *mh)
void registerMessageSession (MessageSession *session)
void disposeMessageSession (MessageSession *session)
void registerPresenceHandler (PresenceHandler *ph)
void registerPresenceHandler (const JID &jid, PresenceHandler *ph)
void registerSubscriptionHandler (SubscriptionHandler *sh)
void registerTagHandler (TagHandler *th, const std::string &tag, const std::string &xmlns)
void registerStatisticsHandler (StatisticsHandler *sh)
void removeConnectionListener (ConnectionListener *cl)
void removeIqHandler (IqHandler *ih, int exttype)
void removePresenceHandler (PresenceHandler *ph)
void removePresenceHandler (const JID &jid, PresenceHandler *ph)
void removeSubscriptionHandler (SubscriptionHandler *sh)
void removeTagHandler (TagHandler *th, const std::string &tag, const std::string &xmlns)
void removeStatisticsHandler ()
void setCACerts (const StringList &cacerts)
void setClientCert (const std::string &clientKey, const std::string &clientCerts)
void registerMessageSessionHandler (MessageSessionHandler *msh, int types=0)
LogSinklogInstance ()
StreamError streamError () const
const std::string & streamErrorText (const std::string &lang="default") const
const std::string & streamErrorCData () const
const TagstreamErrorAppCondition () const
AuthenticationError authError () const
StatisticsStruct getStatistics ()
void registerMUCInvitationHandler (MUCInvitationHandler *mih)
void removeMUCInvitationHandler ()
void addPresenceExtension (StanzaExtension *se)
bool removePresenceExtension (int type)
const StanzaExtensionListpresenceExtensions () const
const TagList sendQueue ()
virtual void handleTag (Tag *tag)
virtual void handleCompressedData (const std::string &data)
virtual void handleDecompressedData (const std::string &data)
virtual void handleReceivedData (const ConnectionBase *connection, const std::string &data)
virtual void handleDisconnect (const ConnectionBase *connection, ConnectionError reason)
virtual void handleEncryptedData (const TLSBase *base, const std::string &data)
virtual void handleDecryptedData (const TLSBase *base, const std::string &data)
virtual void handleHandshakeResult (const TLSBase *base, bool success, CertInfo &certinfo)
- Public Member Functions inherited from TagHandler
virtual ~TagHandler ()
- Public Member Functions inherited from ConnectionDataHandler
virtual ~ConnectionDataHandler ()
- Public Member Functions inherited from CompressionDataHandler
virtual ~CompressionDataHandler ()
- Public Member Functions inherited from TLSHandler
virtual ~TLSHandler ()
- Public Member Functions inherited from IqHandler
virtual ~IqHandler ()
virtual bool handleIq (const IQ &iq)=0
virtual void handleIqID (const IQ &iq, int context)=0

Additional Inherited Members

- Protected Types inherited from ClientBase
enum  SMContext {
  CtxSMInvalid, CtxSMFailed, CtxSMEnable, CtxSMResume,
  CtxSMEnabled, CtxSMResumed
}
- Protected Member Functions inherited from Client
void nonSaslLogin ()
- Protected Attributes inherited from ClientBase
JID m_jid
JID m_authzid
std::string m_authcid
ConnectionBasem_connection
TLSBasem_encryption
CompressionBasem_compression
Discom_disco
StanzaExtensionList m_presenceExtensions
GLOOX_DEPRECATED std::string m_selectedResource
std::string m_clientCerts
std::string m_clientKey
std::string m_namespace
std::string m_password
std::string m_xmllang
std::string m_server
std::string m_sid
bool m_compressionActive
bool m_encryptionActive
bool m_compress
bool m_authed
bool m_block
bool m_sasl
TLSPolicy m_tls
int m_port
int m_availableSaslMechs
SMContext m_smContext
int m_smHandled

Detailed Description

An implementation of a link-local client.

See gloox::LinkLocal::Manager for more information on how to implement link-local messaging.

Author
Jakob Schroeter js@ca.nosp@m.maya.nosp@m..net
Since
1.0.x

Definition at line 45 of file linklocalclient.h.

Constructor & Destructor Documentation

Client ( const JID jid)

Constructs a new instance.

Parameters
jidThe local JID to use.

Definition at line 40 of file linklocalclient.cpp.

~Client ( )
virtual

Virtual destructor.

Reimplemented from Client.

Definition at line 46 of file linklocalclient.cpp.

Member Function Documentation

bool connect ( )

Internally sets up an already connected connection.

Note
Use this function only on a Client instance that you created for an incoming connection.

Definition at line 50 of file linklocalclient.cpp.

bool connect ( const std::string &  service,
const std::string &  type,
const std::string &  domain,
int  interface = 0 
)

Starts resolving the given service. Use values from Handler::handleBrowseReply().

Parameters
serviceThe service to connect to.
typeThe service type.
domainThe service's domain.
interfaceThe network interface the service was found on. May be 0 to try to resolve the service on all available interfaces.
Returns
True if resolving the service could be started successfully, false otherwise.
Note
Use this function only for outgoing connections.

Definition at line 55 of file linklocalclient.cpp.

void handleConnect ( const ConnectionBase connection)
virtual

This function is called when e.g. the raw TCP connection was established.

Parameters
connectionThe connection.

Reimplemented from ClientBase.

Definition at line 181 of file linklocalclient.cpp.

ConnectionError recv ( int  timeout = -1)
virtual

Call this periodically to receive data from the underlying socket.

Parameters
timeoutAn optional timeout in microseconds. Default of -1 means blocking until data was available.
Returns
The state of the underlying connection.

Reimplemented from ClientBase.

Definition at line 62 of file linklocalclient.cpp.


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