3
* Ekiga -- A VoIP and Video-Conferencing application
4
* Copyright (C) 2000-2007 Damien Sandras
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or (at
9
* your option) any later version. This program is distributed in the hope
10
* that it will be useful, but WITHOUT ANY WARRANTY; without even the
11
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
* See the GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License along
15
* with this program; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
18
* Ekiga is licensed under the GPL license and as a special exception, you
19
* have permission to link or otherwise combine this program with the
20
* programs OPAL, OpenH323 and PWLIB, and distribute the combination, without
21
* applying the requirements of the GNU GPL to the OPAL, OpenH323 and PWLIB
22
* programs, as long as you do follow the requirements of the GNU GPL for all
23
* the rest of the software thus combined.
28
* call.h - description
29
* ------------------------------------------
30
* begin : written in 2007 by Damien Sandras
31
* copyright : (c) 2007 by Damien Sandras
32
* description : declaration of the interface of a call handled by
33
* the Ekiga::CallManager.
41
#include <sigc++/sigc++.h>
55
* Everything is handled asynchronously and signaled through the
69
enum StreamType { Audio, Video };
77
virtual void hangup () = 0;
79
/** Answer an incoming call
81
virtual void answer () = 0;
83
/** Transfer the call to the specified uri
84
* @param uri is the uri where to transfer the call
86
virtual void transfer (std::string uri) = 0;
88
/** Put the call on hold or retrieve it
90
virtual void toggle_hold () = 0;
92
/** Toggle the stream transmission (if any)
93
* @param the stream type
95
virtual void toggle_stream_pause (StreamType type) = 0;
97
/** Send the given DTMF
98
* @param dtmf is the dtmf to send (one char)
100
virtual void send_dtmf (const char dtmf) = 0;
102
/** Reject an incoming call after the given delay
103
* @param delay the delay after which reject the call
105
virtual void set_reject_delay (unsigned delay) = 0;
112
/** Return the call id
113
* @return: the call id
115
virtual const std::string get_id () const = 0;
117
/** Return the local party name
118
* @return: the local party name
120
virtual const std::string get_local_party_name () const = 0;
122
/** Return the remote party name
123
* @return: the remote party name
125
virtual const std::string get_remote_party_name () const = 0;
127
/** Return the remote application
128
* @return: the remote application
130
virtual const std::string get_remote_application () const = 0;
132
/** Return the remote callback uri
133
* @return: the remote uri
135
virtual const std::string get_remote_uri () const = 0;
137
/** Return the call duration
138
* @return the current call duration
140
virtual const std::string get_duration () const = 0;
142
/** Return the call start date and time
143
* @return the current call start date and time
145
virtual time_t get_start_time () const = 0;
147
/** Return information about call type
148
* @return true if it is an outgoing call
150
virtual bool is_outgoing () const = 0;
152
/** Return the received audio bandwidth
153
* @return the received audio bandwidth in kbytes/s
155
virtual double get_received_audio_bandwidth () const = 0;
157
/** Return the transmitted audio bandwidth
158
* @return the transmitted audio bandwidth in kbytes/s
160
virtual double get_transmitted_audio_bandwidth () const = 0;
162
/** Return the received video bandwidth
163
* @return the received video bandwidth in kbytes/s
165
virtual double get_received_video_bandwidth () const = 0;
167
/** Return the transmitted video bandwidth
168
* @return the transmitted video bandwidth in kbytes/s
170
virtual double get_transmitted_video_bandwidth () const = 0;
172
/** Return the jitter size
173
* @return the jitter size in ms
175
virtual unsigned get_jitter_size () const = 0;
177
/** Return the lost packets information
178
* @return the lost packets percentage
180
virtual double get_lost_packets () const = 0;
182
/** Return the late packets information
183
* @return the late packets percentage
185
virtual double get_late_packets () const = 0;
187
/** Return the out of order packets information
188
* @return the out of order packets percentage
190
virtual double get_out_of_order_packets () const = 0;
198
/* Signal emitted when the call is established
200
sigc::signal<void> established;
202
/* Signal emitted when an established call is cleared
203
* @param: a string describing why the call was cleared
205
sigc::signal<void, std::string> cleared;
207
/* Signal emitted when the call is missed, ie cleared
208
* without having been established
210
sigc::signal<void> missed;
212
/* Signal emitted when the call is forwarded
214
sigc::signal<void> forwarded;
216
/* Signal emitted when the call is held
218
sigc::signal<void> held;
220
/* Signal emitted when the call is retrieved
222
sigc::signal<void> retrieved;
224
/* Signal emitted when the call is being setup
226
sigc::signal<void> setup;
228
/* Signal emitted when the remote party is ringing
230
sigc::signal<void> ringing;
232
/* Signal emitted when a stream is opened
233
* @param the stream name
234
* @param the stream type
235
* @param transmission or reception
237
sigc::signal<void, std::string, StreamType, bool> stream_opened;
239
/* Signal emitted when a stream is closed
240
* @param the stream name
241
* @param the stream type
242
* @param transmission or reception
244
sigc::signal<void, std::string, StreamType, bool> stream_closed;
246
/* Signal emitted when a transmitted stream is paused
247
* @param the stream name
248
* @param the stream type
249
* @param transmission or reception
251
sigc::signal<void, std::string, StreamType> stream_paused;
253
/* Signal emitted when a transmitted stream is resumed
254
* @param the stream name
255
* @param the stream type
256
* @param transmission or reception
258
sigc::signal<void, std::string, StreamType> stream_resumed;