Skip to content
Snippets Groups Projects
Select Git revision
  • c17508862c8f95bc2df7eee3c3c70148dd3d40c4
  • master default
  • cmake_fixes
  • pulls/1772757862/750
  • copilot/fix-770
  • windows_ci_static
  • c_link
  • cpack
  • windows_ci
  • cert_pk_id
  • proxy_push_result
  • cnode_put_id
  • update-windows-build
  • proxy
  • resubscribe_on_token_change
  • actions
  • client_mode
  • llhttp
  • search_node_add
  • crypto_aes_gcm_argon2
  • ios_notifications
  • v3.4.0
  • v3.3.1
  • v3.3.1rc1
  • v3.3.1rc2
  • v3.3.0
  • v3.2.0
  • v3.1.11
  • v3.1.10
  • v3.1.9
  • v3.1.8.2
  • v3.1.8.1
  • v3.1.8
  • v3.1.7
  • v3.1.6
  • v3.1.5
  • v3.1.4
  • v3.1.3
  • v3.1.2
  • v3.1
  • v3.0.1
41 results

dhtchat.cpp

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    dbuscallmanager.h 5.25 KiB
    /*
     *  Copyright (C) 2004-2015 Savoir-Faire Linux Inc.
     *  Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
     *
     *  This program is free software; you can redistribute it and/or modify
     *  it under the terms of the GNU General Public License as published by
     *  the Free Software Foundation; either version 3 of the License, or
     *  (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
     *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     *  GNU General Public License for more details.
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
     *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
     *
     *  Additional permission under GNU GPL version 3 section 7:
     *
     *  If you modify this program, or any covered work, by linking or
     *  combining it with the OpenSSL project's OpenSSL library (or a
     *  modified version of that library), containing parts covered by the
     *  terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
     *  grants you additional permission to convey the resulting work.
     *  Corresponding Source for a non-source form of such a combination
     *  shall include the source code for the parts of OpenSSL used as well
     *  as that of the covered work.
     */
    
    #ifndef __RING_DBUSCALLMANAGER_H__
    #define __RING_DBUSCALLMANAGER_H__
    
    #include <vector>
    #include <map>
    #include <string>
    
    #include "dbus_cpp.h"
    
    #if __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
    /* This warning option only exists for gcc 4.6.0 and greater. */
    #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
    #endif
    
    #pragma GCC diagnostic ignored "-Wignored-qualifiers"
    #pragma GCC diagnostic ignored "-Wunused-parameter"
    #include "dbuscallmanager.adaptor.h"
    #pragma GCC diagnostic warning "-Wignored-qualifiers"
    #pragma GCC diagnostic warning "-Wunused-parameter"
    
    #if __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
    /* This warning option only exists for gcc 4.6.0 and greater. */
    #pragma GCC diagnostic warning "-Wunused-but-set-variable"
    #endif
    
    #include <stdexcept>
    
    class DBusCallManager :
        public cx::ring::Ring::CallManager_adaptor,
        public DBus::IntrospectableAdaptor,
        public DBus::ObjectAdaptor
    {
        public:
            DBusCallManager(DBus::Connection& connection);
    
            // Methods
            std::string placeCall(const std::string& accountID, const std::string& to);
            bool refuse(const std::string& callID);
            bool accept(const std::string& callID);
            bool hangUp(const std::string& callID);
            bool hold(const std::string& callID);
            bool unhold(const std::string& callID);
            bool muteLocalMedia(const std::string& callid, const std::string& mediaType, const bool& mute);
            bool transfer(const std::string& callID, const std::string& to);
            bool attendedTransfer(const std::string& transferID, const std::string& targetID);
            std::map<std::string, std::string> getCallDetails(const std::string& callID);
            std::vector<std::string> getCallList();
            void removeConference(const std::string& conference_id);
            bool joinParticipant(const std::string& sel_callID, const std::string& drag_callID);
            void createConfFromParticipantList(const std::vector< std::string >& participants);
            bool isConferenceParticipant(const std::string& call_id);
            bool addParticipant(const std::string& callID, const std::string& confID);
            bool addMainParticipant(const std::string& confID);
            bool detachParticipant(const std::string& callID);
            bool joinConference(const std::string& sel_confID, const std::string& drag_confID);
            bool hangUpConference(const std::string& confID);
            bool holdConference(const std::string& confID);
            bool unholdConference(const std::string& confID);
            std::vector<std::string> getConferenceList();
            std::vector<std::string> getParticipantList(const std::string& confID);
            std::vector<std::string> getDisplayNames(const std::string& confID);
            std::string getConferenceId(const std::string& callID);
            std::map<std::string, std::string> getConferenceDetails(const std::string& callID);
            bool startRecordedFilePlayback(const std::string& filepath);
            void stopRecordedFilePlayback(const std::string& filepath);
            bool toggleRecording(const std::string& callID);
            void setRecording(const std::string& callID);
            void recordPlaybackSeek(const double& value);
            bool getIsRecording(const std::string& callID);
            void switchInput(const std::string& callID, const std::string& input);
            std::string getCurrentAudioCodecName(const std::string& callID);
            void playDTMF(const std::string& key);
            void startTone(const int32_t& start, const int32_t& type);
            void setSASVerified(const std::string& callID);
            void resetSASVerified(const std::string& callID);
            void setConfirmGoClear(const std::string& callID);
            void requestGoClear(const std::string& callID);
            void acceptEnrollment(const std::string& callID, const bool& accepted);
            void sendTextMessage(const std::string& callID, const std::string& message);
    };
    
    #endif // __RING_CALLMANAGER_H__