~ubuntu-branches/ubuntu/maverick/ekiga/maverick

« back to all changes in this revision

Viewing changes to lib/engine/protocol/skel/call.h

  • Committer: Bazaar Package Importer
  • Author(s): Eugen Dedu, Eugen Dedu, Loic Minier
  • Date: 2008-09-27 10:00:00 UTC
  • mfrom: (1.1.8 upstream)
  • mto: (1.4.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 38.
  • Revision ID: james.westby@ubuntu.com-20080927100000-l5k5werb6czr5b3h
Tags: 3.0.1-1
[ Eugen Dedu ]
* New version.  (Closes: #500089).
* Add our own changelog file in /usr/share/doc.
* Remove gnomemeeting transitional package.
* Discover new interfaces.  (Closes: #488199).
* Compile with dbus support.  (Closes: #467212).
* Numeric keypad inserts digits at correct position.  (Closes: #440159).
* Use libnotify upon call.  (Closes: #412604).
* Symlink identical GNOME help files, to reduce size.  (Closes: #505536).
* Explicitely build-depends on a few dev packages, even if they were
  pulled out anyway by the other dependencies.

[ Loic Minier ]
* Use clean:: instead of clean: in rules.
* Don't disable Uploaders: generation for control.in -> control generation
  in rules.
* Fix some tabs which were size 4 anyway.
* Generate a PO template during build by calling intltool-update -p in
  install; thanks Ubuntu and Martin Pitt; closes: #505535.
* Also let the -dbg depend on ${misc:Depends}.
* Cleanup rules; in particular, use dpkg-parsechangelog and honor
  distclean/clean failures, remove old clean rules, commented out stuff,
  gtk-only stuff.
* Pass -s to dh_* in binary-arch.
* Use debian/*.links and debian/*.manpages instead of symlink manually or
  passing files to dh_installman.
* Use ftp.gnome.org in copyright.
* Switch to quilt and fix target deps in the process; build-dep on quilt
  instead of dpatch; rename news.dpatch to 00_news.patch and refresh;
  replace 00list with series.
* Install autotools-dev config.guess and .sub after patching.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/*
 
3
 * Ekiga -- A VoIP and Video-Conferencing application
 
4
 * Copyright (C) 2000-2007 Damien Sandras
 
5
 
 
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.
 
13
 *
 
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.
 
17
 *
 
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.
 
24
 */
 
25
 
 
26
 
 
27
/*
 
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.
 
34
 *
 
35
 */
 
36
 
 
37
 
 
38
#ifndef __CALL_H__
 
39
#define __CALL_H__
 
40
 
 
41
#include <sigc++/sigc++.h>
 
42
#include <time.h>
 
43
#include <string>
 
44
#include <sstream>
 
45
 
 
46
namespace Ekiga
 
47
{
 
48
 
 
49
  /**
 
50
   * @addtogroup calls
 
51
   * @{
 
52
   */
 
53
 
 
54
  /*
 
55
   * Everything is handled asynchronously and signaled through the
 
56
   * Ekiga::CallManager
 
57
   */
 
58
  class Call
 
59
    {
 
60
 
 
61
  public:
 
62
 
 
63
      Call ()
 
64
        {
 
65
        }
 
66
 
 
67
      virtual ~Call () {};
 
68
 
 
69
      enum StreamType { Audio, Video };
 
70
 
 
71
      /*
 
72
       * Call Management
 
73
       */
 
74
 
 
75
      /** Hangup the call
 
76
      */
 
77
      virtual void hangup () = 0;
 
78
 
 
79
      /** Answer an incoming call
 
80
      */
 
81
      virtual void answer () = 0;
 
82
 
 
83
      /** Transfer the call to the specified uri
 
84
       * @param uri is the uri where to transfer the call
 
85
       */
 
86
      virtual void transfer (std::string uri) = 0;
 
87
 
 
88
      /** Put the call on hold or retrieve it
 
89
      */
 
90
      virtual void toggle_hold () = 0;
 
91
 
 
92
      /** Toggle the stream transmission (if any)
 
93
       * @param the stream type
 
94
       */
 
95
      virtual void toggle_stream_pause (StreamType type) = 0;
 
96
 
 
97
      /** Send the given DTMF
 
98
       * @param dtmf is the dtmf to send (one char)
 
99
       */
 
100
      virtual void send_dtmf (const char dtmf) = 0;
 
101
 
 
102
      /** Reject an incoming call after the given delay
 
103
       * @param delay the delay after which reject the call
 
104
       */
 
105
      virtual void set_reject_delay (unsigned delay) = 0;
 
106
 
 
107
 
 
108
      /*
 
109
       * Call Information
 
110
       */
 
111
 
 
112
      /** Return the call id
 
113
       * @return: the call id
 
114
       */
 
115
      virtual const std::string get_id () const = 0;
 
116
 
 
117
      /** Return the local party name
 
118
       * @return: the local party name
 
119
       */
 
120
      virtual const std::string get_local_party_name () const = 0;
 
121
 
 
122
      /** Return the remote party name
 
123
       * @return: the remote party name
 
124
       */
 
125
      virtual const std::string get_remote_party_name () const = 0;
 
126
 
 
127
      /** Return the remote application
 
128
       * @return: the remote application
 
129
       */
 
130
      virtual const std::string get_remote_application () const = 0;
 
131
 
 
132
      /** Return the remote callback uri
 
133
       * @return: the remote uri
 
134
       */
 
135
      virtual const std::string get_remote_uri () const = 0;
 
136
 
 
137
      /** Return the call duration
 
138
       * @return the current call duration
 
139
       */
 
140
      virtual const std::string get_duration () const = 0;
 
141
 
 
142
      /** Return the call start date and time
 
143
       * @return the current call start date and time
 
144
       */
 
145
      virtual time_t get_start_time () const = 0;
 
146
 
 
147
      /** Return information about call type
 
148
       * @return true if it is an outgoing call
 
149
       */
 
150
      virtual bool is_outgoing () const = 0;
 
151
 
 
152
      /** Return the received audio bandwidth
 
153
       * @return the received audio bandwidth in kbytes/s
 
154
       */
 
155
      virtual double get_received_audio_bandwidth () const = 0;
 
156
 
 
157
      /** Return the transmitted audio bandwidth
 
158
       * @return the transmitted audio bandwidth in kbytes/s
 
159
       */
 
160
      virtual double get_transmitted_audio_bandwidth () const = 0;
 
161
 
 
162
      /** Return the received video bandwidth
 
163
       * @return the received video bandwidth in kbytes/s
 
164
       */
 
165
      virtual double get_received_video_bandwidth () const = 0;
 
166
 
 
167
      /** Return the transmitted video bandwidth
 
168
       * @return the transmitted video bandwidth in kbytes/s
 
169
       */
 
170
      virtual double get_transmitted_video_bandwidth () const = 0;
 
171
 
 
172
      /** Return the jitter size
 
173
       * @return the jitter size in ms
 
174
       */
 
175
      virtual unsigned get_jitter_size () const = 0;
 
176
 
 
177
      /** Return the lost packets information
 
178
       * @return the lost packets percentage
 
179
       */
 
180
      virtual double get_lost_packets () const = 0;
 
181
 
 
182
      /** Return the late packets information
 
183
       * @return the late packets percentage
 
184
       */
 
185
      virtual double get_late_packets () const = 0;
 
186
 
 
187
      /** Return the out of order packets information
 
188
       * @return the out of order packets percentage
 
189
       */
 
190
      virtual double get_out_of_order_packets () const = 0;
 
191
 
 
192
 
 
193
 
 
194
      /*
 
195
       * Signals
 
196
       */
 
197
 
 
198
      /* Signal emitted when the call is established
 
199
       */
 
200
      sigc::signal<void> established;
 
201
 
 
202
      /* Signal emitted when an established call is cleared
 
203
       * @param: a string describing why the call was cleared
 
204
       */
 
205
      sigc::signal<void, std::string> cleared;
 
206
 
 
207
      /* Signal emitted when the call is missed, ie cleared
 
208
       * without having been established
 
209
       */
 
210
      sigc::signal<void> missed;
 
211
 
 
212
      /* Signal emitted when the call is forwarded
 
213
       */
 
214
      sigc::signal<void> forwarded;
 
215
 
 
216
      /* Signal emitted when the call is held
 
217
       */
 
218
      sigc::signal<void> held;
 
219
 
 
220
      /* Signal emitted when the call is retrieved
 
221
       */
 
222
      sigc::signal<void> retrieved;
 
223
 
 
224
      /* Signal emitted when the call is being setup
 
225
       */
 
226
      sigc::signal<void> setup;
 
227
 
 
228
      /* Signal emitted when the remote party is ringing
 
229
       */
 
230
      sigc::signal<void> ringing;
 
231
 
 
232
      /* Signal emitted when a stream is opened
 
233
       * @param the stream name
 
234
       * @param the stream type
 
235
       * @param transmission or reception
 
236
       */
 
237
      sigc::signal<void, std::string, StreamType, bool> stream_opened;
 
238
 
 
239
      /* Signal emitted when a stream is closed
 
240
       * @param the stream name
 
241
       * @param the stream type
 
242
       * @param transmission or reception
 
243
       */
 
244
      sigc::signal<void, std::string, StreamType, bool> stream_closed;
 
245
 
 
246
      /* Signal emitted when a transmitted stream is paused
 
247
       * @param the stream name
 
248
       * @param the stream type
 
249
       * @param transmission or reception
 
250
       */
 
251
      sigc::signal<void, std::string, StreamType> stream_paused;
 
252
 
 
253
      /* Signal emitted when a transmitted stream is resumed
 
254
       * @param the stream name
 
255
       * @param the stream type
 
256
       * @param transmission or reception
 
257
       */
 
258
      sigc::signal<void, std::string, StreamType> stream_resumed;
 
259
 
 
260
    };
 
261
 
 
262
/**
 
263
 * @}
 
264
 */
 
265
 
 
266
};
 
267
 
 
268
#endif