Commit 2130f067 authored by Adrien Béraud's avatar Adrien Béraud

sources: rename to jami

* rename namespace from ring to jami
* rename logs methods from RING_* to JAMI_*
* rename RING_VIDEO to ENABLE_VIDEO

Change-Id: Ic98498652d7059fafe58a96220d565bcdfa53658
parent 997147fc
......@@ -169,7 +169,7 @@ your system. */
/* #undef PTHREAD_CREATE_JOINABLE */
/* Video support enabled */
#define RING_VIDEO /**/
#define ENABLE_VIDEO /**/
/* Name directory service support enabled */
#define HAVE_RINGNS 1
......
......@@ -11,7 +11,7 @@ BUILT_SOURCES+=dbuspresencemanager.adaptor.h
dbuspresencemanager.adaptor.h: cx.ring.Ring.PresenceManager.xml Makefile.am
dbusxx-xml2cpp $< --adaptor=$@
if RING_VIDEO
if ENABLE_VIDEO
BUILT_SOURCES+=dbusvideomanager.adaptor.h
dbusvideomanager.adaptor.h: cx.ring.Ring.VideoManager.xml Makefile.am
dbusxx-xml2cpp $< --adaptor=$@
......@@ -43,7 +43,7 @@ libclient_dbus_la_SOURCES = \
dbuspresencemanager.h \
$(BUILT_SOURCES)
if RING_VIDEO
if ENABLE_VIDEO
libclient_dbus_la_SOURCES += dbusvideomanager.cpp dbusvideomanager.h
endif
......@@ -66,7 +66,7 @@ interface_DATA = cx.ring.Ring.CallManager.xml \
cx.ring.Ring.Instance.xml \
cx.ring.Ring.PresenceManager.xml
if RING_VIDEO
if ENABLE_VIDEO
interface_DATA += cx.ring.Ring.VideoManager.xml
endif
......
......@@ -44,7 +44,7 @@
#include "datatransfer_interface.h"
#ifdef RING_VIDEO
#ifdef ENABLE_VIDEO
#include "dbusvideomanager.h"
#include "videomanager_interface.h"
#endif
......@@ -85,7 +85,7 @@ DBusClient::DBusClient(int flags, bool persistent)
instanceManager_.reset(new DBusInstance {sessionConnection, onNoMoreClientFunc});
#ifdef RING_VIDEO
#ifdef ENABLE_VIDEO
videoManager_.reset(new DBusVideoManager {sessionConnection});
#endif
} catch (const DBus::Error &err) {
......@@ -103,7 +103,7 @@ DBusClient::~DBusClient()
// instances destruction order is important
// so we enforce it here
#ifdef RING_VIDEO
#ifdef ENABLE_VIDEO
videoManager_.reset();
#endif
instanceManager_.reset();
......@@ -131,7 +131,7 @@ DBusClient::initLibrary(int flags)
auto confM = configurationManager_.get();
auto presM = presenceManager_.get();
#ifdef RING_VIDEO
#ifdef ENABLE_VIDEO
using DRing::VideoSignal;
auto videoM = videoManager_.get();
#endif
......@@ -208,7 +208,7 @@ DBusClient::initLibrary(int flags)
exportable_callback<DataTransferSignal::DataTransferEvent>(bind(&DBusConfigurationManager::dataTransferEvent, confM, _1, _2)),
};
#ifdef RING_VIDEO
#ifdef ENABLE_VIDEO
// Video event handlers
const std::map<std::string, SharedCallback> videoEvHandlers = {
exportable_callback<VideoSignal::DeviceEvent>(bind(&DBusVideoManager::deviceEvent, videoM)),
......@@ -225,7 +225,7 @@ DBusClient::initLibrary(int flags)
registerSignalHandlers(presEvHandlers);
registerSignalHandlers(audioEvHandlers);
registerSignalHandlers(dataXferEvHandlers);
#ifdef RING_VIDEO
#ifdef ENABLE_VIDEO
registerSignalHandlers(videoEvHandlers);
#endif
......
......@@ -35,7 +35,7 @@ class DBusNetworkManager;
class DBusInstance;
class DBusPresenceManager;
#ifdef RING_VIDEO
#ifdef ENABLE_VIDEO
class DBusVideoManager;
#endif
......@@ -64,7 +64,7 @@ class DRING_PUBLIC DBusClient {
std::unique_ptr<DBusPresenceManager> presenceManager_;
std::unique_ptr<DBusInstance> instanceManager_;
#ifdef RING_VIDEO
#ifdef ENABLE_VIDEO
std::unique_ptr<DBusVideoManager> videoManager_;
#endif
};
......@@ -27,11 +27,11 @@ JavaVM *gJavaVM;
const char *kringservicePath = "cx/ring/daemon/RingserviceJNI";
void deinitClassHelper(JNIEnv *env, jobject obj) {
RING_INFO("deinitClassHelper");
JAMI_INFO("deinitClassHelper");
/* delete cached object instances */
env->DeleteGlobalRef(obj);
RING_INFO("deinitClassHelper: object %p deleted", obj);
JAMI_INFO("deinitClassHelper: object %p deleted", obj);
}
JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved) {
......@@ -39,26 +39,26 @@ JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved) {
jclass clazz;
jint r;
RING_INFO("JNI_OnLoad");
JAMI_INFO("JNI_OnLoad");
if (av_jni_set_java_vm(vm, reserved)) {
RING_ERR("JNI_OnLoad: av_jni_set_java_vm failed");
JAMI_ERR("JNI_OnLoad: av_jni_set_java_vm failed");
}
//Assume it is c++
r = vm->GetEnv ((void **) &env, JNI_VERSION_1_6);
if (r != JNI_OK) {
RING_ERR("JNI_OnLoad: failed to get the environment using GetEnv()");
JAMI_ERR("JNI_OnLoad: failed to get the environment using GetEnv()");
return -1;
}
RING_INFO("JNI_Onload: GetEnv %p", env);
JAMI_INFO("JNI_Onload: GetEnv %p", env);
clazz = env->FindClass (kringservicePath);
if (!clazz) {
RING_ERR("JNI_Onload: whoops, %s class not found!", kringservicePath);
JAMI_ERR("JNI_Onload: whoops, %s class not found!", kringservicePath);
}
gJavaVM = vm;
RING_INFO("JNI_Onload: JavaVM %p", gJavaVM);
JAMI_INFO("JNI_Onload: JavaVM %p", gJavaVM);
/* put instances of class object we need into cache */
//initClassHelper(env, kManagerPath, &gManagerObject);
......@@ -77,24 +77,24 @@ void JNI_OnUnLoad(JavaVM* vm, void* reserved) {
JNIEnv* env;
jclass clazz;
RING_INFO("JNI_OnUnLoad");
JAMI_INFO("JNI_OnUnLoad");
/* get env */
if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
RING_ERR("JNI_OnUnLoad: failed to get the environment using GetEnv()");
JAMI_ERR("JNI_OnUnLoad: failed to get the environment using GetEnv()");
return;
}
RING_INFO("JNI_OnUnLoad: GetEnv %p", env);
JAMI_INFO("JNI_OnUnLoad: GetEnv %p", env);
/* Get jclass with env->FindClass */
clazz = env->FindClass(kringservicePath);
if (!clazz) {
RING_ERR("JNI_OnUnLoad: whoops, %s class not found!", kringservicePath);
JAMI_ERR("JNI_OnUnLoad: whoops, %s class not found!", kringservicePath);
}
/* remove instances of class object we need into cache */
//deinitClassHelper(env, gManagerObject);
env->UnregisterNatives(clazz);
RING_INFO("JNI_OnUnLoad: Native functions unregistered");
JAMI_INFO("JNI_OnUnLoad: Native functions unregistered");
}
......@@ -56,7 +56,7 @@ print_title()
<< "Jami Daemon " << DRing::version()
<< ", by Savoir-faire Linux 2004-2019" << std::endl
<< "https://jami.net/" << std::endl
#ifdef RING_VIDEO
#ifdef ENABLE_VIDEO
<< "[Video support enabled]" << std::endl
#endif
<< std::endl;
......@@ -191,7 +191,7 @@ main(int argc, char *argv [])
std::vector<char> writable(programName.size() + 1);
std::copy(programName.begin(), programName.end(), writable.begin());
ring::fileutils::set_program_dir(writable.data());
jami::fileutils::set_program_dir(writable.data());
#ifdef TOP_BUILDDIR
if (!getenv("CODECS_PATH"))
......
......@@ -31,7 +31,7 @@
#include "callmanager_interface.h"
#include "configurationmanager_interface.h"
#include "presencemanager_interface.h"
#ifdef RING_VIDEO
#ifdef ENABLE_VIDEO
#include "videomanager_interface.h"
#endif
#include "fileutils.h"
......@@ -45,7 +45,7 @@ print_title()
<< "Jami Daemon " << DRing::version()
<< ", by Savoir-faire Linux 2004-2019" << std::endl
<< "https://jami.net/" << std::endl
#ifdef RING_VIDEO
#ifdef ENABLE_VIDEO
<< "[Video support enabled]" << std::endl
#endif
<< std::endl;
......@@ -197,7 +197,7 @@ main(int argc, char *argv [])
std::vector<char> writable(programName.size() + 1);
std::copy(programName.begin(), programName.end(), writable.begin());
ring::fileutils::set_program_dir(writable.data());
jami::fileutils::set_program_dir(writable.data());
#ifdef TOP_BUILDDIR
if (!getenv("CODECS_PATH"))
......
......@@ -35,7 +35,7 @@ RestClient::RestClient(int port, int flags, bool persistent) :
settings_ = std::make_shared<restbed::Settings>();
settings_->set_port(port);
settings_->set_default_header( "Connection", "close" );
RING_INFO("Restclient running on port [%d]", port);
JAMI_INFO("Restclient running on port [%d]", port);
// Make it run in a thread, because this is a blocking function
restbed = std::thread([this](){
......@@ -45,7 +45,7 @@ RestClient::RestClient(int port, int flags, bool persistent) :
RestClient::~RestClient()
{
RING_INFO("destroying RestClient");
JAMI_INFO("destroying RestClient");
exit();
}
......@@ -53,7 +53,7 @@ int
RestClient::event_loop() noexcept
{
// While the client is running, the events are polled every 10 milliseconds
RING_INFO("Restclient starting to poll events");
JAMI_INFO("Restclient starting to poll events");
while(!pollNoMore_)
{
std::this_thread::sleep_for(std::chrono::milliseconds(50));
......@@ -96,7 +96,7 @@ RestClient::initLib(int flags)
auto confM = configurationManager_.get();
#ifdef RING_VIDEO
#ifdef ENABLE_VIDEO
using DRing::VideoSignal;
#endif
......@@ -125,11 +125,11 @@ RestClient::initLib(int flags)
const std::map<std::string, SharedCallback> configEvHandlers = {
exportable_callback<ConfigurationSignal::IncomingAccountMessage>([]
(const std::string& accountID, const std::string& from, const std::map<std::string, std::string>& payloads){
RING_INFO("accountID : %s", accountID.c_str());
RING_INFO("from : %s", from.c_str());
RING_INFO("payloads");
JAMI_INFO("accountID : %s", accountID.c_str());
JAMI_INFO("from : %s", from.c_str());
JAMI_INFO("payloads");
for(auto& it : payloads)
RING_INFO("%s : %s", it.first.c_str(), it.second.c_str());
JAMI_INFO("%s : %s", it.first.c_str(), it.second.c_str());
}),
registeredNameFoundCb,
......@@ -143,7 +143,7 @@ RestClient::initLib(int flags)
// Dummy callbacks are registered for the other managers
registerSignalHandlers(std::map<std::string, std::shared_ptr<DRing::CallbackWrapperBase>>());
registerSignalHandlers(std::map<std::string, std::shared_ptr<DRing::CallbackWrapperBase>>());
#ifdef RING_VIDEO
#ifdef ENABLE_VIDEO
registerSignalHandlers(std::map<std::string, std::shared_ptr<DRing::CallbackWrapperBase>>());
#endif
......@@ -170,7 +170,7 @@ RestClient::initResources()
default_res->set_path("/");
default_res->set_method_handler("GET", [](const std::shared_ptr<restbed::Session> session){
RING_INFO("[%s] GET /", session->get_origin().c_str());
JAMI_INFO("[%s] GET /", session->get_origin().c_str());
std::string body = "Available routes are : \r\n/configurationManager\r\n/videoManager\r\n";
......
......@@ -35,7 +35,7 @@
#include "dring/callmanager_interface.h"
#include "dring/configurationmanager_interface.h"
#include "dring/presencemanager_interface.h"
#ifdef RING_VIDEO
#ifdef ENABLE_VIDEO
#include "dring/videomanager_interface.h"
#endif
#include "logger.h"
......
......@@ -405,7 +405,7 @@ RestConfigurationManager::populateResources()
void
RestConfigurationManager::defaultRoute(const std::shared_ptr<restbed::Session> session)
{
RING_INFO("[%s] GET /configurationManager", session->get_origin().c_str());
JAMI_INFO("[%s] GET /configurationManager", session->get_origin().c_str());
std::string body = "Available routes are : \r\n";
body += "GET /accountDetails/{accountID: [a-z0-9]*}\r\n";
......@@ -487,7 +487,7 @@ RestConfigurationManager::getAccountDetails(const std::shared_ptr<restbed::Sessi
const auto request = session->get_request();
const std::string accountID = request->get_path_parameter("accountID");
RING_INFO("[%s] GET /accountDetails/%s", session->get_origin().c_str(), accountID.c_str());
JAMI_INFO("[%s] GET /accountDetails/%s", session->get_origin().c_str(), accountID.c_str());
std::map<std::string, std::string> accountDetails = DRing::getAccountDetails(accountID);
......@@ -518,7 +518,7 @@ RestConfigurationManager::getVolatileAccountDetails(const std::shared_ptr<restbe
const auto request = session->get_request();
const std::string accountID = request->get_path_parameter("accountID");
RING_INFO("[%s] GET /volatileAccountDetails/%s", session->get_origin().c_str(), accountID.c_str());
JAMI_INFO("[%s] GET /volatileAccountDetails/%s", session->get_origin().c_str(), accountID.c_str());
std::map<std::string, std::string> volatileAccountDetails = DRing::getAccountDetails(accountID);
......@@ -551,16 +551,16 @@ RestConfigurationManager::setAccountDetails(const std::shared_ptr<restbed::Sessi
size_t content_length = 0;
request->get_header("Content-Length", content_length);
RING_INFO("[%s] POST /setAccountDetails/%s", session->get_origin().c_str(), accountID.c_str());
JAMI_INFO("[%s] POST /setAccountDetails/%s", session->get_origin().c_str(), accountID.c_str());
session->fetch(content_length, [this, request, accountID](const std::shared_ptr<restbed::Session> session, const restbed::Bytes & body)
{
std::string data(std::begin(body), std::end(body));
std::map<std::string, std::string> details = parsePost(data);
RING_DBG("Details received");
JAMI_DBG("Details received");
for(auto& it : details)
RING_DBG("%s : %s", it.first.c_str(), it.second.c_str());
JAMI_DBG("%s : %s", it.first.c_str(), it.second.c_str());
DRing::setAccountDetails(accountID, details);
......@@ -575,16 +575,16 @@ RestConfigurationManager::registerName(const std::shared_ptr<restbed::Session> s
const std::string accountID = request->get_path_parameter("accountID");
size_t content_length = request->get_header("Content-Length", 0);
RING_INFO("[%s] POST /registerName/%s", session->get_origin().c_str(), accountID.c_str());
JAMI_INFO("[%s] POST /registerName/%s", session->get_origin().c_str(), accountID.c_str());
if(content_length > 0){
session->fetch(content_length, [this, request, accountID](const std::shared_ptr<restbed::Session> session, const restbed::Bytes & body)
{
std::string data(std::begin(body), std::end(body));
std::map<std::string, std::string> details = parsePost(data);
RING_DBG("Details received");
JAMI_DBG("Details received");
for(auto& it : details)
RING_DBG("%s : %s", it.first.c_str(), it.second.c_str());
JAMI_DBG("%s : %s", it.first.c_str(), it.second.c_str());
if (details.find("password") == details.end() ){
session->close(400, "password parameter required");
......@@ -631,7 +631,7 @@ RestConfigurationManager::lookupName(const std::shared_ptr<restbed::Session> ses
const auto request = session->get_request();
const std::string name = request->get_path_parameter("name");
RING_WARN("[%s] GET /lookupName/%s", session->get_origin().c_str(), name.c_str());
JAMI_WARN("[%s] GET /lookupName/%s", session->get_origin().c_str(), name.c_str());
addPendingNameResolutions(name, session);
DRing::lookupName("", "", name);
......@@ -646,7 +646,7 @@ RestConfigurationManager::setAccountActive(const std::shared_ptr<restbed::Sessio
const std::string accountID = request->get_path_parameter("accountID");
const bool active = (request->get_path_parameter("status") == "true" ? true : false);
RING_INFO("[%s] GET /setAccountActive/%s/%s", session->get_origin().c_str(), accountID.c_str(), (active ? "true" : "false"));
JAMI_INFO("[%s] GET /setAccountActive/%s/%s", session->get_origin().c_str(), accountID.c_str(), (active ? "true" : "false"));
DRing::setAccountActive(accountID, active);
......@@ -659,7 +659,7 @@ RestConfigurationManager::getAccountTemplate(const std::shared_ptr<restbed::Sess
const auto request = session->get_request();
const std::string accountType = request->get_path_parameter("type");
RING_INFO("[%s] GET /accountTemplate/%s", session->get_origin().c_str(), accountType.c_str());
JAMI_INFO("[%s] GET /accountTemplate/%s", session->get_origin().c_str(), accountType.c_str());
std::map<std::string, std::string> accountTemplate = DRing::getAccountTemplate(accountType);;
......@@ -684,16 +684,16 @@ RestConfigurationManager::addAccount(const std::shared_ptr<restbed::Session> ses
size_t content_length = 0;
request->get_header("Content-Length", content_length);
RING_INFO("[%s] POST /addAccount", session->get_origin().c_str());
JAMI_INFO("[%s] POST /addAccount", session->get_origin().c_str());
session->fetch(content_length, [this, request](const std::shared_ptr<restbed::Session> session, const restbed::Bytes & body)
{
std::string data(std::begin(body), std::end(body));
std::map<std::string, std::string> details = parsePost(data);
RING_DBG("Details received");
JAMI_DBG("Details received");
for(auto& it : details)
RING_DBG("%s : %s", it.first.c_str(), it.second.c_str());
JAMI_DBG("%s : %s", it.first.c_str(), it.second.c_str());
DRing::addAccount(details);
......@@ -707,7 +707,7 @@ RestConfigurationManager::removeAccount(const std::shared_ptr<restbed::Session>
const auto request = session->get_request();
const std::string accountID = request->get_path_parameter("accountID");
RING_INFO("[%s] GET /removeAccount/%s", session->get_origin().c_str(), accountID.c_str());
JAMI_INFO("[%s] GET /removeAccount/%s", session->get_origin().c_str(), accountID.c_str());
DRing::removeAccount(accountID);
......@@ -719,7 +719,7 @@ RestConfigurationManager::removeAccount(const std::shared_ptr<restbed::Session>
void
RestConfigurationManager::getAccountList(const std::shared_ptr<restbed::Session> session)
{
RING_INFO("[%s] GET /accountList", session->get_origin().c_str());
JAMI_INFO("[%s] GET /accountList", session->get_origin().c_str());
std::vector<std::string> accountList = DRing::getAccountList();
......@@ -750,7 +750,7 @@ RestConfigurationManager::sendRegister(const std::shared_ptr<restbed::Session> s
const std::string accountID = request->get_path_parameter("accountID");
const bool enable = (request->get_path_parameter("status") == "true" ? true : false);
RING_INFO("[%s] GET /sendRegister/%s/%s", session->get_origin().c_str(), accountID.c_str(), (enable ? "true" : "false"));
JAMI_INFO("[%s] GET /sendRegister/%s/%s", session->get_origin().c_str(), accountID.c_str(), (enable ? "true" : "false"));
DRing::sendRegister(accountID, enable);
......@@ -760,7 +760,7 @@ RestConfigurationManager::sendRegister(const std::shared_ptr<restbed::Session> s
void
RestConfigurationManager::registerAllAccounts(const std::shared_ptr<restbed::Session> session)
{
RING_INFO("[%s] GET /registerAllAccounts", session->get_origin().c_str());
JAMI_INFO("[%s] GET /registerAllAccounts", session->get_origin().c_str());
DRing::registerAllAccounts();
......@@ -777,15 +777,15 @@ RestConfigurationManager::sendTextMessage(const std::shared_ptr<restbed::Session
size_t content_length = 0;
request->get_header("Content-Length", content_length);
RING_INFO("[%s] POST /sendTextMessage/%s/%s", session->get_origin().c_str(), accountID.c_str(), to.c_str());
JAMI_INFO("[%s] POST /sendTextMessage/%s/%s", session->get_origin().c_str(), accountID.c_str(), to.c_str());
session->fetch(content_length, [this, request, accountID, to](const std::shared_ptr<restbed::Session> session, const restbed::Bytes & body)
{
std::string data(std::begin(body), std::end(body));
std::map<std::string, std::string> payloads = parsePost(data);
RING_DBG("Payloads received");
JAMI_DBG("Payloads received");
for(auto& it : payloads)
RING_DBG("%s : %s", it.first.c_str(), it.second.c_str());
JAMI_DBG("%s : %s", it.first.c_str(), it.second.c_str());
DRing::sendAccountTextMessage(accountID, to, payloads);
......@@ -799,25 +799,25 @@ RestConfigurationManager::getMessageStatus(const std::shared_ptr<restbed::Sessio
const auto request = session->get_request();
const std::string id = request->get_path_parameter("id");
RING_INFO("[%s] GET /messageStatus/%s", session->get_origin().c_str(), id.c_str());
JAMI_INFO("[%s] GET /messageStatus/%s", session->get_origin().c_str(), id.c_str());
const std::uint64_t status = DRing::getMessageStatus(std::stoull(id));
std::string body = "";
if (status != static_cast<int>(ring::im::MessageStatus::UNKNOWN)) {
if (status != static_cast<int>(jami::im::MessageStatus::UNKNOWN)) {
switch (status) {
case static_cast<int>(ring::im::MessageStatus::IDLE):
case static_cast<int>(ring::im::MessageStatus::SENDING):
case static_cast<int>(jami::im::MessageStatus::IDLE):
case static_cast<int>(jami::im::MessageStatus::SENDING):
body = "SENDING";
break;
case static_cast<int>(ring::im::MessageStatus::SENT):
case static_cast<int>(jami::im::MessageStatus::SENT):
body = "SENT";
break;
case static_cast<int>(ring::im::MessageStatus::READ):
case static_cast<int>(jami::im::MessageStatus::READ):
body = "READ";
break;
case static_cast<int>(ring::im::MessageStatus::FAILURE):
case static_cast<int>(jami::im::MessageStatus::FAILURE):
body = "FAILURE";
break;
default:
......@@ -843,7 +843,7 @@ RestConfigurationManager::getMessageStatus(const std::shared_ptr<restbed::Sessio
void
RestConfigurationManager::getTlsDefaultSettings(const std::shared_ptr<restbed::Session> session)
{
RING_INFO("[%s] GET /tlsDefaultSettings", session->get_origin().c_str());
JAMI_INFO("[%s] GET /tlsDefaultSettings", session->get_origin().c_str());
std::map<std::string, std::string> tlsDefault = DRing::getTlsDefaultSettings();
......@@ -864,7 +864,7 @@ RestConfigurationManager::getTlsDefaultSettings(const std::shared_ptr<restbed::S
void
RestConfigurationManager::getCodecList(const std::shared_ptr<restbed::Session> session)
{
RING_INFO("[%s] GET /codecList", session->get_origin().c_str());
JAMI_INFO("[%s] GET /codecList", session->get_origin().c_str());
std::vector<unsigned> codec = DRing::getCodecList();
......@@ -885,7 +885,7 @@ RestConfigurationManager::getCodecList(const std::shared_ptr<restbed::Session> s
void
RestConfigurationManager::getSupportedTlsMethod(const std::shared_ptr<restbed::Session> session)
{
RING_INFO("[%s] GET /supportedTlsMethod", session->get_origin().c_str());
JAMI_INFO("[%s] GET /supportedTlsMethod", session->get_origin().c_str());
std::vector<std::string> supported = DRing::getSupportedTlsMethod();
......@@ -909,7 +909,7 @@ RestConfigurationManager::getSupportedCiphers(const std::shared_ptr<restbed::Ses
const auto request = session->get_request();
const std::string accountID = request->get_path_parameter("accountID");
RING_INFO("[%s] GET /supportedCiphers/%s", session->get_origin().c_str(), accountID.c_str());
JAMI_INFO("[%s] GET /supportedCiphers/%s", session->get_origin().c_str(), accountID.c_str());
std::vector<std::string> supported = DRing::getSupportedCiphers(accountID);
......@@ -934,7 +934,7 @@ RestConfigurationManager::getCodecDetails(const std::shared_ptr<restbed::Session
const std::string accountID = request->get_path_parameter("accountID");
const std::string codecID = request->get_path_parameter("codecID");
RING_INFO("[%s] GET /codecDetails/%s/%s", session->get_origin().c_str(), accountID.c_str(), codecID.c_str());
JAMI_INFO("[%s] GET /codecDetails/%s/%s", session->get_origin().c_str(), accountID.c_str(), codecID.c_str());
std::map<std::string, std::string> details = DRing::getCodecDetails(accountID, std::stoi(codecID));
......@@ -962,16 +962,16 @@ RestConfigurationManager::setCodecDetails(const std::shared_ptr<restbed::Session
size_t content_length = 0;
request->get_header("Content-Length", content_length);
RING_INFO("[%s] POST /setCodecDetails/%s/%s", session->get_origin().c_str(), accountID.c_str(), codecID.c_str());
JAMI_INFO("[%s] POST /setCodecDetails/%s/%s", session->get_origin().c_str(), accountID.c_str(), codecID.c_str());
session->fetch(content_length, [this, request, accountID, codecID](const std::shared_ptr<restbed::Session> session, const restbed::Bytes & body)
{
std::string data(std::begin(body), std::end(body));
std::map<std::string, std::string> details = parsePost(data);
RING_DBG("Details received");
JAMI_DBG("Details received");
for(auto& it : details)
RING_DBG("%s : %s", it.first.c_str(), it.second.c_str());
JAMI_DBG("%s : %s", it.first.c_str(), it.second.c_str());
DRing::setCodecDetails(accountID, std::stoi(codecID), details);
......@@ -985,7 +985,7 @@ RestConfigurationManager::getActiveCodecList(const std::shared_ptr<restbed::Sess
const auto request = session->get_request();
const std::string accountID = request->get_path_parameter("accountID");
RING_INFO("[%s] GET /activeCodecList/%s", session->get_origin().c_str(), accountID.c_str());
JAMI_INFO("[%s] GET /activeCodecList/%s", session->get_origin().c_str(), accountID.c_str());
std::vector<unsigned> codecs = DRing::getActiveCodecList(accountID);
......@@ -1014,7 +1014,7 @@ RestConfigurationManager::setActiveCodecList(const std::string& accountID, const
void
RestConfigurationManager::getAudioPluginList(const std::shared_ptr<restbed::Session> session)
{
RING_INFO("[%s] GET /audioPluginList", session->get_origin().c_str());
JAMI_INFO("[%s] GET /audioPluginList", session->get_origin().c_str());
std::vector<std::string> list = DRing::getAudioPluginList();
......@@ -1038,7 +1038,7 @@ RestConfigurationManager::setAudioPlugin(const std::shared_ptr<restbed::Session>
const auto request = session->get_request();
const std::string plugin = request->get_path_parameter("plugin");
RING_INFO("[%s] GET /setAudioPlugin/%s", session->get_origin().c_str(), plugin.c_str());
JAMI_INFO("[%s] GET /setAudioPlugin/%s", session->get_origin().c_str(), plugin.c_str());
DRing::setAudioPlugin(plugin);
......@@ -1048,7 +1048,7 @@ RestConfigurationManager::setAudioPlugin(const std::shared_ptr<restbed::Session>
void
RestConfigurationManager::getAudioOutputDeviceList(const std::shared_ptr<restbed::Session> session)