diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/protocols/jabber/jingle/jinglesession.h | |
download | tdenetwork-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/jinglesession.h')
-rw-r--r-- | kopete/protocols/jabber/jingle/jinglesession.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/kopete/protocols/jabber/jingle/jinglesession.h b/kopete/protocols/jabber/jingle/jinglesession.h new file mode 100644 index 00000000..00c192bd --- /dev/null +++ b/kopete/protocols/jabber/jingle/jinglesession.h @@ -0,0 +1,94 @@ +/* + jinglesession.h - Define a Jingle session. + + Copyright (c) 2006 by Michaël Larouche <michael.larouche@kdemail.net> + + Kopete (c) 2001-2006 by the Kopete developers <kopete-devel@kde.org> + + ************************************************************************* + * * + * 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 JINGLESESSION_H +#define JINGLESESSION_H + +#include <qobject.h> +#include <qstring.h> + +#include <xmpp.h> // XMPP::Jid +#include <qvaluelist.h> + +class JabberAccount; +/** + * @brief Base class for peer-to-peer session that use Jingle signaling + * + * @author Michaël Larouche <michael.larouche@kdemail.net> + */ +class JingleSession : public QObject +{ + Q_OBJECT +public: + typedef QValueList<XMPP::Jid> JidList; + + JingleSession(JabberAccount *account, const JidList &peers); + virtual ~JingleSession(); + + /** + * Return the JabberAccount associated with this session. + */ + JabberAccount *account(); + + const XMPP::Jid &myself() const; + const JidList &peers() const; + JidList &peers(); + + /** + * Return the type of session(ex: voice, video, games) + * Note that you must return the XML namespace that define + * the session: ex:(http://jabber.org/protocol/jingle/sessions/audio) + */ + virtual QString sessionType() = 0; + +public slots: + /** + * @brief Start a session with the give JID. + * You should begin the negociation here. + */ + virtual void start() = 0; + /** + * @brief Acept a session request. + */ + virtual void accept() = 0; + /** + * @brief Decline a session request. + */ + virtual void decline() = 0; + /** + * @brief Terminate a Jingle session. + */ + virtual void terminate() = 0; + +protected slots: + void sendStanza(const QString &stanza); + +signals: + /** + * Session is started(negocation and connection test are done). + */ + void sessionStarted(); + + void accepted(); + void declined(); + void terminated(); + +private: + class Private; + Private *d; +}; + +#endif |