~ubuntu-branches/ubuntu/saucy/sflphone/saucy

« back to all changes in this revision

Viewing changes to sflphone-common/src/dbus/callmanager.h

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2010-12-24 16:33:55 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20101224163355-tkvvikqxbrbav6up
Tags: 0.9.11-1
* New upstream release
* Add new build dependencies on libwebkit-dev and libyaml-dev

* Bump Standards-Version up to 3.9.1
* Bump debhelper compatibility to 8
* Patch another typo in the upstream code (lintian notice)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
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>
4
 
 *                                                                              
 
4
 *
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.
9
 
 *                                                                                
 
9
 *
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.
14
 
 *                                                                              
 
14
 *
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.
29
29
 */
30
 
 
 
30
 
31
31
#ifndef __SFL_CALLMANAGER_H__
32
32
#define __SFL_CALLMANAGER_H__
33
33
 
 
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"
35
39
 
36
40
#include <dbus-c++/dbus.h>
37
41
#include <exception>
38
42
 
39
43
class CallManagerException: public std::exception
40
44
{
41
 
    virtual const char* what() const throw()
42
 
    {
43
 
    return "A CallManagerException occured";
44
 
    }
 
45
        virtual const char* what() const throw() {
 
46
            return "A CallManagerException occured";
 
47
        }
45
48
};
46
49
 
47
 
namespace sfl {
48
 
    class AudioZrtpSession;
 
50
namespace sfl
 
51
{
 
52
class AudioZrtpSession;
49
53
}
50
54
 
51
55
class CallManager
52
 
: public org::sflphone::SFLphone::CallManager_adaptor,
 
56
    : public org::sflphone::SFLphone::CallManager_adaptor,
53
57
  public DBus::IntrospectableAdaptor,
54
58
  public DBus::ObjectAdaptor
55
59
{
56
60
    public:
57
61
 
58
 
        CallManager(DBus::Connection& connection);
 
62
        CallManager (DBus::Connection& connection);
59
63
        static const char* SERVER_PATH;
60
64
 
61
65
        /* methods exported by this interface,
63
67
         */
64
68
 
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);
68
72
 
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();
78
82
 
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 );
91
 
 
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 );
100
 
 
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);    
108
 
        
 
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);
 
95
 
 
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);
 
104
 
 
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);
 
112
 
 
113
        /* Instant messaging */
 
114
        void sendTextMessage (const std::string& callID, const std::string& message);
 
115
 
109
116
    private:
110
117
 
111
 
        sfl::AudioZrtpSession * getAudioZrtpSession(const std::string& callID);
 
118
        sfl::AudioZrtpSession * getAudioZrtpSession (const std::string& callID);
112
119
};
113
120
 
114
121