27 #include "QXmppConfiguration.h"
28 #include "QXmppLogger.h"
29 #include "QXmppPresence.h"
31 #include <QAbstractSocket>
36 class QXmppClientPrivate;
41 class QXmppInternalClientExtension;
98 Q_PROPERTY(
QXmppLogger *logger READ logger WRITE setLogger NOTIFY loggerChanged)
100 Q_PROPERTY(
State state READ state NOTIFY stateChanged)
138 QList<QXmppClientExtension *> extensions();
156 const QList<QXmppClientExtension *> list = extensions();
157 for (
auto ext : list) {
158 T *extension = qobject_cast<T *>(ext);
183 auto list = extensions();
184 for (
int i = 0; i < list.size(); ++i) {
185 if (qobject_cast<T *>(list.at(i)) !=
nullptr)
191 bool isAuthenticated()
const;
192 bool isConnected()
const;
194 bool isActive()
const;
195 void setActive(
bool active);
197 StreamManagementState streamManagementState()
const;
209 QAbstractSocket::SocketError socketError();
210 QString socketErrorString()
const;
217 #if QXMPP_DEPRECATED_SINCE(1, 1)
218 QT_DEPRECATED_X(
"Use QXmppClient::findExtension<QXmppRosterManager>() instead")
283 void iqReceived(
const QXmppIq &iq);
287 void sslErrors(
const QList<QSslError> &errors);
296 void connectToServer(
const QString &jid,
297 const QString &password);
298 void disconnectFromServer();
300 void sendMessage(
const QString &bareJid,
const QString &message);
303 void _q_elementReceived(
const QDomElement &element,
bool &handled);
305 void _q_socketStateChanged(QAbstractSocket::SocketState state);
306 void _q_streamConnected();
307 void _q_streamDisconnected();
311 QXmppClientPrivate *
const d;
313 friend class QXmppInternalClientExtension;
316 #endif // QXMPPCLIENT_H
The QXmppPresence class represents an XMPP presence stanza.
Definition: QXmppPresence.h:35
@ KeepAliveError
Error due to no response to a keep alive.
Definition: QXmppClient.h:108
int indexOfExtension()
Returns the index of an extension.
Definition: QXmppClient.h:181
StreamManagementState
Describes the use of XEP-0198: Stream Management.
Definition: QXmppClient.h:122
The QXmppRosterManager class provides access to a connected client's roster.
Definition: QXmppRosterManager.h:68
@ NoStreamManagement
Stream Management is not used.
Definition: QXmppClient.h:124
The QXmppVCardManager class gets/sets XMPP vCards. It is an implementation of XEP-0054: vcard-temp.
Definition: QXmppVCardManager.h:56
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition: QXmppClientExtension.h:46
The QXmppStanza class is the base class for all XMPP stanzas.
Definition: QXmppStanza.h:99
@ SocketError
Error due to TCP socket.
Definition: QXmppClient.h:107
T * findExtension()
Returns the extension which can be cast into type T*, or 0 if there is no such extension.
Definition: QXmppClient.h:154
Error
Definition: QXmppClient.h:105
@ NoError
No error.
Definition: QXmppClient.h:106
State
This enumeration describes a client state.
Definition: QXmppClient.h:114
The QXmppLogger class represents a sink for logging messages.
Definition: QXmppLogger.h:45
The QXmppConfiguration class holds configuration options.
Definition: QXmppConfiguration.h:47
@ DisconnectedState
Disconnected from the server.
Definition: QXmppClient.h:115
The QXmppStream class is the base class for all XMPP streams.
Definition: QXmppStream.h:41
Condition
A detailed condition of the error.
Definition: QXmppStanza.h:121
@ ConnectingState
Trying to connect to the server.
Definition: QXmppClient.h:116
@ NewStream
Stream Management is used and the previous stream has not been resumed.
Definition: QXmppClient.h:126
@ XmppStreamError
Error due to XML stream.
Definition: QXmppClient.h:109
The QXmppIq class is the base class for all IQs.
Definition: QXmppIq.h:41
The QXmppClient class is the main class for using QXmpp.
Definition: QXmppClient.h:93
The QXmppLoggable class represents a source of logging messages.
Definition: QXmppLogger.h:123
The QXmppVersionManager class makes it possible to request for the software version of an entity as d...
Definition: QXmppVersionManager.h:42
QXmppDiscoveryIq represents a discovery IQ request or result containing a list of features and other ...
Definition: QXmppDiscoveryIq.h:43
The QXmppMessage class represents an XMPP message.
Definition: QXmppMessage.h:45