1 /*
2  * jabberjinglecontent.h - A Jingle content.
3  *
4  * Copyright (c) 2008 by Detlev Casanova <detlev.casanova@gmail.com>
5  *
6  * Kopete    (c) by the Kopete developers  <kopete-devel@kde.org>
7  *
8  * *************************************************************************
9  * *                                                                       *
10  * * This program is free software; you can redistribute it and/or modify  *
11  * * it under the terms of the GNU General Public License as published by  *
12  * * the Free Software Foundation; either version 2 of the License, or     *
13  * * (at your option) any later version.                                   *
14  * *                                                                       *
15  * *************************************************************************
16  */
17 #ifndef JABBER_JINGLE_CONTENT
18 #define JABBER_JINGLE_CONTENT
19 
20 #include <QObject>
21 #include <QString>
22 #include <QDomElement>
23 
24 namespace XMPP {
25 class JingleContent;
26 class JingleSession;
27 }
28 class JabberJingleSession;
29 class MediaManager;
30 class MediaSession;
31 class JingleRtpSession;
32 
33 class JabberJingleContent : public QObject
34 {
35     Q_OBJECT
36 public:
37     JabberJingleContent(JabberJingleSession *parent = nullptr, XMPP::JingleContent *c = 0);
38     ~JabberJingleContent();
39 
40     void setContent(XMPP::JingleContent *);
41     //void startWritingRtpData();
42     void startStreaming();
43     QString contentName();
44     QString elementToSdp(const QDomElement &);
45 
46 public Q_SLOTS:
47     void slotSendRtpData();
48     void slotIncomingData(const QByteArray &);
49     void slotReadyRead();
50 
51 private:
52     XMPP::JingleContent *m_content;
53     XMPP::JingleSession *m_jingleSession;
54     MediaManager *m_mediaManager;
55     MediaSession *m_mediaSession;
56     JingleRtpSession *m_rtpInSession;
57     JingleRtpSession *m_rtpOutSession;
58     JabberJingleSession *m_jabberSession;
59 
60     void prepareRtpOutSession();
61     void prepareRtpInSession();
62 };
63 
64 #endif
65