From 07554dab05f9c36baadf97e500a25c8d67c9e861 Mon Sep 17 00:00:00 2001
From: Eloi BAIL <eloi.bail@savoirfairelinux.com>
Date: Wed, 25 Mar 2015 12:13:42 -0400
Subject: [PATCH] daemon: replace SFL references by Ring in src/

Refs #69286

Change-Id: I2784a505434c97ea7b4c50f2a0da61559e0cbfde
---
 src/client/callmanager.cpp              | 2 +-
 src/managerimpl.cpp                     | 2 +-
 src/media/audio/audiolayer.h            | 2 +-
 src/media/audio/coreaudio/corelayer.cpp | 2 +-
 src/media/audio/jack/jacklayer.cpp      | 2 +-
 src/media/libav_utils.cpp               | 6 +++---
 src/media/libav_utils.h                 | 6 +++---
 src/media/media_buffer.cpp              | 2 +-
 src/media/media_decoder.cpp             | 2 +-
 src/media/media_encoder.cpp             | 2 +-
 src/media/socket_pair.cpp               | 2 +-
 src/preferences.cpp                     | 2 +-
 src/ringdht/ringaccount.h               | 2 +-
 src/sip/sipaccount.h                    | 4 ++--
 src/sip/tlsvalidator.cpp                | 2 +-
 15 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/client/callmanager.cpp b/src/client/callmanager.cpp
index 03db766307..4d521e2878 100644
--- a/src/client/callmanager.cpp
+++ b/src/client/callmanager.cpp
@@ -339,7 +339,7 @@ sendTextMessage(const std::string& callID, const std::string& message)
 #if HAVE_INSTANT_MESSAGING
     ring::Manager::instance().sendTextMessage(callID, message, "Me");
 #else
-    RING_ERR("Could not send \"%s\" text message to %s since SFLphone daemon does not support it, please recompile with instant messaging support", message.c_str(), callID.c_str());
+    RING_ERR("Could not send \"%s\" text message to %s since Ring daemon does not support it, please recompile with instant messaging support", message.c_str(), callID.c_str());
 #endif
 }
 
diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp
index 317b39eb70..d595750580 100644
--- a/src/managerimpl.cpp
+++ b/src/managerimpl.cpp
@@ -214,7 +214,7 @@ ManagerImpl::ManagerImpl() :
     std::seed_seq seed {rdev(), rdev()};
     rand_.seed(seed);
 
-    ring::libav_utils::sfl_avcodec_init();
+    ring::libav_utils::ring_avcodec_init();
 }
 
 ManagerImpl::~ManagerImpl()
diff --git a/src/media/audio/audiolayer.h b/src/media/audio/audiolayer.h
index dd448a3e6c..78fad4f1d3 100644
--- a/src/media/audio/audiolayer.h
+++ b/src/media/audio/audiolayer.h
@@ -238,7 +238,7 @@ class AudioLayer {
         bool isStarted_;
 
         /**
-         * Sample Rate SFLphone should send sound data to the sound card
+         * Sample Rate Ring should send sound data to the sound card
          */
         AudioFormat audioFormat_;
 
diff --git a/src/media/audio/coreaudio/corelayer.cpp b/src/media/audio/coreaudio/corelayer.cpp
index d7d1ea4e25..beb40b7e72 100644
--- a/src/media/audio/coreaudio/corelayer.cpp
+++ b/src/media/audio/coreaudio/corelayer.cpp
@@ -486,7 +486,7 @@ void CoreLayer::read(AudioUnitRenderActionFlags* ioActionFlags,
                 &size));
 
 
-    // Add them to sflphone ringbuffer.
+    // Add them to Ring ringbuffer.
     const AudioFormat mainBufferFormat = Manager::instance().getRingBufferPool().getInternalAudioFormat();
     bool resample = info.mSampleRate != mainBufferFormat.sample_rate;
 
diff --git a/src/media/audio/jack/jacklayer.cpp b/src/media/audio/jack/jacklayer.cpp
index 9208ff26b8..3ace332b5c 100644
--- a/src/media/audio/jack/jacklayer.cpp
+++ b/src/media/audio/jack/jacklayer.cpp
@@ -268,7 +268,7 @@ JackLayer::ringbuffer_worker()
 
         // wait until process() signals more data
         // FIXME: this checks for spurious wakes, but the predicate
-        // is rather arbitrary. We should wait until sflphone has/needs data
+        // is rather arbitrary. We should wait until ring has/needs data
         // and jack has/needs data.
         data_ready_.wait(lock, [&] {
             // Note: lock is released while waiting, and held when woken
diff --git a/src/media/libav_utils.cpp b/src/media/libav_utils.cpp
index 60643219aa..95af5d2080 100644
--- a/src/media/libav_utils.cpp
+++ b/src/media/libav_utils.cpp
@@ -97,7 +97,7 @@ static void init_once()
 
 static std::once_flag already_called;
 
-void sfl_avcodec_init()
+void ring_avcodec_init()
 {
     std::call_once(already_called, init_once);
 }
@@ -112,7 +112,7 @@ int libav_pixel_format(int fmt)
     return fmt;
 }
 
-int sfl_pixel_format(int fmt)
+int ring_pixel_format(int fmt)
 {
     switch (fmt) {
         case PIXEL_FORMAT(YUV420P): return video::VIDEO_PIXFMT_YUV420P;
@@ -120,7 +120,7 @@ int sfl_pixel_format(int fmt)
     return fmt;
 }
 
-void sfl_url_split(const char *url,
+void ring_url_split(const char *url,
                    char *hostname, size_t hostname_size, int *port,
                    char *path, size_t path_size)
 {
diff --git a/src/media/libav_utils.h b/src/media/libav_utils.h
index 46bb441c3b..f12147b5d0 100644
--- a/src/media/libav_utils.h
+++ b/src/media/libav_utils.h
@@ -37,15 +37,15 @@
 
 namespace ring { namespace libav_utils {
 
-    void sfl_avcodec_init();
+    void ring_avcodec_init();
 
     int libav_pixel_format(int fmt);
-    int sfl_pixel_format(int fmt);
+    int ring_pixel_format(int fmt);
 
     const char *const DEFAULT_H264_PROFILE_LEVEL_ID = "profile-level-id=428014";
     const char *const MAX_H264_PROFILE_LEVEL_ID = "profile-level-id=640034";
 
-    void sfl_url_split(const char *url,
+    void ring_url_split(const char *url,
                       char *hostname, size_t hostname_size, int *port,
                       char *path, size_t path_size);
 
diff --git a/src/media/media_buffer.cpp b/src/media/media_buffer.cpp
index 4e1a2d43a7..2a0df42b81 100644
--- a/src/media/media_buffer.cpp
+++ b/src/media/media_buffer.cpp
@@ -70,7 +70,7 @@ VideoFrame::size() const noexcept
 int
 VideoFrame::format() const noexcept
 {
-    return libav_utils::sfl_pixel_format(frame_->format);
+    return libav_utils::ring_pixel_format(frame_->format);
 }
 
 int
diff --git a/src/media/media_decoder.cpp b/src/media/media_decoder.cpp
index bf7c198100..c925641467 100644
--- a/src/media/media_decoder.cpp
+++ b/src/media/media_decoder.cpp
@@ -429,7 +429,7 @@ int MediaDecoder::getHeight() const
 { return decoderCtx_->height; }
 
 int MediaDecoder::getPixelFormat() const
-{ return libav_utils::sfl_pixel_format(decoderCtx_->pix_fmt); }
+{ return libav_utils::ring_pixel_format(decoderCtx_->pix_fmt); }
 
 void
 MediaDecoder::writeToRingBuffer(const AudioFrame& decodedFrame,
diff --git a/src/media/media_encoder.cpp b/src/media/media_encoder.cpp
index 3c81e3ed07..963ea574f7 100644
--- a/src/media/media_encoder.cpp
+++ b/src/media/media_encoder.cpp
@@ -168,7 +168,7 @@ MediaEncoder::openOutput(const char *filename,
         // allocate buffers for both scaled (pre-encoder) and encoded frames
         const int width = encoderCtx_->width;
         const int height = encoderCtx_->height;
-        const int format = libav_utils::sfl_pixel_format((int)encoderCtx_->pix_fmt);
+        const int format = libav_utils::ring_pixel_format((int)encoderCtx_->pix_fmt);
         scaledFrameBufferSize_ = videoFrameSize(format, width, height);
         if (scaledFrameBufferSize_ <= FF_MIN_BUFFER_SIZE)
             throw MediaEncoderException("buffer too small");
diff --git a/src/media/socket_pair.cpp b/src/media/socket_pair.cpp
index 6688104b52..b7f0ab1379 100644
--- a/src/media/socket_pair.cpp
+++ b/src/media/socket_pair.cpp
@@ -246,7 +246,7 @@ void SocketPair::openSockets(const char *uri, int local_rtp_port)
     char path[1024];
     int rtp_port;
 
-    libav_utils::sfl_url_split(uri, hostname, sizeof(hostname), &rtp_port, path,
+    libav_utils::ring_url_split(uri, hostname, sizeof(hostname), &rtp_port, path,
                   sizeof(path));
 
     const int rtcp_port = rtp_port + 1;
diff --git a/src/preferences.cpp b/src/preferences.cpp
index ef906a2a4c..473b252dcc 100644
--- a/src/preferences.cpp
+++ b/src/preferences.cpp
@@ -247,7 +247,7 @@ HookPreference::HookPreference() :
     , numberEnabled_(false)
     , sipEnabled_(false)
     , urlCommand_("x-www-browser")
-    , urlSipField_("X-sflphone-url")
+    , urlSipField_("X-ring-url")
 {}
 
 HookPreference::HookPreference(const std::map<std::string, std::string> &settings) :
diff --git a/src/ringdht/ringaccount.h b/src/ringdht/ringaccount.h
index a2def3eafd..84cb1411a5 100644
--- a/src/ringdht/ringaccount.h
+++ b/src/ringdht/ringaccount.h
@@ -148,7 +148,7 @@ class RingAccount : public SIPAccountBase {
         std::string getToUri(const std::string& username) const;
 
         /**
-         * In the current version of SFLPhone, "srv" uri is obtained in the preformated
+         * In the current version of Ring, "srv" uri is obtained in the preformated
          * way: hostname:port. This method adds the correct scheme and append
          * the ;transport= parameter at the end of the uri, in accordance with RFC3261.
          *
diff --git a/src/sip/sipaccount.h b/src/sip/sipaccount.h
index 0d832a3cba..8aeb31e4ee 100644
--- a/src/sip/sipaccount.h
+++ b/src/sip/sipaccount.h
@@ -383,7 +383,7 @@ class SIPAccount : public SIPAccountBase {
         std::string getToUri(const std::string& username) const;
 
         /**
-         * In the current version of SFLPhone, "srv" uri is obtained in the preformated
+         * In the current version of Ring, "srv" uri is obtained in the preformated
          * way: hostname:port. This method adds the correct scheme and append
          * the ;transport= parameter at the end of the uri, in accordance with RFC3261.
          *
@@ -628,7 +628,7 @@ class SIPAccount : public SIPAccountBase {
          * If username is not provided, as it happens for Direct ip calls,
          * fetch the Real Name field of the user that is currently
          * running this program.
-         * @return std::string The login name under which SFLPhone is running.
+         * @return std::string The login name under which Ring is running.
          */
         static std::string getLoginName();
 
diff --git a/src/sip/tlsvalidator.cpp b/src/sip/tlsvalidator.cpp
index fdc560620c..2837bf2dc1 100644
--- a/src/sip/tlsvalidator.cpp
+++ b/src/sip/tlsvalidator.cpp
@@ -916,7 +916,7 @@ TlsValidator::CheckResult TlsValidator::authorityMatch()
  */
 TlsValidator::CheckResult TlsValidator::knownAuthority()
 {
-    // TODO SFLphone need a new boolean account setting "require trusted authority" or something defaulting to true
+    // TODO Ring need a new boolean account setting "require trusted authority" or something defaulting to true
     // using GNUTLS_CERT_SIGNER_NOT_FOUND is a temporary placeholder as it is close enough
     return TlsValidator::CheckResult(compareToCa() & GNUTLS_CERT_SIGNER_NOT_FOUND
         ? CheckValues::FAILED : CheckValues::PASSED, "");
-- 
GitLab