~ubuntu-branches/ubuntu/vivid/sflphone/vivid

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2013-06-30 11:40:56 UTC
  • mfrom: (4.1.18 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130630114056-0np50jkyqo6vnmii
Tags: 1.2.3-2
* changeset_r92d62cfc54732bbbcfff2b1d36c096b120b981a5.diff 
  - fixes automatic endian detection 
* Update Vcs: fixes vcs-field-not-canonical

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 *  Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010, 2011 Savoir-Faire Linux Inc.
 
2
 *  Copyright (C) 2004-2012 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
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
 
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
17
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
18
18
 *
19
19
 *  Additional permission under GNU GPL version 3 section 7:
20
20
 *
57
57
};
58
58
 
59
59
namespace sfl {
60
 
class AudioZrtpSession;
 
60
    class AudioZrtpSession;
61
61
}
62
62
 
63
63
class CallManager
67
67
    public:
68
68
 
69
69
        CallManager(DBus::Connection& connection);
70
 
        static const char* SERVER_PATH;
71
70
 
72
71
        /* methods exported by this interface,
73
72
         * you will have to implement them in your ObjectAdaptor
74
73
         */
75
74
 
76
75
        /* Call related methods */
77
 
        void placeCall(const std::string& accountID, const std::string& callID, const std::string& to);
78
 
        void placeCallFirstAccount(const std::string& callID, const std::string& to);
 
76
        bool placeCall(const std::string& accountID, const std::string& callID, const std::string& to);
79
77
 
80
 
        void refuse(const std::string& callID);
81
 
        void accept(const std::string& callID);
82
 
        void hangUp(const std::string& callID);
83
 
        void hold(const std::string& callID);
84
 
        void unhold(const std::string& callID);
85
 
        void transfer(const std::string& callID, const std::string& to);
86
 
        void attendedTransfer(const std::string& transferID, const std::string& targetID);
 
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);
87
85
        std::map< std::string, std::string > getCallDetails(const std::string& callID);
88
86
        std::vector< std::string > getCallList();
89
87
 
90
88
        /* Conference related methods */
91
 
        void joinParticipant(const std::string& sel_callID, const std::string& drag_callID);
 
89
        bool joinParticipant(const std::string& sel_callID, const std::string& drag_callID);
92
90
        void createConfFromParticipantList(const std::vector< std::string >& participants);
93
 
        void addParticipant(const std::string& callID, const std::string& confID);
94
 
        void addMainParticipant(const std::string& confID);
95
 
        void detachParticipant(const std::string& callID);
96
 
        void joinConference(const std::string& sel_confID, const std::string& drag_confID);
97
 
        void hangUpConference(const std::string& confID);
98
 
        void holdConference(const std::string& confID);
99
 
        void unholdConference(const std::string& confID);
100
 
        std::vector< std::string > getConferenceList();
101
 
        std::vector< std::string > getParticipantList(const std::string& confID);
 
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);
102
100
        std::string getConferenceId(const std::string& callID);
103
 
        std::map< std::string, std::string > getConferenceDetails(const std::string& callID);
 
101
        std::map<std::string, std::string> getConferenceDetails(const std::string& callID);
104
102
 
105
103
        /* File Playback methods */
106
104
        bool startRecordedFilePlayback(const std::string& filepath);
110
108
        void setVolume(const std::string& device, const double& value);
111
109
        double getVolume(const std::string& device);
112
110
        void setRecording(const std::string& callID);
 
111
        void recordPlaybackSeek(const double& value);
113
112
        bool getIsRecording(const std::string& callID);
114
113
        std::string getCurrentAudioCodecName(const std::string& callID);
115
114
        void playDTMF(const std::string& key);
121
120
        void setConfirmGoClear(const std::string& callID);
122
121
        void requestGoClear(const std::string& callID);
123
122
        void acceptEnrollment(const std::string& callID, const bool& accepted);
124
 
        void setPBXEnrollment(const std::string& callID, const bool& yesNo);
125
123
 
126
124
        /* Instant messaging */
127
125
        void sendTextMessage(const std::string& callID, const std::string& message);
128
126
 
129
127
    private:
130
128
 
 
129
#if HAVE_ZRTP
131
130
        sfl::AudioZrtpSession * getAudioZrtpSession(const std::string& callID);
 
131
#endif
132
132
};
133
133
 
134
 
 
135
134
#endif//CALLMANAGER_H