27 #include "QXmppConfiguration.h"
28 #include "QXmppLogger.h"
29 #include "QXmppPresence.h"
31 #include <QAbstractSocket>
37 class QXmppClientPrivate;
42 class QXmppInternalClientExtension;
99 Q_PROPERTY(
QXmppLogger *logger READ logger WRITE setLogger NOTIFY loggerChanged)
101 Q_PROPERTY(
State state READ state NOTIFY stateChanged)
129 QList<QXmppClientExtension *> extensions();
146 const QList<QXmppClientExtension *> list = extensions();
147 for (
auto ext : list) {
148 T *extension = qobject_cast<T *>(ext);
172 auto list = extensions();
173 for (
int i = 0; i < list.size(); ++i) {
174 if (qobject_cast<T *>(list.at(i)) !=
nullptr)
180 bool isAuthenticated()
const;
181 bool isConnected()
const;
183 bool isActive()
const;
184 void setActive(
bool active);
196 QAbstractSocket::SocketError socketError();
197 QString socketErrorString()
const;
204 #if QXMPP_DEPRECATED_SINCE(1, 1)
205 QT_DEPRECATED_X(
"Use QXmppClient::findExtension<QXmppRosterManager>() instead")
281 void connectToServer(
const QString &jid,
282 const QString &password);
283 void disconnectFromServer();
285 void sendMessage(
const QString &bareJid,
const QString &message);
288 void _q_elementReceived(
const QDomElement &element,
bool &handled);
290 void _q_socketStateChanged(QAbstractSocket::SocketState state);
291 void _q_streamConnected();
292 void _q_streamDisconnected();
296 QXmppClientPrivate *
const d;
298 friend class QXmppInternalClientExtension;
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition: QXmppClientExtension.h:48
The QXmppClient class is the main class for using QXmpp.
Definition: QXmppClient.h:95
void presenceReceived(const QXmppPresence &presence)
void error(QXmppClient::Error)
State
This enumeration describes a client state.
Definition: QXmppClient.h:115
@ DisconnectedState
Disconnected from the server.
Definition: QXmppClient.h:116
@ ConnectingState
Trying to connect to the server.
Definition: QXmppClient.h:117
T * findExtension()
Returns the extension which can be cast into type T*, or 0 if there is no such extension.
Definition: QXmppClient.h:144
void loggerChanged(QXmppLogger *logger)
This signal is emitted when the logger changes.
Error
Definition: QXmppClient.h:106
@ NoError
No error.
Definition: QXmppClient.h:107
@ XmppStreamError
Error due to XML stream.
Definition: QXmppClient.h:110
@ KeepAliveError
Error due to no response to a keep alive.
Definition: QXmppClient.h:109
@ SocketError
Error due to TCP socket.
Definition: QXmppClient.h:108
void sslErrors(const QList< QSslError > &errors)
void stateChanged(QXmppClient::State state)
This signal is emitted when the client state changes.
void messageReceived(const QXmppMessage &message)
void iqReceived(const QXmppIq &iq)
void disconnected()
This signal is emitted when the XMPP connection disconnects.
int indexOfExtension()
Returns the index of an extension.
Definition: QXmppClient.h:170
The QXmppConfiguration class holds configuration options.
Definition: QXmppConfiguration.h:48
QXmppDiscoveryIq represents a discovery IQ request or result containing a list of features and other ...
Definition: QXmppDiscoveryIq.h:44
The QXmppIq class is the base class for all IQs.
Definition: QXmppIq.h:42
The QXmppLoggable class represents a source of logging messages.
Definition: QXmppLogger.h:124
The QXmppLogger class represents a sink for logging messages.
Definition: QXmppLogger.h:46
The QXmppMessage class represents an XMPP message.
Definition: QXmppMessage.h:43
The QXmppPresence class represents an XMPP presence stanza.
Definition: QXmppPresence.h:36
The QXmppRosterManager class provides access to a connected client's roster.
Definition: QXmppRosterManager.h:68
Condition
A detailed condition of the error.
Definition: QXmppStanza.h:121
The QXmppStanza class is the base class for all XMPP stanzas.
Definition: QXmppStanza.h:100
The QXmppStream class is the base class for all XMPP streams.
Definition: QXmppStream.h:42
The QXmppVCardManager class gets/sets XMPP vCards. It is an implementation of XEP-0054: vcard-temp.
Definition: QXmppVCardManager.h:57
The QXmppVersionManager class makes it possible to request for the software version of an entity as d...
Definition: QXmppVersionManager.h:43