Commit d54a84ec authored by Olivier Dion's avatar Olivier Dion Committed by Sébastien Blin
Browse files

Replace DRing for libjami

It's not possible to replace the DRing namespace for jami because of conflicts
with namespaces and classes defined under the jami namespace.  Thus, use libjami
as the namespace.

Script to reproduce:

 rg -l DRing | sort | uniq | awk '$0 !~ /NEWS/' | xargs sed -i -e 's|DRing|libjami|g'
 rg -l DRING_ | sort | uniq | xargs sed -i -e 's|DRING_|LIBJAMI_|g'
 sed -i -e 's|dring|jami|g' src/jami/CMakeLists.txt
 sed -i -e 's|dring|jami|g' src/jami/def.h

Change-Id: I80e8c8b58a7586527a016bbef850bab07869c473
parent 94ec7eea
......@@ -44,7 +44,7 @@ the Contributing section for more information.
Short description of content of source tree
-------------------------------------------
- src/ is the core of DRing.
- src/ is the core of libjami.
- bin/ contains applications main code.
- bin/dbus, the D-Bus XML interfaces, and C++ bindings
......
......@@ -1910,7 +1910,7 @@
</arg>
<arg type="i" name="code">
<tp:docstring>
A DRing::DataTransferEventCode code
A libjami::DataTransferEventCode code
</tp:docstring>
</arg>
</signal>
......
......@@ -26,49 +26,49 @@ DBusCallManager::DBusCallManager(DBus::Connection& connection)
auto
DBusCallManager::placeCall(const std::string& accountId, const std::string& to)
-> decltype(DRing::placeCall(accountId, to))
-> decltype(libjami::placeCall(accountId, to))
{
return DRing::placeCall(accountId, to);
return libjami::placeCall(accountId, to);
}
auto
DBusCallManager::placeCallWithMedia(const std::string& accountId,
const std::string& to,
const std::vector<std::map<std::string, std::string>>& mediaList)
-> decltype(DRing::placeCallWithMedia(accountId, to, mediaList))
-> decltype(libjami::placeCallWithMedia(accountId, to, mediaList))
{
return DRing::placeCallWithMedia(accountId, to, mediaList);
return libjami::placeCallWithMedia(accountId, to, mediaList);
}
auto
DBusCallManager::requestMediaChange(const std::string& accountId,
const std::string& callId,
const std::vector<std::map<std::string, std::string>>& mediaList)
-> decltype(DRing::requestMediaChange(accountId, callId, mediaList))
-> decltype(libjami::requestMediaChange(accountId, callId, mediaList))
{
return DRing::requestMediaChange(accountId, callId, mediaList);
return libjami::requestMediaChange(accountId, callId, mediaList);
}
auto
DBusCallManager::refuse(const std::string& accountId, const std::string& callId)
-> decltype(DRing::refuse(accountId, callId))
-> decltype(libjami::refuse(accountId, callId))
{
return DRing::refuse(accountId, callId);
return libjami::refuse(accountId, callId);
}
auto
DBusCallManager::accept(const std::string& accountId, const std::string& callId)
-> decltype(DRing::accept(accountId, callId))
-> decltype(libjami::accept(accountId, callId))
{
return DRing::accept(accountId, callId);
return libjami::accept(accountId, callId);
}
auto
DBusCallManager::acceptWithMedia(const std::string& accountId,
const std::string& callId,
const std::vector<std::map<std::string, std::string>>& mediaList)
-> decltype(DRing::acceptWithMedia(accountId, callId, mediaList))
-> decltype(libjami::acceptWithMedia(accountId, callId, mediaList))
{
return DRing::acceptWithMedia(accountId, callId, mediaList);
return libjami::acceptWithMedia(accountId, callId, mediaList);
}
auto
......@@ -76,30 +76,30 @@ DBusCallManager::answerMediaChangeRequest(
const std::string& accountId,
const std::string& callId,
const std::vector<std::map<std::string, std::string>>& mediaList)
-> decltype(DRing::answerMediaChangeRequest(accountId, callId, mediaList))
-> decltype(libjami::answerMediaChangeRequest(accountId, callId, mediaList))
{
return DRing::answerMediaChangeRequest(accountId, callId, mediaList);
return libjami::answerMediaChangeRequest(accountId, callId, mediaList);
}
auto
DBusCallManager::hangUp(const std::string& accountId, const std::string& callId)
-> decltype(DRing::hangUp(accountId, callId))
-> decltype(libjami::hangUp(accountId, callId))
{
return DRing::hangUp(accountId, callId);
return libjami::hangUp(accountId, callId);
}
auto
DBusCallManager::hold(const std::string& accountId, const std::string& callId)
-> decltype(DRing::hold(accountId, callId))
-> decltype(libjami::hold(accountId, callId))
{
return DRing::hold(accountId, callId);
return libjami::hold(accountId, callId);
}
auto
DBusCallManager::unhold(const std::string& accountId, const std::string& callId)
-> decltype(DRing::unhold(accountId, callId))
-> decltype(libjami::unhold(accountId, callId))
{
return DRing::unhold(accountId, callId);
return libjami::unhold(accountId, callId);
}
auto
......@@ -107,46 +107,46 @@ DBusCallManager::muteLocalMedia(const std::string& accountId,
const std::string& callId,
const std::string& mediaType,
const bool& mute)
-> decltype(DRing::muteLocalMedia(accountId, callId, mediaType, mute))
-> decltype(libjami::muteLocalMedia(accountId, callId, mediaType, mute))
{
return DRing::muteLocalMedia(accountId, callId, mediaType, mute);
return libjami::muteLocalMedia(accountId, callId, mediaType, mute);
}
auto
DBusCallManager::transfer(const std::string& accountId,
const std::string& callId,
const std::string& to) -> decltype(DRing::transfer(accountId, callId, to))
const std::string& to) -> decltype(libjami::transfer(accountId, callId, to))
{
return DRing::transfer(accountId, callId, to);
return libjami::transfer(accountId, callId, to);
}
auto
DBusCallManager::attendedTransfer(const std::string& accountId,
const std::string& callId,
const std::string& targetId)
-> decltype(DRing::attendedTransfer(accountId, callId, targetId))
-> decltype(libjami::attendedTransfer(accountId, callId, targetId))
{
return DRing::attendedTransfer(accountId, callId, targetId);
return libjami::attendedTransfer(accountId, callId, targetId);
}
auto
DBusCallManager::getCallDetails(const std::string& accountId, const std::string& callId)
-> decltype(DRing::getCallDetails(accountId, callId))
-> decltype(libjami::getCallDetails(accountId, callId))
{
return DRing::getCallDetails(accountId, callId);
return libjami::getCallDetails(accountId, callId);
}
auto
DBusCallManager::getCallList(const std::string& accountId)
-> decltype(DRing::getCallList(accountId))
-> decltype(libjami::getCallList(accountId))
{
return DRing::getCallList(accountId);
return libjami::getCallList(accountId);
}
std::vector<std::map<std::string, std::string>>
DBusCallManager::getConferenceInfos(const std::string& accountId, const std::string& confId)
{
return DRing::getConferenceInfos(accountId, confId);
return libjami::getConferenceInfos(accountId, confId);
}
auto
......@@ -154,16 +154,16 @@ DBusCallManager::joinParticipant(const std::string& accountId,
const std::string& sel_callId,
const std::string& account2Id,
const std::string& drag_callId)
-> decltype(DRing::joinParticipant(accountId, sel_callId, account2Id, drag_callId))
-> decltype(libjami::joinParticipant(accountId, sel_callId, account2Id, drag_callId))
{
return DRing::joinParticipant(accountId, sel_callId, account2Id, drag_callId);
return libjami::joinParticipant(accountId, sel_callId, account2Id, drag_callId);
}
void
DBusCallManager::createConfFromParticipantList(const std::string& accountId,
const std::vector<std::string>& participants)
{
DRing::createConfFromParticipantList(accountId, participants);
libjami::createConfFromParticipantList(accountId, participants);
}
void
......@@ -171,7 +171,7 @@ DBusCallManager::setConferenceLayout(const std::string& accountId,
const std::string& confId,
const uint32_t& layout)
{
DRing::setConferenceLayout(accountId, confId, layout);
libjami::setConferenceLayout(accountId, confId, layout);
}
void
......@@ -179,7 +179,7 @@ DBusCallManager::setActiveParticipant(const std::string& accountId,
const std::string& confId,
const std::string& callId)
{
DRing::setActiveParticipant(accountId, confId, callId);
libjami::setActiveParticipant(accountId, confId, callId);
}
void
......@@ -190,7 +190,7 @@ DBusCallManager::muteStream(const std::string& accountId,
const std::string& streamId,
const bool& state)
{
DRing::muteStream(accountId, confId, accountUri, deviceId, streamId, state);
libjami::muteStream(accountId, confId, accountUri, deviceId, streamId, state);
}
void
......@@ -201,7 +201,7 @@ DBusCallManager::setActiveStream(const std::string& accountId,
const std::string& streamId,
const bool& state)
{
DRing::setActiveStream(accountId, confId, accountUri, deviceId, streamId, state);
libjami::setActiveStream(accountId, confId, accountUri, deviceId, streamId, state);
}
void
......@@ -211,14 +211,14 @@ DBusCallManager::raiseHand(const std::string& accountId,
const std::string& deviceId,
const bool& state)
{
DRing::raiseHand(accountId, confId, accountUri, deviceId, state);
libjami::raiseHand(accountId, confId, accountUri, deviceId, state);
}
auto
DBusCallManager::isConferenceParticipant(const std::string& accountId, const std::string& call_id)
-> decltype(DRing::isConferenceParticipant(accountId, call_id))
-> decltype(libjami::isConferenceParticipant(accountId, call_id))
{
return DRing::isConferenceParticipant(accountId, call_id);
return libjami::isConferenceParticipant(accountId, call_id);
}
auto
......@@ -226,29 +226,29 @@ DBusCallManager::addParticipant(const std::string& accountId,
const std::string& callId,
const std::string& account2Id,
const std::string& confId)
-> decltype(DRing::addParticipant(accountId, callId, account2Id, confId))
-> decltype(libjami::addParticipant(accountId, callId, account2Id, confId))
{
return DRing::addParticipant(accountId, callId, account2Id, confId);
return libjami::addParticipant(accountId, callId, account2Id, confId);
}
auto
DBusCallManager::addMainParticipant(const std::string& accountId, const std::string& confId)
-> decltype(DRing::addMainParticipant(accountId, confId))
-> decltype(libjami::addMainParticipant(accountId, confId))
{
return DRing::addMainParticipant(accountId, confId);
return libjami::addMainParticipant(accountId, confId);
}
auto
DBusCallManager::detachLocalParticipant() -> decltype(DRing::detachLocalParticipant())
DBusCallManager::detachLocalParticipant() -> decltype(libjami::detachLocalParticipant())
{
return DRing::detachLocalParticipant();
return libjami::detachLocalParticipant();
}
auto
DBusCallManager::detachParticipant(const std::string& accountId, const std::string& callId)
-> decltype(DRing::detachParticipant(accountId, callId))
-> decltype(libjami::detachParticipant(accountId, callId))
{
return DRing::detachParticipant(accountId, callId);
return libjami::detachParticipant(accountId, callId);
}
auto
......@@ -256,104 +256,104 @@ DBusCallManager::joinConference(const std::string& accountId,
const std::string& sel_confId,
const std::string& account2Id,
const std::string& drag_confId)
-> decltype(DRing::joinConference(accountId, sel_confId, account2Id, drag_confId))
-> decltype(libjami::joinConference(accountId, sel_confId, account2Id, drag_confId))
{
return DRing::joinConference(accountId, sel_confId, account2Id, drag_confId);
return libjami::joinConference(accountId, sel_confId, account2Id, drag_confId);
}
auto
DBusCallManager::hangUpConference(const std::string& accountId, const std::string& confId)
-> decltype(DRing::hangUpConference(accountId, confId))
-> decltype(libjami::hangUpConference(accountId, confId))
{
return DRing::hangUpConference(accountId, confId);
return libjami::hangUpConference(accountId, confId);
}
auto
DBusCallManager::holdConference(const std::string& accountId, const std::string& confId)
-> decltype(DRing::holdConference(accountId, confId))
-> decltype(libjami::holdConference(accountId, confId))
{
return DRing::holdConference(accountId, confId);
return libjami::holdConference(accountId, confId);
}
auto
DBusCallManager::unholdConference(const std::string& accountId, const std::string& confId)
-> decltype(DRing::unholdConference(accountId, confId))
-> decltype(libjami::unholdConference(accountId, confId))
{
return DRing::unholdConference(accountId, confId);
return libjami::unholdConference(accountId, confId);
}
auto
DBusCallManager::getConferenceList(const std::string& accountId)
-> decltype(DRing::getConferenceList(accountId))
-> decltype(libjami::getConferenceList(accountId))
{
return DRing::getConferenceList(accountId);
return libjami::getConferenceList(accountId);
}
auto
DBusCallManager::getParticipantList(const std::string& accountId, const std::string& confId)
-> decltype(DRing::getParticipantList(accountId, confId))
-> decltype(libjami::getParticipantList(accountId, confId))
{
return DRing::getParticipantList(accountId, confId);
return libjami::getParticipantList(accountId, confId);
}
auto
DBusCallManager::getConferenceId(const std::string& accountId, const std::string& callId)
-> decltype(DRing::getConferenceId(accountId, callId))
-> decltype(libjami::getConferenceId(accountId, callId))
{
return DRing::getConferenceId(accountId, callId);
return libjami::getConferenceId(accountId, callId);
}
auto
DBusCallManager::getConferenceDetails(const std::string& accountId, const std::string& callId)
-> decltype(DRing::getConferenceDetails(accountId, callId))
-> decltype(libjami::getConferenceDetails(accountId, callId))
{
return DRing::getConferenceDetails(accountId, callId);
return libjami::getConferenceDetails(accountId, callId);
}
auto
DBusCallManager::currentMediaList(const std::string& accountId, const std::string& callId)
-> decltype(DRing::currentMediaList(accountId, callId))
-> decltype(libjami::currentMediaList(accountId, callId))
{
return DRing::currentMediaList(accountId, callId);
return libjami::currentMediaList(accountId, callId);
}
auto
DBusCallManager::startRecordedFilePlayback(const std::string& filepath)
-> decltype(DRing::startRecordedFilePlayback(filepath))
-> decltype(libjami::startRecordedFilePlayback(filepath))
{
return DRing::startRecordedFilePlayback(filepath);
return libjami::startRecordedFilePlayback(filepath);
}
void
DBusCallManager::stopRecordedFilePlayback()
{
DRing::stopRecordedFilePlayback();
libjami::stopRecordedFilePlayback();
}
auto
DBusCallManager::toggleRecording(const std::string& accountId, const std::string& callId)
-> decltype(DRing::toggleRecording(accountId, callId))
-> decltype(libjami::toggleRecording(accountId, callId))
{
return DRing::toggleRecording(accountId, callId);
return libjami::toggleRecording(accountId, callId);
}
void
DBusCallManager::setRecording(const std::string& accountId, const std::string& callId)
{
DRing::setRecording(accountId, callId);
libjami::setRecording(accountId, callId);
}
void
DBusCallManager::recordPlaybackSeek(const double& value)
{
DRing::recordPlaybackSeek(value);
libjami::recordPlaybackSeek(value);
}
auto
DBusCallManager::getIsRecording(const std::string& accountId, const std::string& callId)
-> decltype(DRing::getIsRecording(accountId, callId))
-> decltype(libjami::getIsRecording(accountId, callId))
{
return DRing::getIsRecording(accountId, callId);
return libjami::getIsRecording(accountId, callId);
}
bool
......@@ -361,7 +361,7 @@ DBusCallManager::switchInput(const std::string& accountId,
const std::string& callId,
const std::string& input)
{
return DRing::switchInput(accountId, callId, input);
return libjami::switchInput(accountId, callId, input);
}
bool
......@@ -369,19 +369,19 @@ DBusCallManager::switchSecondaryInput(const std::string& accountId,
const std::string& conferenceId,
const std::string& input)
{
return DRing::switchSecondaryInput(accountId, conferenceId, input);
return libjami::switchSecondaryInput(accountId, conferenceId, input);
}
void
DBusCallManager::playDTMF(const std::string& key)
{
DRing::playDTMF(key);
libjami::playDTMF(key);
}
void
DBusCallManager::startTone(const int32_t& start, const int32_t& type)
{
DRing::startTone(start, type);
libjami::startTone(start, type);
}
void
......@@ -390,19 +390,19 @@ DBusCallManager::sendTextMessage(const std::string& accountId,
const std::map<std::string, std::string>& messages,
const bool& isMixed)
{
DRing::sendTextMessage(accountId, callId, messages, "Me", isMixed);
libjami::sendTextMessage(accountId, callId, messages, "Me", isMixed);
}
void
DBusCallManager::startSmartInfo(const uint32_t& refreshTimeMs)
{
DRing::startSmartInfo(refreshTimeMs);
libjami::startSmartInfo(refreshTimeMs);
}
void
DBusCallManager::stopSmartInfo()
{
DRing::stopSmartInfo();
libjami::stopSmartInfo();
}
void
......@@ -411,7 +411,7 @@ DBusCallManager::setModerator(const std::string& accountId,
const std::string& peerId,
const bool& state)
{
DRing::setModerator(accountId, confId, peerId, state);
libjami::setModerator(accountId, confId, peerId, state);
}
void
......@@ -420,7 +420,7 @@ DBusCallManager::muteParticipant(const std::string& accountId,
const std::string& peerId,
const bool& state)
{
DRing::muteParticipant(accountId, confId, peerId, state);
libjami::muteParticipant(accountId, confId, peerId, state);
}
void
......@@ -429,7 +429,7 @@ DBusCallManager::hangupParticipant(const std::string& accountId,
const std::string& peerId,
const std::string& deviceId)
{
DRing::hangupParticipant(accountId, confId, peerId, deviceId);
libjami::hangupParticipant(accountId, confId, peerId, deviceId);
}
void
......@@ -438,5 +438,5 @@ DBusCallManager::raiseParticipantHand(const std::string& accountId,
const std::string& peerId,
const bool& state)
{
DRing::raiseParticipantHand(accountId, confId, peerId, state);
libjami::raiseParticipantHand(accountId, confId, peerId, state);
}
......@@ -47,7 +47,7 @@
#include "callmanager_interface.h"
#include <stdexcept>
class DRING_PUBLIC DBusCallManager : public cx::ring::Ring::CallManager_adaptor,
class LIBJAMI_PUBLIC DBusCallManager : public cx::ring::Ring::CallManager_adaptor,
public DBus::IntrospectableAdaptor,
public DBus::ObjectAdaptor
{
......@@ -121,7 +121,7 @@ public:
std::string getConferenceId(const std::string& accountId, const std::string& callId);
std::map<std::string, std::string> getConferenceDetails(const std::string& accountId,
const std::string& confId);
std::vector<DRing::MediaMap> currentMediaList(const std::string& accountId,
std::vector<libjami::MediaMap> currentMediaList(const std::string& accountId,
const std::string& callId);
bool startRecordedFilePlayback(const std::string& filepath);
void stopRecordedFilePlayback();
......
......@@ -115,7 +115,7 @@ DBusClient::~DBusClient()
{
// instances destruction order is important
// so we enforce it here
DRing::unregisterSignalHandlers();
libjami::unregisterSignalHandlers();
#ifdef ENABLE_VIDEO
videoManager_.reset();
#endif
......@@ -134,22 +134,22 @@ DBusClient::initLibrary(int flags)
using namespace std::placeholders;
using std::bind;
using DRing::exportable_callback;
using DRing::CallSignal;
using DRing::ConfigurationSignal;
using DRing::PresenceSignal;
using DRing::AudioSignal;
using DRing::DataTransferSignal;
using DRing::ConversationSignal;
using libjami::exportable_callback;
using libjami::CallSignal;
using libjami::ConfigurationSignal;
using libjami::PresenceSignal;
using libjami::AudioSignal;
using libjami::DataTransferSignal;
using libjami::ConversationSignal;
using SharedCallback = std::shared_ptr<DRing::CallbackWrapperBase>;
using SharedCallback = std::shared_ptr<libjami::CallbackWrapperBase>;
auto callM = callManager_.get();
auto confM = configurationManager_.get();
auto presM = presenceManager_.get();
#ifdef ENABLE_VIDEO
using DRing::VideoSignal;
using libjami::VideoSignal;
auto videoM = videoManager_.get();
#endif
......@@ -335,28 +335,28 @@ DBusClient::initLibrary(int flags)
#ifdef ENABLE_PLUGIN
// Plugin event handlers
const std::map<std::string, SharedCallback> pluginEvHandlers = {
exportable_callback<DRing::PluginSignal::WebViewMessageReceived>(
exportable_callback<libjami::PluginSignal::WebViewMessageReceived>(
bind(&DBusPluginManagerInterface::webViewMessageReceived, pluginM, _1, _2, _3, _4)),
};
#endif
if (!DRing::init(static_cast<DRing::InitFlag>(flags)))
if (!libjami::init(static_cast<libjami::InitFlag>(flags)))
return -1;
DRing::registerSignalHandlers(callEvHandlers);
DRing::registerSignalHandlers(configEvHandlers);
DRing::registerSignalHandlers(presEvHandlers);
DRing::registerSignalHandlers(audioEvHandlers);
DRing::registerSignalHandlers(dataXferEvHandlers);
DRing::registerSignalHandlers(convEvHandlers);
libjami::registerSignalHandlers(callEvHandlers);
libjami::registerSignalHandlers(configEvHandlers);
libjami::registerSignalHandlers(presEvHandlers);
libjami::registerSignalHandlers(audioEvHandlers);
libjami::registerSignalHandlers(dataXferEvHandlers);
libjami::registerSignalHandlers(convEvHandlers);
#ifdef ENABLE_VIDEO
DRing::registerSignalHandlers(videoEvHandlers);
libjami::registerSignalHandlers(videoEvHandlers);
#endif
#ifdef ENABLE_PLUGIN
DRing::registerSignalHandlers(pluginEvHandlers);
libjami::registerSignalHandlers(pluginEvHandlers);
#endif
if (!DRing::start())
if (!libjami::start())