~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/src/dbus/callmanager.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (1.1.11)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20140128182336-3xenud1kbnwmf3mz
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *  Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
3
 
 *  Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
4
 
 *
5
 
 *  This program is free software; you can redistribute it and/or modify
6
 
 *  it under the terms of the GNU General Public License as published by
7
 
 *  the Free Software Foundation; either version 3 of the License, or
8
 
 *  (at your option) any later version.
9
 
 *
10
 
 *  This program is distributed in the hope that it will be useful,
11
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 *  GNU General Public License for more details.
14
 
 *
15
 
 *  You should have received a copy of the GNU General Public License
16
 
 *  along with this program; if not, write to the Free Software
17
 
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
18
 
 *
19
 
 *  Additional permission under GNU GPL version 3 section 7:
20
 
 *
21
 
 *  If you modify this program, or any covered work, by linking or
22
 
 *  combining it with the OpenSSL project's OpenSSL library (or a
23
 
 *  modified version of that library), containing parts covered by the
24
 
 *  terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
25
 
 *  grants you additional permission to convey the resulting work.
26
 
 *  Corresponding Source for a non-source form of such a combination
27
 
 *  shall include the source code for the parts of OpenSSL used as well
28
 
 *  as that of the covered work.
29
 
 */
30
 
 
31
 
#ifndef __SFL_CALLMANAGER_H__
32
 
#define __SFL_CALLMANAGER_H__
33
 
 
34
 
#include "dbus_cpp.h"
35
 
#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
36
 
/* This warning option only exists for gcc 4.6.0 and greater. */
37
 
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
38
 
#endif
39
 
 
40
 
#pragma GCC diagnostic ignored "-Wignored-qualifiers"
41
 
#pragma GCC diagnostic ignored "-Wunused-parameter"
42
 
#include "callmanager-glue.h"
43
 
#pragma GCC diagnostic warning "-Wignored-qualifiers"
44
 
#pragma GCC diagnostic warning "-Wunused-parameter"
45
 
 
46
 
#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
47
 
/* This warning option only exists for gcc 4.6.0 and greater. */
48
 
#pragma GCC diagnostic warning "-Wunused-but-set-variable"
49
 
#endif
50
 
 
51
 
#include <stdexcept>
52
 
 
53
 
class CallManagerException: public std::runtime_error {
54
 
    public:
55
 
        CallManagerException(const std::string& str="") :
56
 
            std::runtime_error("A CallManagerException occured: " + str) {}
57
 
};
58
 
 
59
 
namespace sfl {
60
 
    class AudioZrtpSession;
61
 
}
62
 
 
63
 
class CallManager
64
 
    : public org::sflphone::SFLphone::CallManager_adaptor,
65
 
  public DBus::IntrospectableAdaptor,
66
 
      public DBus::ObjectAdaptor {
67
 
    public:
68
 
 
69
 
        CallManager(DBus::Connection& connection);
70
 
 
71
 
        /* methods exported by this interface,
72
 
         * you will have to implement them in your ObjectAdaptor
73
 
         */
74
 
 
75
 
        /* Call related methods */
76
 
        bool placeCall(const std::string& accountID, const std::string& callID, const std::string& to);
77
 
 
78
 
        bool refuse(const std::string& callID);
79
 
        bool accept(const std::string& callID);
80
 
        bool hangUp(const std::string& callID);
81
 
        bool hold(const std::string& callID);
82
 
        bool unhold(const std::string& callID);
83
 
        bool transfer(const std::string& callID, const std::string& to);
84
 
        bool attendedTransfer(const std::string& transferID, const std::string& targetID);
85
 
        std::map< std::string, std::string > getCallDetails(const std::string& callID);
86
 
        std::vector< std::string > getCallList();
87
 
 
88
 
        /* Conference related methods */
89
 
        bool joinParticipant(const std::string& sel_callID, const std::string& drag_callID);
90
 
        void createConfFromParticipantList(const std::vector< std::string >& participants);
91
 
        bool addParticipant(const std::string& callID, const std::string& confID);
92
 
        bool addMainParticipant(const std::string& confID);
93
 
        bool detachParticipant(const std::string& callID);
94
 
        bool joinConference(const std::string& sel_confID, const std::string& drag_confID);
95
 
        bool hangUpConference(const std::string& confID);
96
 
        bool holdConference(const std::string& confID);
97
 
        bool unholdConference(const std::string& confID);
98
 
        std::vector<std::string> getConferenceList();
99
 
        std::vector<std::string> getParticipantList(const std::string& confID);
100
 
        std::string getConferenceId(const std::string& callID);
101
 
        std::map<std::string, std::string> getConferenceDetails(const std::string& callID);
102
 
 
103
 
        /* File Playback methods */
104
 
        bool startRecordedFilePlayback(const std::string& filepath);
105
 
        void stopRecordedFilePlayback(const std::string& filepath);
106
 
 
107
 
        /* General audio methods */
108
 
        void setVolume(const std::string& device, const double& value);
109
 
        double getVolume(const std::string& device);
110
 
        void setRecording(const std::string& callID);
111
 
        void recordPlaybackSeek(const double& value);
112
 
        bool getIsRecording(const std::string& callID);
113
 
        std::string getCurrentAudioCodecName(const std::string& callID);
114
 
        void playDTMF(const std::string& key);
115
 
        void startTone(const int32_t& start, const int32_t& type);
116
 
 
117
 
        /* Security related methods */
118
 
        void setSASVerified(const std::string& callID);
119
 
        void resetSASVerified(const std::string& callID);
120
 
        void setConfirmGoClear(const std::string& callID);
121
 
        void requestGoClear(const std::string& callID);
122
 
        void acceptEnrollment(const std::string& callID, const bool& accepted);
123
 
 
124
 
        /* Instant messaging */
125
 
        void sendTextMessage(const std::string& callID, const std::string& message);
126
 
 
127
 
    private:
128
 
 
129
 
#if HAVE_ZRTP
130
 
        sfl::AudioZrtpSession * getAudioZrtpSession(const std::string& callID);
131
 
#endif
132
 
};
133
 
 
134
 
#endif//CALLMANAGER_H