2
2
* Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
3
3
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
5
5
* This program is free software; you can redistribute it and/or modify
6
6
* it under the terms of the GNU General Public License as published by
7
7
* the Free Software Foundation; either version 3 of the License, or
8
8
* (at your option) any later version.
10
10
* This program is distributed in the hope that it will be useful,
11
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
13
* GNU General Public License for more details.
15
15
* You should have received a copy of the GNU General Public License
16
16
* along with this program; if not, write to the Free Software
17
17
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27
27
* shall include the source code for the parts of OpenSSL used as well
28
28
* as that of the covered work.
31
31
#ifndef __SFL_CALLMANAGER_H__
32
32
#define __SFL_CALLMANAGER_H__
34
#pragma GCC diagnostic ignored "-Wignored-qualifiers"
35
#pragma GCC diagnostic ignored "-Wunused-parameter"
34
36
#include "callmanager-glue.h"
37
#pragma GCC diagnostic warning "-Wignored-qualifiers"
38
#pragma GCC diagnostic warning "-Wunused-parameter"
36
40
#include <dbus-c++/dbus.h>
37
41
#include <exception>
39
43
class CallManagerException: public std::exception
41
virtual const char* what() const throw()
43
return "A CallManagerException occured";
45
virtual const char* what() const throw() {
46
return "A CallManagerException occured";
48
class AudioZrtpSession;
52
class AudioZrtpSession;
52
: public org::sflphone::SFLphone::CallManager_adaptor,
56
: public org::sflphone::SFLphone::CallManager_adaptor,
53
57
public DBus::IntrospectableAdaptor,
54
58
public DBus::ObjectAdaptor
58
CallManager(DBus::Connection& connection);
62
CallManager (DBus::Connection& connection);
59
63
static const char* SERVER_PATH;
61
65
/* methods exported by this interface,
65
69
/* Call related methods */
66
void placeCall( const std::string& accountID, const std::string& callID, const std::string& to );
67
void placeCallFirstAccount( const std::string& callID, const std::string& to );
70
void placeCall (const std::string& accountID, const std::string& callID, const std::string& to);
71
void placeCallFirstAccount (const std::string& callID, const std::string& to);
69
void refuse( const std::string& callID );
70
void accept( const std::string& callID );
71
void hangUp( const std::string& callID );
72
void hold( const std::string& callID );
73
void unhold( const std::string& callID );
74
void transfert( const std::string& callID, const std::string& to );
75
std::map< std::string, std::string > getCallDetails( const std::string& callID );
73
void refuse (const std::string& callID);
74
void accept (const std::string& callID);
75
void hangUp (const std::string& callID);
76
void hold (const std::string& callID);
77
void unhold (const std::string& callID);
78
void transfert (const std::string& callID, const std::string& to);
79
std::map< std::string, std::string > getCallDetails (const std::string& callID);
76
80
std::vector< std::string > getCallList (void);
77
std::string getCurrentCallID( );
81
std::string getCurrentCallID();
79
83
/* Conference related methods */
80
void joinParticipant( const std::string& sel_callID, const std::string& drag_callID );
81
void addParticipant( const std::string& callID, const std::string& confID );
82
void addMainParticipant( const std::string& confID );
83
void detachParticipant( const std::string& callID );
84
void joinConference( const std::string& sel_confID, const std::string& drag_confID );
85
void hangUpConference( const std::string& confID );
86
void holdConference( const std::string& confID );
87
void unholdConference( const std::string& confID );
88
std::vector< std::string > getConferenceList (void);
89
std::vector< std::string > getParticipantList (const std::string& confID);
90
std::map< std::string, std::string > getConferenceDetails ( const std::string& callID );
92
/* General audio methods */
93
void setVolume( const std::string& device, const double& value );
94
double getVolume( const std::string& device );
95
void setRecording( const std::string& callID );
96
bool getIsRecording(const std::string& callID);
97
std::string getCurrentCodecName(const std::string& callID);
98
void playDTMF( const std::string& key );
99
void startTone( const int32_t& start, const int32_t& type );
101
/* Security related methods */
102
void setSASVerified(const std::string& callID);
103
void resetSASVerified(const std::string& callID);
104
void setConfirmGoClear(const std::string& callID);
105
void requestGoClear(const std::string& callID);
106
void acceptEnrollment(const std::string& callID, const bool& accepted);
107
void setPBXEnrollment(const std::string& callID, const bool& yesNo);
84
void joinParticipant (const std::string& sel_callID, const std::string& drag_callID);
85
void addParticipant (const std::string& callID, const std::string& confID);
86
void addMainParticipant (const std::string& confID);
87
void detachParticipant (const std::string& callID);
88
void joinConference (const std::string& sel_confID, const std::string& drag_confID);
89
void hangUpConference (const std::string& confID);
90
void holdConference (const std::string& confID);
91
void unholdConference (const std::string& confID);
92
std::vector< std::string > getConferenceList (void);
93
std::vector< std::string > getParticipantList (const std::string& confID);
94
std::map< std::string, std::string > getConferenceDetails (const std::string& callID);
96
/* General audio methods */
97
void setVolume (const std::string& device, const double& value);
98
double getVolume (const std::string& device);
99
void setRecording (const std::string& callID);
100
bool getIsRecording (const std::string& callID);
101
std::string getCurrentCodecName (const std::string& callID);
102
void playDTMF (const std::string& key);
103
void startTone (const int32_t& start, const int32_t& type);
105
/* Security related methods */
106
void setSASVerified (const std::string& callID);
107
void resetSASVerified (const std::string& callID);
108
void setConfirmGoClear (const std::string& callID);
109
void requestGoClear (const std::string& callID);
110
void acceptEnrollment (const std::string& callID, const bool& accepted);
111
void setPBXEnrollment (const std::string& callID, const bool& yesNo);
113
/* Instant messaging */
114
void sendTextMessage (const std::string& callID, const std::string& message);
111
sfl::AudioZrtpSession * getAudioZrtpSession(const std::string& callID);
118
sfl::AudioZrtpSession * getAudioZrtpSession (const std::string& callID);