/usr/include/qxmpp/QXmppJingleIq.h is in libqxmpp-dev 0.9.3-1build3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | /*
* Copyright (C) 2008-2014 The QXmpp developers
*
* Author:
* Jeremy Lainé
*
* Source:
* https://github.com/qxmpp-project/qxmpp
*
* This file is a part of QXmpp library.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*/
#ifndef QXMPPJINGLEIQ_H
#define QXMPPJINGLEIQ_H
#include <QHostAddress>
#include "QXmppIq.h"
class QXmppJingleCandidatePrivate;
class QXmppJingleIqContentPrivate;
class QXmppJingleIqPrivate;
class QXmppJinglePayloadTypePrivate;
/// \brief The QXmppJinglePayloadType class represents a payload type
/// as specified by XEP-0167: Jingle RTP Sessions and RFC 5245.
///
class QXMPP_EXPORT QXmppJinglePayloadType
{
public:
QXmppJinglePayloadType();
QXmppJinglePayloadType(const QXmppJinglePayloadType &other);
~QXmppJinglePayloadType();
unsigned char channels() const;
void setChannels(unsigned char channels);
unsigned int clockrate() const;
void setClockrate(unsigned int clockrate);
unsigned char id() const;
void setId(unsigned char id);
unsigned int maxptime() const;
void setMaxptime(unsigned int maxptime);
QString name() const;
void setName(const QString &name);
QMap<QString, QString> parameters() const;
void setParameters(const QMap<QString, QString> ¶meters);
unsigned int ptime() const;
void setPtime(unsigned int ptime);
/// \cond
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer) const;
/// \endcond
QXmppJinglePayloadType& operator=(const QXmppJinglePayloadType &other);
bool operator==(const QXmppJinglePayloadType &other) const;
private:
QSharedDataPointer<QXmppJinglePayloadTypePrivate> d;
};
/// \brief The QXmppJingleCandidate class represents a transport candidate
/// as specified by XEP-0176: Jingle ICE-UDP Transport Method.
///
class QXMPP_EXPORT QXmppJingleCandidate
{
public:
/// This enum is used to describe a candidate's type.
enum Type
{
HostType, ///< Host candidate, a local address/port.
PeerReflexiveType, ///< Peer-reflexive candidate,
///< the address/port as seen from the peer.
ServerReflexiveType, ///< Server-reflexive candidate,
///< the address/port as seen by the STUN server
RelayedType ///< Relayed candidate, a candidate from
///< a TURN relay.
};
QXmppJingleCandidate();
QXmppJingleCandidate(const QXmppJingleCandidate &other);
~QXmppJingleCandidate();
QXmppJingleCandidate& operator=(const QXmppJingleCandidate &other);
int component() const;
void setComponent(int component);
QString foundation() const;
void setFoundation(const QString &foundation);
int generation() const;
void setGeneration(int generation);
QHostAddress host() const;
void setHost(const QHostAddress &host);
QString id() const;
void setId(const QString &id);
int network() const;
void setNetwork(int network);
quint16 port() const;
void setPort(quint16 port);
int priority() const;
void setPriority(int priority);
QString protocol() const;
void setProtocol(const QString &protocol);
QXmppJingleCandidate::Type type() const;
void setType(QXmppJingleCandidate::Type);
bool isNull() const;
/// \cond
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer) const;
static QXmppJingleCandidate::Type typeFromString(const QString &typeStr, bool *ok = 0);
static QString typeToString(QXmppJingleCandidate::Type type);
/// \endcond
private:
QSharedDataPointer<QXmppJingleCandidatePrivate> d;
};
/// \brief The QXmppJingleIq class represents an IQ used for initiating media
/// sessions as specified by XEP-0166: Jingle.
///
/// \ingroup Stanzas
class QXMPP_EXPORT QXmppJingleIq : public QXmppIq
{
public:
/// This enum is used to describe a Jingle action.
enum Action {
ContentAccept,
ContentAdd,
ContentModify,
ContentReject,
ContentRemove,
DescriptionInfo,
SecurityInfo,
SessionAccept,
SessionInfo,
SessionInitiate,
SessionTerminate,
TransportAccept,
TransportInfo,
TransportReject,
TransportReplace
};
/// \internal
///
/// The QXmppJingleIq::Content class represents the "content" element of a
/// QXmppJingleIq.
class QXMPP_EXPORT Content
{
public:
Content();
Content(const QXmppJingleIq::Content &other);
~Content();
Content& operator=(const Content &other);
QString creator() const;
void setCreator(const QString &creator);
QString name() const;
void setName(const QString &name);
QString senders() const;
void setSenders(const QString &senders);
// XEP-0167: Jingle RTP Sessions
QString descriptionMedia() const;
void setDescriptionMedia(const QString &media);
quint32 descriptionSsrc() const;
void setDescriptionSsrc(quint32 ssrc);
void addPayloadType(const QXmppJinglePayloadType &payload);
QList<QXmppJinglePayloadType> payloadTypes() const;
void setPayloadTypes(const QList<QXmppJinglePayloadType> &payloadTypes);
void addTransportCandidate(const QXmppJingleCandidate &candidate);
QList<QXmppJingleCandidate> transportCandidates() const;
void setTransportCandidates(const QList<QXmppJingleCandidate> &candidates);
QString transportUser() const;
void setTransportUser(const QString &user);
QString transportPassword() const;
void setTransportPassword(const QString &password);
// XEP-0320: Use of DTLS-SRTP in Jingle Sessions
QByteArray transportFingerprint() const;
void setTransportFingerprint(const QByteArray &fingerprint);
QString transportFingerprintHash() const;
void setTransportFingerprintHash(const QString &hash);
QString transportFingerprintSetup() const;
void setTransportFingerprintSetup(const QString &setup);
/// \cond
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer) const;
bool parseSdp(const QString &sdp);
QString toSdp() const;
/// \endcond
private:
QSharedDataPointer<QXmppJingleIqContentPrivate> d;
};
/// \internal
///
/// The QXmppJingleIq::Reason class represents the "reason" element of a
/// QXmppJingleIq.
class QXMPP_EXPORT Reason
{
public:
/// This enum is used to describe a reason's type.
enum Type {
None,
AlternativeSession,
Busy,
Cancel,
ConnectivityError,
Decline,
Expired,
FailedApplication,
FailedTransport,
GeneralError,
Gone,
IncompatibleParameters,
MediaError,
SecurityError,
Success,
Timeout,
UnsupportedApplications,
UnsupportedTransports
};
Reason();
QString text() const;
void setText(const QString &text);
Type type() const;
void setType(Type type);
/// \cond
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer) const;
/// \endcond
private:
QString m_text;
Type m_type;
};
QXmppJingleIq();
QXmppJingleIq(const QXmppJingleIq &other);
~QXmppJingleIq();
QXmppJingleIq& operator=(const QXmppJingleIq &other);
Action action() const;
void setAction(Action action);
void addContent(const Content &content);
QList<Content> contents() const;
void setContents(const QList<Content> &contents);
QString initiator() const;
void setInitiator(const QString &initiator);
Reason& reason();
const Reason& reason() const;
QString responder() const;
void setResponder(const QString &responder);
// XEP-0167: Jingle RTP Sessions
bool ringing() const;
void setRinging(bool ringing);
QString sid() const;
void setSid(const QString &sid);
/// \cond
static bool isJingleIq(const QDomElement &element);
/// \endcond
protected:
/// \cond
void parseElementFromChild(const QDomElement &element);
void toXmlElementFromChild(QXmlStreamWriter *writer) const;
/// \endcond
private:
QSharedDataPointer<QXmppJingleIqPrivate> d;
};
#endif
|