Unverified Commit ba3a411c authored by Maxim Cournoyer's avatar Maxim Cournoyer Committed by Maxim Cournoyer

daemon: Rename dring occurrences in code and file names to jamid.

Automated using the following commands:

  $ mv src/{dring,jami}
  $ git grep -l src/dring | xargs sed -i 's,src/dring,src/jami,g'
  $ git grep -l '#include "dring/' | \
    xargs sed -i 's,#include "dring/,#include "jami/,g'
  $ git grep -l 'dring.h' | xargs sed -i 's,dring.h,jami.h,g'

And finally,

  $ git grep -l 'dring' | xargs sed -i 's,dring,jami,g'

  $ files=$(find -name '*dring*' | sort)
  $ for f in $files; do mkdir -p "$(dirname "$f")"; \
      mv "$f" "$(echo $f | sed 's/dring/jami/g')"; done

To resolve a bad renaming favorably:

  $ git grep -l -i AlsaCarjami | \
    xargs sed -i -E 's/([Aa])lsaCarjami/\1lsaCardRingtone/g'

The above renaming command is not perfect, so some hand-tuning was
required to complete it.

* src/manager.cpp (Manager::ManagerPimpl::retrieveConfigPath):
Preserve the dring.yml configuration file name, until we add something
to migrate (rename) it to jami.yml.
* man/dring.pod: Delete.
* bin/dbus/jamid.pod: Move to ...
* man/jamid.pod: here.
* bin/dbus/meson.build (jamid_targets): Normalize man section to the
pre-existing 1 and adjust accordingly.
* src/jami/def.h (dring_EXPORTS): Rename to ...
(jami_EXPORTS): ... this.

change-Id: I9828be6da9c711ab2f22c4d1b9539fea89d7b6fb
parent 86a21e06
......@@ -14,7 +14,7 @@ add_subdirectory("src")
source_group("Source Files" FILES ${Source_Files})
source_group("Source Files\\client" FILES ${Source_Files__client})
source_group("Source Files\\config" FILES ${Source_Files__config})
source_group("Source Files\\dring" FILES ${Source_Files__dring})
source_group("Source Files\\jami" FILES ${Source_Files__jami})
source_group("Source Files\\hooks" FILES ${Source_Files__hooks})
source_group("Source Files\\im" FILES ${Source_Files__im})
source_group("Source Files\\jamidht" FILES ${Source_Files__jamidht})
......@@ -46,7 +46,7 @@ list (APPEND ALL_FILES
${Source_Files}
${Source_Files__client}
${Source_Files__config}
${Source_Files__dring}
${Source_Files__jami}
${Source_Files__hooks}
${Source_Files__im}
${Source_Files__jamidht}
......@@ -126,7 +126,7 @@ if(MSVC)
"${CMAKE_CURRENT_SOURCE_DIR}/src;"
"${CMAKE_CURRENT_SOURCE_DIR}/src/client;"
"${CMAKE_CURRENT_SOURCE_DIR}/src/config;"
"${CMAKE_CURRENT_SOURCE_DIR}/src/dring;"
"${CMAKE_CURRENT_SOURCE_DIR}/src/jami;"
"${CMAKE_CURRENT_SOURCE_DIR}/src/hooks;"
"${CMAKE_CURRENT_SOURCE_DIR}/src/im;"
"${CMAKE_CURRENT_SOURCE_DIR}/src/media;"
......
......@@ -17,12 +17,12 @@ EXTRA_DIST = m4/libtool.m4 \
contrib/src
coverage-html:
$(AM_V_at)lcov --no-external --capture --initial --directory $(top_builddir) --output-file dring-coverage-base.info
$(AM_V_at)lcov --no-external --capture --directory $(top_builddir) --output-file dring-coverage-tests.info
$(AM_V_at)lcov --add-tracefile dring-coverage-base.info --add-tracefile dring-coverage-tests.info --output-file dring-coverage.info
$(AM_V_at)lcov --remove dring-coverage.info "$(abs_top_builddir)/contrib/*" --output-file dring-coverage-filtered.info
$(AM_V_at)lcov --no-external --capture --initial --directory $(top_builddir) --output-file jami-coverage-base.info
$(AM_V_at)lcov --no-external --capture --directory $(top_builddir) --output-file jami-coverage-tests.info
$(AM_V_at)lcov --add-tracefile jami-coverage-base.info --add-tracefile jami-coverage-tests.info --output-file jami-coverage.info
$(AM_V_at)lcov --remove jami-coverage.info "$(abs_top_builddir)/contrib/*" --output-file jami-coverage-filtered.info
$(MKDIR_P) html-coverage-output
genhtml -o html-coverage-output dring-coverage-filtered.info
genhtml -o html-coverage-output jami-coverage-filtered.info
coverage-%:
gcovr --filter src --filter test --$*-pretty --$* --output $*-coverage-output.$*
......
......@@ -2,7 +2,7 @@ if HAVE_WIN32
libexec_PROGRAMS = jamid
jamid_SOURCES = winmain.cpp
jamid_CXXFLAGS = -I$(top_srcdir)/src \
-I$(top_srcdir)/src/dring \
-I$(top_srcdir)/src/jami \
-DTOP_BUILDDIR=\"$$(cd "$(top_builddir)"; pwd)\" \
$(AM_CXXFLAGS)
jamid_LDADD = $(top_builddir)/src/libring.la
......@@ -12,7 +12,7 @@ if HAVE_OSX
libexec_PROGRAMS = jamid
jamid_SOURCES = osxmain.cpp
jamid_CXXFLAGS = -I$(top_srcdir)/src \
-I$(top_srcdir)/src/dring \
-I$(top_srcdir)/src/jami \
-DTOP_BUILDDIR=\"$$(cd "$(top_builddir)"; pwd)\" \
$(AM_CXXFLAGS)
jamid_LDADD = $(top_builddir)/src/libring.la
......@@ -28,7 +28,7 @@ libexec_PROGRAMS = jamid
jamid_SOURCES = main.cpp
jamid_CXXFLAGS= -I$(top_srcdir)/src ${DBUSCPP_CFLAGS} \
-I$(top_srcdir)/src/dring \
-I$(top_srcdir)/src/jami \
-DTOP_BUILDDIR=\"$$(cd "$(top_builddir)"; pwd)\"
jamid_LDADD = dbus/libclient_dbus.la ${DBUSCPP_LIBS} $(top_builddir)/src/libring.la -ldl
......
......@@ -933,7 +933,7 @@
<p>Transfer has been successfully
processed. Client should remove transferred
call from call list as it is no longer
accessible in daemon (dring).</p>
accessible in daemon (jamid).</p>
</tp:docstring>
</signal>
......@@ -941,7 +941,7 @@
<tp:docstring>
<p>Transfer operation failed. Corresponding
call is no longer accessible in
daemon (dring).</p>
daemon (jami).</p>
</tp:docstring>
</signal>
......
......@@ -19,7 +19,7 @@
*/
#include "dbuscallmanager.h"
#include "dring/callmanager_interface.h"
#include "jami/callmanager_interface.h"
DBusCallManager::DBusCallManager(DBus::Connection& connection)
: DBus::ObjectAdaptor(connection, "/cx/ring/Ring/CallManager")
......
......@@ -25,7 +25,7 @@
#include <map>
#include <string>
#include "dring/def.h"
#include "jami/def.h"
#include "dbus_cpp.h"
#if __GNUC__ >= 5 || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 6)
......
......@@ -25,7 +25,7 @@
#include "dbusclient.h"
#include "dbus_cpp.h"
#include "dring.h"
#include "jami.h"
#include "dbusinstance.h"
......
......@@ -25,7 +25,7 @@
#include "config.h"
#endif // HAVE_CONFIG_H
#include "dring/def.h"
#include "jami/def.h"
#include <memory>
class DBusConfigurationManager;
......
......@@ -29,10 +29,10 @@
#include <map>
#include <string>
#include "dring/def.h"
#include "jami/def.h"
#include "dbus_cpp.h"
#include "dring/datatransfer_interface.h"
#include "jami/datatransfer_interface.h"
#if __GNUC__ >= 5 || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 6)
/* This warning option only exists for gcc 4.6.0 and greater. */
......
......@@ -21,7 +21,7 @@
#ifndef __RING_DBUSINSTANCE_H__
#define __RING_DBUSINSTANCE_H__
#include "dring/def.h"
#include "jami/def.h"
#include <functional>
......
......@@ -19,7 +19,7 @@
*/
#include "dbuspluginmanagerinterface.h"
#include "dring/plugin_manager_interface.h"
#include "jami/plugin_manager_interface.h"
DBusPluginManagerInterface::DBusPluginManagerInterface(DBus::Connection& connection)
: DBus::ObjectAdaptor(connection, "/cx/ring/Ring/PluginManagerInterface")
......
......@@ -24,7 +24,7 @@
#include <map>
#include <string>
#include "dring/def.h"
#include "jami/def.h"
#include "dbus_cpp.h"
#if __GNUC__ >= 5 || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 6)
......
......@@ -25,7 +25,7 @@
#include <map>
#include <string>
#include "dring/def.h"
#include "jami/def.h"
#include "dbus_cpp.h"
#if __GNUC__ >= 5 || (__GNUC__ >=4 && __GNUC_MINOR__ >= 6)
......
......@@ -19,7 +19,7 @@
*/
#include "dbusvideomanager.h"
#include "dring/videomanager_interface.h"
#include "jami/videomanager_interface.h"
DBusVideoManager::DBusVideoManager(DBus::Connection& connection)
: DBus::ObjectAdaptor(connection, "/cx/ring/Ring/VideoManager")
......
......@@ -23,7 +23,7 @@
#include <map>
#include <string>
#include "dring/def.h"
#include "jami/def.h"
#include "dbus_cpp.h"
#if __GNUC__ >= 5 || (__GNUC__ >=4 && __GNUC_MINOR__ >= 6)
......
......@@ -22,7 +22,7 @@
*/
#include "dbusclient.h"
#include "dring/dring.h"
#include "jami/jami.h"
#include <signal.h>
#include <getopt.h>
......
jamid_includedirs = include_directories(
'../..',
'../../src',
'../../src/dring'
'../../src/jami'
)
jamid_sources = files(
......@@ -64,11 +64,11 @@ endif
if progpod2man.found()
jamid_targets += custom_target('jamid.man',
command: [progpod2man, '--section=8', '--release='+meson.project_version(), '--center', '""', '@INPUT@', '@OUTPUT@'],
input: 'jamid.pod',
output: 'jamid.8',
command: [progpod2man, '--section=1', '--release='+meson.project_version(), '--center', '""', '@INPUT@', '@OUTPUT@'],
input: '../../man/jamid.pod',
output: 'jamid.1',
install: true,
install_dir: get_option('mandir') / 'man8'
install_dir: get_option('mandir') / 'man1'
)
endif
......
......@@ -22,8 +22,8 @@
%header %{
#include "dring/dring.h"
#include "dring/callmanager_interface.h"
#include "jami/jami.h"
#include "jami/callmanager_interface.h"
class Callback {
public:
......
......@@ -20,8 +20,8 @@
*/
%header %{
#include "dring/dring.h"
#include "dring/configurationmanager_interface.h"
#include "jami/jami.h"
#include "jami/configurationmanager_interface.h"
class ConfigurationCallback {
public:
......
......@@ -19,8 +19,8 @@
*/
%header %{
#include "dring/dring.h"
#include "dring/conversation_interface.h"
#include "jami/jami.h"
#include "jami/conversation_interface.h"
class ConversationCallback {
public:
......
......@@ -27,8 +27,8 @@
%apply int64_t& INOUT { DRing::DataTransferId& id };
%header %{
#include "dring/dring.h"
#include "dring/datatransfer_interface.h"
#include "jami/jami.h"
#include "jami/datatransfer_interface.h"
class DataTransferCallback {
public:
......
......@@ -211,7 +211,7 @@ namespace std {
%include "plugin_manager_interface.i"
%include "conversation.i"
#include "dring/callmanager_interface.h"
#include "jami/callmanager_interface.h"
%inline %{
/* some functions that need to be declared in *_wrap.cpp
......
......@@ -21,7 +21,7 @@
/* %nodefaultctor ManagerImpl;
%nodefaultdtor ManagerImpl; */
%header %{
#include "dring/dring.h"
#include "jami/jami.h"
%}
namespace DRing {
......
......@@ -19,8 +19,8 @@
%header %{
#include "dring/dring.h"
#include "dring/plugin_manager_interface.h"
#include "jami/jami.h"
#include "jami/plugin_manager_interface.h"
%}
namespace DRing {
......
......@@ -19,8 +19,8 @@
%header %{
#include "dring/dring.h"
#include "dring/presencemanager_interface.h"
#include "jami/jami.h"
#include "jami/presencemanager_interface.h"
class PresenceCallback {
public:
......
......@@ -26,8 +26,8 @@
#include <mutex>
#include <utility>
#include "dring/dring.h"
#include "dring/videomanager_interface.h"
#include "jami/jami.h"
#include "jami/videomanager_interface.h"
#include <android/native_window.h>
#include <android/native_window_jni.h>
#include <android/log.h>
......
......@@ -21,7 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "dring/dring.h"
#include "jami/jami.h"
#include "logger.h"
......
......@@ -3,7 +3,7 @@ include $(top_srcdir)/globals.mk
BUILT_SOURCES= \
jami_wrapper.cpp \
build/Makefile \
build/Release/obj.target/dring.node
build/Release/obj.target/jami.node
jami_wrapper.cpp: nodejs_interface.i configurationmanager.i managerimpl.i
$(SWIG) -v -c++ -javascript -node -o jami_wrapper.cpp nodejs_interface.i
......@@ -11,9 +11,9 @@ jami_wrapper.cpp: nodejs_interface.i configurationmanager.i managerimpl.i
build/Makefile: jami_wrapper.cpp binding.gyp
node-gyp configure --target=v14.16.1 --arch=x64
build/Release/obj.target/dring.node: build/Makefile jami_wrapper.cpp callback.h
build/Release/obj.target/jami.node: build/Makefile jami_wrapper.cpp callback.h
node-gyp build
CLEANFILES= \
$(BUILT_SOURCES) \
build/Release/dring.node
\ No newline at end of file
build/Release/jami.node
\ No newline at end of file
{
"targets": [
{
"target_name": "dring",
"target_name": "jamid",
"sources": [ "jami_wrapper.cpp" ],
'include_dirs': ['../../src/'],
'libraries': ['-L<(module_root_dir)/../../src/.libs', '-lring'],
......
......@@ -22,8 +22,8 @@
%header %{
#include "dring/dring.h"
#include "dring/callmanager_interface.h"
#include "jami/jami.h"
#include "jami/callmanager_interface.h"
class Callback {
public:
......
......@@ -20,8 +20,8 @@
*/
%header %{
#include "dring/dring.h"
#include "dring/configurationmanager_interface.h"
#include "jami/jami.h"
#include "jami/configurationmanager_interface.h"
class ConfigurationCallback {
public:
......
......@@ -19,8 +19,8 @@
*/
%header %{
#include "dring/dring.h"
#include "dring/conversation_interface.h"
#include "jami/jami.h"
#include "jami/conversation_interface.h"
class ConversationCallback {
public:
......
......@@ -23,8 +23,8 @@
class JamiDaemon {
constructor(callbackMap) {
if (callbackMap){
this.dring = require("./build/Release/dring.node");
this.dring.init(callbackMap);
this.jami = require("./build/Release/jami.node");
this.jami.init(callbackMap);
}
}
......@@ -33,7 +33,7 @@ class JamiDaemon {
}
addAccount(account) {
const params = new this.dring.StringMap();
const params = new this.jami.StringMap();
params.set("Account.type", "RING");
if (account.managerUri)
params.set("Account.managerUri", account.managerUri);
......@@ -86,7 +86,7 @@ class JamiDaemon {
if (account.upnpEnabled)
params.set("Account.upnpEnabled", this.boolToStr(account.upnpEnabled));
this.dring.addAccount(params);
this.jami.addAccount(params);
}
stringVectToArr(stringvect) {
const outputArr = [];
......@@ -101,24 +101,24 @@ class JamiDaemon {
return outputObj;
}
getAccountList() {
return this.stringVectToArr(this.dring.getAccountList());
return this.stringVectToArr(this.jami.getAccountList());
}
getAccountDetails(accountId) {
return this.mapToJs(this.dring.getAccountDetails(accountId));
return this.mapToJs(this.jami.getAccountDetails(accountId));
}
getAudioOutputDeviceList() {
return this.stringVectToArr(this.dring.getAudioOutputDeviceList());
return this.stringVectToArr(this.jami.getAudioOutputDeviceList());
}
getVolume(deviceName) {
return this.dring.getVolume(deviceName);
return this.jami.getVolume(deviceName);
}
setVolume(deviceName, volume) {
return this.dring.setVolume(deviceName, volume);
return this.jami.setVolume(deviceName, volume);
}
stop() {
this.dring.fini();
this.jami.fini();
}
}
......
......@@ -21,7 +21,7 @@
/* %nodefaultctor ManagerImpl;
%nodefaultdtor ManagerImpl; */
%header %{
#include "dring/dring.h"
#include "jami/jami.h"
%}
namespace DRing {
......
......@@ -12,7 +12,7 @@ nodejs_makefile_target = custom_target('nodejs.makefile',
nodejs_node_target = custom_target('nodejs.node',
command: [prognodegyp, 'build'],
output: 'build/Release/obj.target/dring.node',
output: 'build/Release/obj.target/jami.node',
depends: nodejs_makefile_target,
build_by_default: true
)
......@@ -19,8 +19,8 @@
%header %{
#include "dring/dring.h"
#include "dring/presencemanager_interface.h"
#include "jami/jami.h"
#include "jami/presencemanager_interface.h"
class PresenceCallback {
public:
......
......@@ -24,8 +24,8 @@
#include <list>
#include <mutex>
#include "dring/dring.h"
#include "dring/videomanager_interface.h"
#include "jami/jami.h"
#include "jami/videomanager_interface.h"
class VideoCallback {
public:
......
......@@ -27,7 +27,7 @@
#include <string>
#include <chrono>
#include "dring.h"
#include "jami.h"
#include "callmanager_interface.h"
#include "configurationmanager_interface.h"
#include "presencemanager_interface.h"
......
......@@ -25,7 +25,7 @@
#include <getopt.h>
#include <string>
#include "dring.h"
#include "jami.h"
#include "callmanager_interface.h"
#include "configurationmanager_interface.h"
#include "presencemanager_interface.h"
......
......@@ -202,12 +202,12 @@ AC_COMPILE_IFELSE(
AC_MSG_RESULT([$CLANG])
dnl define DRING_BUILD because we are building libring, not using it
dnl if building shared library, define dring_EXPORTS
dnl if building shared library, define jami_EXPORTS
AC_MSG_CHECKING([if compiling shared library])
DAEMONCPPFLAGS+=" -fvisibility=hidden -DDRING_BUILD"
AS_IF([test "x$enable_shared" == "xyes"],
[RING_SHARED=yes
DAEMONCPPFLAGS+=" -Ddring_EXPORTS"],
DAEMONCPPFLAGS+=" -Djami_EXPORTS"],
[RING_SHARED=no])
AC_MSG_RESULT([$RING_SHARED])
......
......@@ -14,7 +14,7 @@ AM_CPPFLAGS += \
-I$(src)/src/config \
-I$(src)/src/media \
-I$(src)/test \
-I$(src)/src/dring \
-I$(src)/src/jami \
$(SIP_CFLAGS) \
-DPREFIX=\"$(prefix)\" \
-DPROGSHAREDIR=\"$(datadir)/jami\" \
......
SECTION="1"
TEMPLATES=dring.pod