summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/jabber/jingle/jinglesessionmanager.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/protocols/jabber/jingle/jinglesessionmanager.h
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/jabber/jingle/jinglesessionmanager.h')
-rw-r--r--kopete/protocols/jabber/jingle/jinglesessionmanager.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/kopete/protocols/jabber/jingle/jinglesessionmanager.h b/kopete/protocols/jabber/jingle/jinglesessionmanager.h
new file mode 100644
index 00000000..06951c2f
--- /dev/null
+++ b/kopete/protocols/jabber/jingle/jinglesessionmanager.h
@@ -0,0 +1,89 @@
+/*
+ jinglesessionmanager.h - Manage Jingle sessions.
+
+ Copyright (c) 2006 by Michaël Larouche <[email protected]>
+
+ Kopete (c) 2001-2006 by the Kopete developers <[email protected]>
+
+ *************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ *************************************************************************
+*/
+#ifndef JINGLESESSIONMANAGER_H
+#define JINGLESESSIONMANAGER_H
+
+#include <xmpp.h>
+#include <im.h>
+
+#include <qobject.h>
+#include <qvaluelist.h>
+
+namespace cricket
+{
+ class SessionManager;
+}
+
+class JingleSession;
+class JingleVoiceSession;
+class JabberAccount;
+
+/**
+ * @brief Manage Jingle sessions.
+ * @author Michaël Larouche <[email protected]>
+ */
+class JingleSessionManager : public QObject
+{
+ Q_OBJECT
+public:
+ typedef QValueList<XMPP::Jid> JidList;
+
+ JingleSessionManager(JabberAccount *account);
+ ~JingleSessionManager();
+
+ /**
+ * Get the (single) instance of the cricket session manager.
+ */
+ cricket::SessionManager *cricketSessionManager();
+
+ /**
+ * Return the JabberAccount associated with this session manager.
+ */
+ JabberAccount *account();
+
+public slots:
+ /**
+ * Create a new Jingle session. Returned pointer is managed by this class.
+ * @param sessionType the session you want to create. You must pass its XML namespace(ex: http://jabber.org/protocol/sessions/audio)
+ * @param peers Lists of participants of the session.
+ */
+ JingleSession *createSession(const QString &sessionType, const JidList &peers);
+ /**
+ * Override method that create a session for a one-to-one session.
+ * It behave like createSession method.
+ * @param sessionType the sesion you want to create. You must pass its XML namespace(ex: http://jabber.org/protocol/sessions/audio)
+ * @param user The JID of the user you want to begin a session with.
+ */
+ JingleSession *createSession(const QString &sessionType, const XMPP::Jid &user);
+
+ void removeSession(JingleSession *session);
+
+signals:
+ void incomingSession(const QString &sessionType, JingleSession *session);
+
+private slots:
+ void slotIncomingSession(const QString &sessionType, const QString &initiator);
+
+private:
+ class Private;
+ Private *d;
+
+ class SlotsProxy;
+ SlotsProxy *slotsProxy;
+};
+
+#endif