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-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.
39
#ifndef __CALL_MANAGER_H__
40
#define __CALL_MANAGER_H__
42
#include "call-core.h"
43
#include "call-protocol-manager.h"
44
#include "codec-description.h"
58
typedef std::list<CallProtocolManager::Interface> InterfaceList;
59
typedef std::set<CallProtocolManager *>::iterator iterator;
60
typedef std::set<CallProtocolManager *>::const_iterator const_iterator;
68
virtual ~CallManager () {}
70
/** Add a CallProtocolManager to the CallManager.
71
* @param The manager to be added.
73
void add_protocol_manager (CallProtocolManager &manager);
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.
79
CallProtocolManager* get_protocol_manager (const std::string &protocol) const;
81
/** Return iterator to beginning
82
* @return iterator to beginning
85
const_iterator begin () const;
87
/** Return iterator to end
88
* @return iterator to end
91
const_iterator end () const;
93
/** This signal is emitted when a Ekiga::CallProtocolManager has been
94
* added to the CallManager.
96
sigc::signal<void, CallProtocolManager &> manager_added;
103
/** Create a call based on the remote uri given as parameter
105
* @return: true if a Ekiga::Call could be created
107
virtual bool dial (const std::string & uri) = 0;
111
* PROTOCOL INFORMATION
115
* @return the protocol name
117
const std::list<std::string> get_protocol_names () const;
120
* @return the interface on which we are accepting calls. Generally,
121
* under the form protocol:IP:port.
123
const CallManager::InterfaceList get_interfaces () const;
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
136
virtual void set_codecs (CodecList & codecs) = 0;
138
/** Return the list of available codecs
139
* @return a set of the codecs and their descriptions
141
virtual const Ekiga::CodecList & get_codecs () const = 0;
143
/** Set the display name used on outgoing calls
144
* @param name is the display name to use.
146
virtual void set_display_name (const std::string & name) = 0;
148
/** Return the display name used on outgoing calls
150
virtual const std::string & get_display_name () const = 0;
152
/** Enable echo cancellation
153
* @param enabled is true if echo cancellation should be enabled, false
156
virtual void set_echo_cancellation (bool enabled) = 0;
158
/** Get echo cancellation setting
159
* @return true if echo cancellation is enabled.
161
virtual bool get_echo_cancellation () const = 0;
163
/** Enable silence detection
164
* @param enabled is true if silence detection should be enabled, false
167
virtual void set_silence_detection (bool enabled) = 0;
169
/** Get silence detection setting
170
* @return true if silence detection is enabled.
172
virtual bool get_silence_detection () const = 0;
174
/** Set maximum jitter
175
* @param max_val is the maximum jitter for calls in seconds.
177
virtual void set_maximum_jitter (unsigned max_val) = 0;
179
/** Get maximum jitter
180
* @return the maximum jitter for calls in seconds.
182
virtual unsigned get_maximum_jitter () const = 0;
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).
188
virtual void set_reject_delay (unsigned delay) = 0;
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).
194
virtual unsigned get_reject_delay () const = 0;
199
sigc::signal<void> ready;
202
std::set<CallProtocolManager *> managers;