~ubuntu-branches/ubuntu/vivid/ekiga/vivid-proposed

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Kilian Krause
  • Date: 2011-07-17 00:24:50 UTC
  • mfrom: (5.1.5 upstream) (7.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110717002450-ytg3wsrc1ptd3153
Tags: 3.3.1-1
* New upstream release.
 - Required libpt-dev 2.10 and libopal-dev 3.10
* Fix debian/watch to catch new version
* Remove libnotify0.7.patch - included upstream
* Add libboost-dev and libboost-signals-dev to Build-Depends
* debian/rules: Don't install *.la files for new internal shared libs
* Fix Vcs URIs to point to correct desktop/experimental/ekiga tree

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-manager.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 manager
33
 
 *                          implementation backend. A call manager handles calls,
34
 
 *                          sometimes simultaneously.
35
 
 *
36
 
 */
37
 
 
38
 
 
39
 
#ifndef __CALL_MANAGER_H__
40
 
#define __CALL_MANAGER_H__
41
 
 
42
 
#include "call-core.h"
43
 
#include "call-protocol-manager.h"
44
 
#include "codec-description.h"
45
 
 
46
 
namespace Ekiga
47
 
{
48
 
 
49
 
/**
50
 
 * @addtogroup calls
51
 
 * @{
52
 
 */
53
 
 
54
 
  class CallManager
55
 
    {
56
 
 
57
 
  public:
58
 
      typedef std::list<CallProtocolManager::Interface> InterfaceList;
59
 
      typedef std::set<CallProtocolManager *>::iterator iterator;
60
 
      typedef std::set<CallProtocolManager *>::const_iterator const_iterator;
61
 
 
62
 
      /* The constructor
63
 
       */
64
 
      CallManager () {};
65
 
 
66
 
      /* The destructor
67
 
       */
68
 
      virtual ~CallManager () {}
69
 
 
70
 
      /** Add a CallProtocolManager to the CallManager.
71
 
       * @param The manager to be added.
72
 
       */
73
 
      void add_protocol_manager (CallProtocolManager &manager);
74
 
 
75
 
      /** Return a pointer to a CallProtocolManager of the CallManager.
76
 
       * @param protocol is the protcol name.
77
 
       * @return a pointer to the CallProtocolManager or NULL if none.
78
 
       */
79
 
      CallProtocolManager* get_protocol_manager (const std::string &protocol) const;
80
 
 
81
 
      /** Return iterator to beginning
82
 
       * @return iterator to beginning
83
 
       */
84
 
      iterator begin ();
85
 
      const_iterator begin () const;
86
 
 
87
 
      /** Return iterator to end
88
 
       * @return iterator to end 
89
 
       */
90
 
      iterator end ();
91
 
      const_iterator end () const;
92
 
 
93
 
      /** This signal is emitted when a Ekiga::CallProtocolManager has been
94
 
       * added to the CallManager.
95
 
       */
96
 
      sigc::signal<void, CallProtocolManager &> manager_added;
97
 
 
98
 
 
99
 
      /*                 
100
 
       * CALL MANAGEMENT 
101
 
       */              
102
 
 
103
 
      /** Create a call based on the remote uri given as parameter
104
 
       * @param: An uri
105
 
       * @return: true if a Ekiga::Call could be created
106
 
       */
107
 
      virtual bool dial (const std::string & uri) = 0; 
108
 
 
109
 
 
110
 
      /*
111
 
       * PROTOCOL INFORMATION
112
 
       */
113
 
 
114
 
      /**
115
 
       * @return the protocol name
116
 
       */
117
 
      const std::list<std::string> get_protocol_names () const;
118
 
 
119
 
      /**
120
 
       * @return the interface on which we are accepting calls. Generally,
121
 
       * under the form protocol:IP:port.
122
 
       */
123
 
      const CallManager::InterfaceList get_interfaces () const;
124
 
 
125
 
 
126
 
      /*
127
 
       * Misc
128
 
       */
129
 
 
130
 
      /** Enable the given codecs
131
 
       * @param codecs is a set of the codecs and their descriptions
132
 
       *        when the function returns, the list also contains disabled
133
 
       *        codecs supported by the CallManager. Unsupported codecs 
134
 
       *        have been removed.
135
 
       */
136
 
      virtual void set_codecs (CodecList & codecs) = 0; 
137
 
 
138
 
      /** Return the list of available codecs
139
 
       * @return a set of the codecs and their descriptions
140
 
       */
141
 
      virtual const Ekiga::CodecList & get_codecs () const = 0;
142
 
 
143
 
      /** Set the display name used on outgoing calls
144
 
       * @param name is the display name to use.
145
 
       */
146
 
      virtual void set_display_name (const std::string & name) = 0;
147
 
 
148
 
      /** Return the display name used on outgoing calls
149
 
       */
150
 
      virtual const std::string & get_display_name () const = 0;
151
 
 
152
 
      /** Enable echo cancellation
153
 
       * @param enabled is true if echo cancellation should be enabled, false
154
 
       * otherwise.
155
 
       */
156
 
      virtual void set_echo_cancellation (bool enabled) = 0;
157
 
 
158
 
      /** Get echo cancellation setting
159
 
       * @return true if echo cancellation is enabled.
160
 
       */
161
 
      virtual bool get_echo_cancellation () const = 0;
162
 
 
163
 
      /** Enable silence detection
164
 
       * @param enabled is true if silence detection should be enabled, false
165
 
       * otherwise.
166
 
       */
167
 
      virtual void set_silence_detection (bool enabled) = 0;
168
 
 
169
 
      /** Get silence detection setting
170
 
       * @return true if silence detection is enabled.
171
 
       */
172
 
      virtual bool get_silence_detection () const = 0;
173
 
 
174
 
      /** Set maximum jitter 
175
 
       * @param max_val is the maximum jitter for calls in seconds.
176
 
       */
177
 
      virtual void set_maximum_jitter (unsigned max_val) = 0;
178
 
 
179
 
      /** Get maximum jitter 
180
 
       * @return the maximum jitter for calls in seconds.
181
 
       */
182
 
      virtual unsigned get_maximum_jitter () const = 0;
183
 
 
184
 
      /** Set delay before dropping an incoming call 
185
 
       * @param delay is the delay after which the call should be rejected
186
 
       * (or forwarded if supported by the CallManager).
187
 
       */
188
 
      virtual void set_reject_delay (unsigned delay) = 0;
189
 
 
190
 
      /** Get delay before dropping an incoming call
191
 
       * @return the delay in seconds after which a call should be rejected
192
 
       * (or forwarded if supported by the CallManager).
193
 
       */
194
 
      virtual unsigned get_reject_delay () const = 0;
195
 
 
196
 
      /*
197
 
       * MISC
198
 
       */
199
 
      sigc::signal<void> ready;
200
 
 
201
 
    private:
202
 
      std::set<CallProtocolManager *> managers;
203
 
    };
204
 
 
205
 
/**
206
 
 * @}
207
 
 */
208
 
 
209
 
};
210
 
 
211
 
#endif