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/voicecaller.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/voicecaller.h')
-rw-r--r-- | kopete/protocols/jabber/jingle/voicecaller.h | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/kopete/protocols/jabber/jingle/voicecaller.h b/kopete/protocols/jabber/jingle/voicecaller.h new file mode 100644 index 00000000..0f0d18bb --- /dev/null +++ b/kopete/protocols/jabber/jingle/voicecaller.h @@ -0,0 +1,96 @@ +#define PsiAccount JabberAccount +class PsiAccount; + +#ifndef VOICECALLER_H +#define VOICECALLER_H + +#include "im.h" + + + + +using namespace XMPP; + +/** + * \brief An abstract class for a voice call implementation. + */ +class VoiceCaller : public QObject +{ + Q_OBJECT + +public: + /** + * \brief Base constructor. + * + * \param account the account to which this voice caller belongs + */ + VoiceCaller(PsiAccount* account) : account_(account) { }; + + /** + * \brief Retrieves the account to which this voice caller belongs. + */ + PsiAccount* account() { return account_; } + + /** + * \brief Initializes the voice caller. + * This should be called when the connection is open. + */ + virtual void initialize() = 0; + + /** + * \brief De-initializes the voice caller. + * This should be called when the connection is about to be closed. + */ + virtual void deinitialize() = 0; + + /** + * \brief Call the given JID. + */ + virtual void call(const Jid&) = 0; + + /** + * \brief Accept a call from the given JID. + */ + virtual void accept(const Jid&) = 0; + + /** + * \brief Reject the call from the given JID. + */ + virtual void reject(const Jid&) = 0; + + /** + * \brief Terminate the call from the given JID. + */ + virtual void terminate(const Jid&) = 0; + +signals: + /** + * \brief Incoming call from the given JID. + */ + void incoming(const Jid&); + + /** + * \brief Contact accepted an incoming call. + */ + void accepted(const Jid&); + + /** + * \brief Contact rejected an incoming call. + */ + void rejected(const Jid&); + + /** + * \brief Call with given JID is in progress. + */ + void in_progress(const Jid&); + + /** + * \brief Call with given JID is terminated. + */ + void terminated(const Jid&); + +private: + PsiAccount* account_; +}; + +#endif |