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"
......
This diff is collapsed.
......@@ -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"
......
......@@ -92,7 +92,7 @@ RestVideoManager::populateResources()
void
RestVideoManager::defaultRoute(const std::shared_ptr<restbed::Session> session)
{
RING_INFO("[%s] GET /videoManager", session->get_origin().c_str());
JAMI_INFO("[%s] GET /videoManager", session->get_origin().c_str());
std::string body = "Available routes are : \r\n";
......@@ -107,7 +107,7 @@ RestVideoManager::defaultRoute(const std::shared_ptr<restbed::Session> session)
void RestVideoManager::getDeviceList(const std::shared_ptr<restbed::Session> session)
{
RING_INFO("[%s] GET /deviceList", session->get_origin().c_str());
JAMI_INFO("[%s] GET /deviceList", session->get_origin().c_str());
std::vector<std::string> list = DRing::getDeviceList();
std::string body = "";
......
......@@ -33,7 +33,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"
......
......@@ -29,7 +29,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"
......@@ -49,7 +49,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;
......@@ -213,7 +213,7 @@ main(int argc, char *argv [])
std::vector<char> writable(programName.size() + 1);
std::copy(std::begin(programName), std::end(programName),std::begin(writable));
ring::fileutils::set_program_dir(writable.data());
jami::fileutils::set_program_dir(writable.data());
print_title();
......
......@@ -481,15 +481,15 @@ AC_ARG_ENABLE([video], AS_HELP_STRING([--disable-video], [Disable video]))
AS_IF([test "x$enable_video" != "xno"],
[
AC_DEFINE(RING_VIDEO, [], [Video support enabled])
AM_CONDITIONAL(RING_VIDEO, true)
AC_DEFINE(ENABLE_VIDEO, [], [Video support enabled])
AM_CONDITIONAL(ENABLE_VIDEO, true)
AS_IF([test "$SYS" = linux && test -z "${HAVE_ANDROID_FALSE}"],[
PKG_CHECK_MODULES(UDEV, libudev,, AC_MSG_ERROR([Missing libudev development files]))
],[
])
],
[
AM_CONDITIONAL(RING_VIDEO, false)
AM_CONDITIONAL(ENABLE_VIDEO, false)
]);
AC_ARG_ENABLE([accel], AS_HELP_STRING([--disable-accel], [Disable all hardware accelerations (enabled by default)]))
......@@ -527,7 +527,7 @@ AS_IF([test "x$enable_video" != "xno" -a "x$enable_accel" != "xno"], [
AC_CHECK_HEADER([VideoToolbox/VideoToolbox.h], [
AC_CHECK_HEADER([libavcodec/videotoolbox.h], [
ring_vt="yes"
AC_DEFINE([RING_VIDEOTOOLBOX], [1], [Defined if videotoolbox is available])
AC_DEFINE([ENABLE_VIDEOTOOLBOX], [1], [Defined if videotoolbox is available])
])
])
])
......@@ -536,7 +536,7 @@ AS_IF([test "x$enable_video" != "xno" -a "x$enable_accel" != "xno"], [
AM_CONDITIONAL([RING_ACCEL], [test "x${ring_accel}" = "xyes"])
AM_CONDITIONAL([RING_VAAPI], [test "x${ring_vaapi}" = "xyes"])
AM_CONDITIONAL([RING_VDPAU], [test "x${ring_vdpau}" = "xyes"])
AM_CONDITIONAL([RING_VIDEOTOOLBOX], [test "x${ring_vt}" = "xyes"])
AM_CONDITIONAL([ENABLE_VIDEOTOOLBOX], [test "x${ring_vt}" = "xyes"])
dnl check for GnuTLS
PKG_CHECK_MODULES([GNUTLS], [gnutls >= 3.4.14], [HAVE_GNUTLS=1], [HAVE_GNUTLS=0])
......
include ../globals.mk
RING_VIDEO_LIBS=
ENABLE_VIDEO_LIBS=
if RING_VIDEO
RING_VIDEO_LIBS+=./media/video/libvideo.la
if ENABLE_VIDEO
ENABLE_VIDEO_LIBS+=./media/video/libvideo.la
if HAVE_LINUX
if HAVE_ANDROID
RING_VIDEO_LIBS+= \
ENABLE_VIDEO_LIBS+= \
./media/video/androidvideo/libandroidvideo.la
else
RING_VIDEO_LIBS+= \
ENABLE_VIDEO_LIBS+= \
./media/video/v4l2/libv4l2.la
endif
endif
if HAVE_OSX
RING_VIDEO_LIBS+= \
ENABLE_VIDEO_LIBS+= \
./media/video/osxvideo/libosxvideo.la
endif
if HAVE_IOS
RING_VIDEO_LIBS+= \
ENABLE_VIDEO_LIBS+= \
./media/video/iosvideo/libiosvideo.la
endif
if HAVE_WIN32
RING_VIDEO_LIBS+= \
ENABLE_VIDEO_LIBS+= \
./media/video/winvideo/libwinvideo.la
endif
endif
SUBDIRS = client media config hooks sip upnp security ringdht im $(RING_VIDEO_SUBDIR)
SUBDIRS = client media config hooks sip upnp security ringdht im $(ENABLE_VIDEO_SUBDIR)
# libring
......@@ -43,7 +43,7 @@ libring_la_LIBADD = \
./upnp/libupnpcontrol.la \
./ringdht/libringacc.la \
./im/libim.la \
$(RING_VIDEO_LIBS)
$(ENABLE_VIDEO_LIBS)
libring_la_LDFLAGS = \
@PJPROJECT_LIBS@ \
......@@ -167,7 +167,7 @@ nobase_include_HEADERS= dring/dring.h \
dring/media_const.h \
dring/def.h
if RING_VIDEO
if ENABLE_VIDEO
nobase_include_HEADERS+= \
dring/videomanager_interface.h
endif
......@@ -29,7 +29,7 @@
#include <iterator>
#include <mutex>
#ifdef RING_VIDEO
#ifdef ENABLE_VIDEO
#include "libav_utils.h"
#endif
......@@ -58,7 +58,7 @@ using random_device = dht::crypto::random_device;
#include "compiler_intrinsics.h"
#include "dring/account_const.h"
namespace ring {
namespace jami {
const char * const Account::ALL_CODECS_KEY = "allCodecs";
const char * const Account::VIDEO_CODEC_ENABLED = "enabled";
......@@ -306,7 +306,7 @@ Account::getAccountDetails() const
{Conf::CONFIG_ACCOUNT_USERAGENT, hasCustomUserAgent_ ? userAgent_ : DEFAULT_USER_AGENT},
{Conf::CONFIG_ACCOUNT_HAS_CUSTOM_USERAGENT, hasCustomUserAgent_ ? userAgent_ : DEFAULT_USER_AGENT},
{Conf::CONFIG_ACCOUNT_AUTOANSWER, autoAnswerEnabled_ ? TRUE_STR : FALSE_STR},
{DRing::Account::ConfProperties::ACTIVE_CALL_LIMIT, ring::to_string(activeCallLimit_)},
{DRing::Account::ConfProperties::ACTIVE_CALL_LIMIT, jami::to_string(activeCallLimit_)},
{Conf::CONFIG_RINGTONE_ENABLED, ringtoneEnabled_ ? TRUE_STR : FALSE_STR},
{Conf::CONFIG_RINGTONE_PATH, ringtonePath_},
{Conf::CONFIG_UPNP_ENABLED, upnp_ ? TRUE_STR : FALSE_STR}
......@@ -357,11 +357,11 @@ Account::setActiveCodecs(const std::vector<unsigned>& list)
});
if (!hasActiveCodec(MEDIA_AUDIO)) {
RING_WARN("All audio codecs disabled, enabling all");
JAMI_WARN("All audio codecs disabled, enabling all");
setAllCodecsActive(MEDIA_AUDIO, true);
}
if (!hasActiveCodec(MEDIA_VIDEO)) {
RING_WARN("All video codecs disabled, enabling all");
JAMI_WARN("All video codecs disabled, enabling all");
setAllCodecsActive(MEDIA_VIDEO, true);
}
}
......@@ -401,14 +401,14 @@ Account::getDefaultCodecsId()
std::map<std::string, std::string>
Account::getDefaultCodecDetails(const unsigned& codecId)
{
auto codec = ring::getSystemCodecContainer()->searchCodecById(codecId, ring::MEDIA_ALL);
auto codec = jami::getSystemCodecContainer()->searchCodecById(codecId, jami::MEDIA_ALL);
if (codec) {
if (codec->mediaType & ring::MEDIA_AUDIO) {
auto audioCodec = std::static_pointer_cast<ring::SystemAudioCodecInfo>(codec);
if (codec->mediaType & jami::MEDIA_AUDIO) {
auto audioCodec = std::static_pointer_cast<jami::SystemAudioCodecInfo>(codec);
return audioCodec->getCodecSpecifications();
}
if (codec->mediaType & ring::MEDIA_VIDEO) {
auto videoCodec = std::static_pointer_cast<ring::SystemVideoCodecInfo>(codec);
if (codec->mediaType & jami::MEDIA_VIDEO) {
auto videoCodec = std::static_pointer_cast<jami::SystemVideoCodecInfo>(codec);
return videoCodec->getCodecSpecifications();
}
}
......@@ -418,7 +418,7 @@ Account::getDefaultCodecDetails(const unsigned& codecId)
#define find_iter() \
const auto& iter = details.find(key); \
if (iter == details.end()) { \
RING_ERR("Couldn't find key \"%s\"", key); \
JAMI_ERR("Couldn't find key \"%s\"", key); \
return; \
}
......@@ -582,4 +582,4 @@ Account::getIceOptions() const noexcept
return opts;
}
} // namespace ring
} // namespace jami
......@@ -49,16 +49,16 @@
#include <mutex>
#include <chrono>
namespace ring { namespace upnp {
namespace jami { namespace upnp {
class Controller;
}} // namespace ring::upnp
}} // namespace jami::upnp
namespace YAML {
class Emitter;
class Node;
} // namespace YAML
namespace ring {
namespace jami {
class Call;
class SystemCodecContainer;
......@@ -344,7 +344,7 @@ class Account : public Serializable, public std::enable_shared_from_this<Account
parseInt(const std::map<std::string, std::string>& details, const char* key, T& i) {
const auto& iter = details.find(key);
if (iter == details.end()) {
RING_ERR("Couldn't find key \"%s\"", key);
JAMI_ERR("Couldn't find key \"%s\"", key);
return;
}
i = atoi(iter->second.c_str());
......@@ -480,7 +480,7 @@ class Account : public Serializable, public std::enable_shared_from_this<Account
/**
* UPnP IGD controller and the mutex to access it
*/
std::unique_ptr<ring::upnp::Controller> upnp_;
std::unique_ptr<jami::upnp::Controller> upnp_;
mutable std::mutex upnp_mtx {};
/**
......@@ -498,6 +498,6 @@ operator<< (std::ostream& os, const Account& acc)
return os;
}
} // namespace ring
} // namespace jami
#endif
......@@ -29,7 +29,7 @@
#include <stdexcept>
namespace ring {
namespace jami {
const char* const AccountFactory::DEFAULT_ACCOUNT_TYPE = SIPAccount::ACCOUNT_TYPE;
......@@ -37,10 +37,10 @@ AccountFactory::AccountFactory()
{
auto sipfunc = [](const std::string& id){ return std::make_shared<SIPAccount>(id, true); };
generators_.insert(std::make_pair(SIPAccount::ACCOUNT_TYPE, sipfunc));
RING_DBG("registered %s account", SIPAccount::ACCOUNT_TYPE);
JAMI_DBG("registered %s account", SIPAccount::ACCOUNT_TYPE);
auto dhtfunc = [](const std::string& id){ return std::make_shared<RingAccount>(id, false); };
generators_.insert(std::make_pair(RingAccount::ACCOUNT_TYPE, dhtfunc));
RING_DBG("registered %s account", RingAccount::ACCOUNT_TYPE);
JAMI_DBG("registered %s account", RingAccount::ACCOUNT_TYPE);
}
std::shared_ptr<Account>
......@@ -48,7 +48,7 @@ AccountFactory::createAccount(const char* const accountType,
const std::string& id)
{
if (hasAccount(id)) {
RING_ERR("Existing account %s", id.c_str());
JAMI_ERR("Existing account %s", id.c_str());
return nullptr;
}
......@@ -80,10 +80,10 @@ AccountFactory::removeAccount(Account& account)
std::lock_guard<std::recursive_mutex> lock(mutex_);
const auto& id = account.getAccountID();
RING_DBG("Removing account %s", id.c_str());
JAMI_DBG("Removing account %s", id.c_str());
auto& map = accountMaps_.at(account_type);
map.erase(id);