blob: 187e509b2547e11b9b7e88b171f1d7a5b8eb2065 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
#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 TQObject
{
TQ_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
|