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")
268 void iqReceived(
const QXmppIq &iq);
272 void sslErrors(
const QList<QSslError> &errors);
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;
301 #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:109
int indexOfExtension()
Returns the index of an extension.
Definition: QXmppClient.h:170
The QXmppRosterManager class provides access to a connected client's roster.
Definition: QXmppRosterManager.h:67
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:47
The QXmppStanza class is the base class for all XMPP stanzas.
Definition: QXmppStanza.h:99
@ SocketError
Error due to TCP socket.
Definition: QXmppClient.h:108
T * findExtension()
Returns the extension which can be cast into type T*, or 0 if there is no such extension.
Definition: QXmppClient.h:144
Error
Definition: QXmppClient.h:106
@ NoError
No error.
Definition: QXmppClient.h:107
State
This enumeration describes a client state.
Definition: QXmppClient.h:115
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:116
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:117
@ XmppStreamError
Error due to XML stream.
Definition: QXmppClient.h:110
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:94
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:42