QXmpp  Version:0.9.1
QXmppRtpPacket.h
1 /*
2  * Copyright (C) 2008-2014 The QXmpp developers
3  *
4  * Author:
5  * Jeremy LainĂ©
6  *
7  * Source:
8  * https://github.com/qxmpp-project/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPRTPPACKET_H
25 #define QXMPPRTPPACKET_H
26 
27 #include <QSharedDataPointer>
28 
29 #include "QXmppGlobal.h"
30 
31 class QXmppRtpPacketPrivate;
32 
36 
37 class QXMPP_EXPORT QXmppRtpPacket
38 {
39 public:
40  QXmppRtpPacket();
41  QXmppRtpPacket(const QXmppRtpPacket &other);
42  ~QXmppRtpPacket();
43 
44  QXmppRtpPacket& operator=(const QXmppRtpPacket &other);
45 
46  bool decode(const QByteArray &ba);
47  QByteArray encode() const;
48  QString toString() const;
49 
50  QList<quint32> csrc() const;
51  void setCsrc(const QList<quint32> &csrc);
52 
53  bool marker() const;
54  void setMarker(bool marker);
55 
56  QByteArray payload() const;
57  void setPayload(const QByteArray &payload);
58 
59  quint16 sequence() const;
60  void setSequence(quint16 sequence);
61 
62  quint32 ssrc() const;
63  void setSsrc(quint32 ssrc);
64 
65  quint32 stamp() const;
66  void setStamp(quint32 stamp);
67 
68  quint8 type() const;
69  void setType(quint8 type);
70 
71 private:
72  QSharedDataPointer<QXmppRtpPacketPrivate> d;
73 };
74 
75 #endif