QXmppExternalService Class
The QXmppExternalService class represents an external service as defined by XEP-0215: External Service Discovery. More...
| Header: | #include <QXmppExternalService.h> |
| Since: | QXmpp 1.6 |
Public Types
(since QXmpp 1.6) enum class | Action { Add, Delete, Modify } |
(since QXmpp 1.6) enum class | Transport { Tcp, Udp } |
Public Functions
| std::optional<QXmppExternalService::Action> | action() const |
| std::optional<QDateTime> | expires() const |
| QString | host() const |
| std::optional<QString> | name() const |
| void | parse(const QDomElement &el) |
| std::optional<QString> | password() const |
| std::optional<quint16> | port() const |
| std::optional<bool> | restricted() const |
| void | setAction(std::optional<QXmppExternalService::Action> action) |
| void | setExpires(std::optional<QDateTime> expires) |
| void | setHost(const QString &host) |
| void | setName(std::optional<QString> name) |
| void | setPassword(std::optional<QString> password) |
| void | setPort(std::optional<quint16> port) |
| void | setRestricted(std::optional<bool> restricted) |
| void | setTransport(std::optional<QXmppExternalService::Transport> transport) |
| void | setType(const QString &type) |
| void | setUsername(std::optional<QString> username) |
| void | toXml(QXmlStreamWriter *writer) const |
| std::optional<QXmppExternalService::Transport> | transport() const |
| QString | type() const |
| std::optional<QString> | username() const |
Static Public Members
| bool | isExternalService(const QDomElement &element) |
Detailed Description
Member Type Documentation
[since QXmpp 1.6] enum class QXmppExternalService::Action
Describes the action type of an external service IQ.
| Constant | Value |
|---|---|
QXmppExternalService::Action::Add | 0 |
QXmppExternalService::Action::Delete | 1 |
QXmppExternalService::Action::Modify | 2 |
This enum was introduced in QXmpp 1.6.
[since QXmpp 1.6] enum class QXmppExternalService::Transport
Describes the packet type of an external service IQ.
| Constant | Value |
|---|---|
QXmppExternalService::Transport::Tcp | 0 |
QXmppExternalService::Transport::Udp | 1 |
This enum was introduced in QXmpp 1.6.
Member Function Documentation
std::optional<QXmppExternalService::Action> QXmppExternalService::action() const
Returns the action of the external service.
See also setAction().
std::optional<QDateTime> QXmppExternalService::expires() const
Returns the expiration date of the external service.
See also setExpires().
QString QXmppExternalService::host() const
Returns the host of the external service.
See also setHost().
[static] bool QXmppExternalService::isExternalService(const QDomElement &element)
Returns true if the element is a valid external service and can be parsed.
std::optional<QString> QXmppExternalService::name() const
Returns the name of the external service.
See also setName().
void QXmppExternalService::parse(const QDomElement &el)
Parses given DOM element as an external service. Returns true on success.
el.
std::optional<QString> QXmppExternalService::password() const
Returns the password of the external service.
See also setPassword().
std::optional<quint16> QXmppExternalService::port() const
Returns the port of the external service.
Note: quint16 since QXmpp 1.11
See also setPort().
std::optional<bool> QXmppExternalService::restricted() const
Returns the restricted mode of the external service.
See also setRestricted().
void QXmppExternalService::setAction(std::optional<QXmppExternalService::Action> action)
Sets the action of the external service.
See also action().
void QXmppExternalService::setExpires(std::optional<QDateTime> expires)
Sets the expiration date of the external service.
expires.
See also expires().
void QXmppExternalService::setHost(const QString &host)
Sets the host of the external service.
See also host().
void QXmppExternalService::setName(std::optional<QString> name)
Sets the name of the external service.
See also name().
void QXmppExternalService::setPassword(std::optional<QString> password)
Sets the password of the external service.
See also password().
void QXmppExternalService::setPort(std::optional<quint16> port)
Sets the port of the external service.
Note: quint16 since QXmpp 1.11
port.
See also port().
void QXmppExternalService::setRestricted(std::optional<bool> restricted)
Sets the restricted mode of the external service.
See also restricted().
void QXmppExternalService::setTransport(std::optional<QXmppExternalService::Transport> transport)
Sets the transport type of the external service.
See also transport().
void QXmppExternalService::setType(const QString &type)
Sets the type of the external service.
See also type().
void QXmppExternalService::setUsername(std::optional<QString> username)
Sets the username of the external service.
See also username().
void QXmppExternalService::toXml(QXmlStreamWriter *writer) const
QXmppExternalService::toXml
Translates the external service to XML using the provided XML stream writer.
writer.
std::optional<QXmppExternalService::Transport> QXmppExternalService::transport() const
Returns the transport type of the external service.
See also setTransport().
QString QXmppExternalService::type() const
Returns the type of the external service.
See also setType().
std::optional<QString> QXmppExternalService::username() const
Returns the username of the external service.
See also setUsername().