From 7888f49e401fbb645eeff5e0ee197292a15eafc0 Mon Sep 17 00:00:00 2001
From: Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>
Date: Thu, 8 Jan 2015 15:30:46 -0500
Subject: [PATCH] [ #63393 ] Remove project to Ring-KDE and libRingClient

---
 src/CMakeLists.txt                            | 61 +++++++++----------
 src/Messages.sh                               |  2 +-
 src/abstractbookmarkmodel.cpp                 |  9 +--
 src/abstractbookmarkmodel.h                   |  2 +-
 src/abstractitembackend.cpp                   |  2 +-
 src/abstractitembackend.h                     |  2 +-
 src/account.cpp                               |  5 +-
 src/account.h                                 |  7 +--
 src/accountmodel.cpp                          |  6 +-
 src/audio/alsapluginmodel.cpp                 |  2 +-
 src/audio/alsapluginmodel.h                   |  2 +-
 src/audio/codecmodel.cpp                      |  2 +-
 src/audio/codecmodel.h                        |  2 +-
 src/audio/inputdevicemodel.cpp                |  2 +-
 src/audio/inputdevicemodel.h                  |  2 +-
 src/audio/managermodel.cpp                    |  2 +-
 src/audio/managermodel.h                      |  2 +-
 src/audio/outputdevicemodel.cpp               |  2 +-
 src/audio/outputdevicemodel.h                 |  2 +-
 src/audio/ringtonedevicemodel.cpp             |  2 +-
 src/audio/ringtonedevicemodel.h               |  2 +-
 src/audio/settings.cpp                        |  2 +-
 src/audio/settings.h                          |  2 +-
 src/call.cpp                                  | 10 +--
 src/call.h                                    |  5 +-
 src/callmodel.cpp                             | 24 ++++----
 src/callmodel.h                               |  4 +-
 src/contact.cpp                               |  3 +-
 src/contact.h                                 |  2 +-
 src/contactmodel.cpp                          |  2 +-
 src/contactmodel.h                            |  2 +-
 src/contactproxymodel.cpp                     | 17 +++---
 src/contactproxymodel.h                       |  2 +-
 src/dbus/callmanager-introspec.xml            |  2 +-
 src/dbus/callmanager.cpp                      |  6 +-
 src/dbus/configurationmanager-introspec.xml   |  4 +-
 src/dbus/configurationmanager.cpp             |  8 +--
 src/dbus/instance-introspec.xml               |  2 +-
 src/dbus/instancemanager.cpp                  |  4 +-
 src/dbus/presencemanager-introspec.xml        |  2 +-
 src/dbus/presencemanager.cpp                  |  4 +-
 src/dbus/videomanager-introspec.xml           |  2 +-
 src/dbus/videomanager.cpp                     |  4 +-
 src/historymodel.cpp                          | 19 +++---
 src/historymodel.h                            |  2 +-
 src/imconversationmanager.h                   |  2 +-
 src/itembackendmodel.h                        |  2 +-
 src/legacyhistorybackend.cpp                  |  2 +-
 src/mime.h                                    | 30 +++++++++
 src/numbercompletionmodel.cpp                 |  2 +-
 src/numbercompletionmodel.h                   |  2 +-
 src/phonedirectorymodel.cpp                   |  2 +-
 src/phonedirectorymodel.h                     |  2 +-
 src/phonenumber.h                             |  2 +-
 src/presencestatusmodel.cpp                   |  4 +-
 src/private/call_p.h                          |  2 +-
 src/private/phonedirectorymodel_p.h           |  2 +-
 src/ringtonemodel.cpp                         |  2 +-
 src/ringtonemodel.h                           |  2 +-
 src/securityvalidationmodel.h                 |  6 +-
 src/sflphone_const.h                          | 36 -----------
 src/uri.h                                     |  2 +-
 src/video/channel.cpp                         |  2 +-
 src/video/codecmodel2.h                       |  2 +-
 src/video/device.h                            |  2 +-
 src/video/manager.cpp                         |  2 +-
 src/video/manager.h                           |  2 +-
 src/video/renderer.h                          |  2 +-
 src/video/sourcesmodel.h                      |  2 +-
 src/visitors/accountlistcolorvisitor.h        |  2 +-
 .../itemmodelstateserializationvisitor.h      |  2 +-
 src/visitors/pixmapmanipulationvisitor.h      |  2 +-
 72 files changed, 180 insertions(+), 196 deletions(-)
 create mode 100644 src/mime.h

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ae0eb17f..6934d5c5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -7,19 +7,16 @@ endif(POLICY CMP0022)
 INCLUDE(GNUInstallDirs)
 
 ADD_DEFINITIONS("-std=c++0x")
-# ADD_DEFINITIONS("-std=c++0x")
 
 ADD_DEFINITIONS(
-	${QT_DEFINITIONS}
-	-fexceptions
+   ${QT_DEFINITIONS}
+   -fexceptions
 )
 
-PROJECT(qtsflphone)
+PROJECT(ringclient)
 
 SET(CMAKE_AUTOMOC TRUE)
 
-#target_link_libraries(qtsflphone ${QT_QTCORE_LIBRARY} ${KDE4_KDEUI_LIBS})
-
 SET(LOCAL_CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/")
 SET(CMAKE_MODULE_PATH "${LOCAL_CMAKE_MODULE_PATH}")
 
@@ -47,7 +44,7 @@ INCLUDE_DIRECTORIES ( ${CMAKE_CURRENT_BINARY_DIR})
 SET ( dbus_xml_introspecs_path ${CMAKE_CURRENT_SOURCE_DIR}/dbus/)
 
 #File to compile
-set( qtsflphone_LIB_SRCS
+set( libringclient_LIB_SRCS
   #Data objects
   call.cpp
   uri.cpp
@@ -121,7 +118,6 @@ set( qtsflphone_LIB_SRCS
   visitors/itemmodelstateserializationvisitor.cpp
 
   #Other
-  sflphone_const.h
   categorizedcompositenode.cpp
   hookmanager.cpp
 
@@ -129,7 +125,7 @@ set( qtsflphone_LIB_SRCS
   extensions/presenceitembackendmodelextension.cpp
 )
 
-set( qtsflphone_LIB_HDRS
+set( libringclient_LIB_HDRS
   account.h
   accountmodel.h
   call.h
@@ -163,6 +159,7 @@ set( qtsflphone_LIB_HDRS
   itembackendmodel.h
   hookmanager.h
   uri.h
+  mime.h
   abstractitembackendmodelextension.h
   video/device.h
   video/devicemodel.h
@@ -186,9 +183,8 @@ set( qtsflphone_LIB_HDRS
   #commonbackendmanagerinterface.h
 )
 
-set( qtsflphone_extra_LIB_HDRS
+set( libringclient_extra_LIB_HDRS
   typedefs.h
-  sflphone_const.h
   visitors/accountlistcolorvisitor.h
   visitors/phonenumberselector.h
   visitors/presenceserializationvisitor.h
@@ -206,13 +202,13 @@ SET_SOURCE_FILES_PROPERTIES(
 
 IF(${ENABLE_QT5} MATCHES true)
    QT5_ADD_DBUS_INTERFACE(
-      qtsflphone_LIB_SRCS
+      libringclient_LIB_SRCS
       ${presencemanager_xml}
       presencemanager_dbus_interface
    )
 ELSE()
    QT4_ADD_DBUS_INTERFACE(
-      qtsflphone_LIB_SRCS
+      libringclient_LIB_SRCS
       ${presencemanager_xml}
       presencemanager_dbus_interface
    )
@@ -230,13 +226,13 @@ SET_SOURCE_FILES_PROPERTIES(
 
 IF(${ENABLE_QT5} MATCHES true)
    QT5_ADD_DBUS_INTERFACE(
-      qtsflphone_LIB_SRCS
+      libringclient_LIB_SRCS
       ${configurationmanager_xml}
       configurationmanager_dbus_interface
    )
 ELSE()
    QT4_ADD_DBUS_INTERFACE(
-      qtsflphone_LIB_SRCS
+      libringclient_LIB_SRCS
       ${configurationmanager_xml}
       configurationmanager_dbus_interface
    )
@@ -254,13 +250,13 @@ SET_SOURCE_FILES_PROPERTIES(
 
 IF(${ENABLE_QT5} MATCHES true)
    QT5_ADD_DBUS_INTERFACE(
-      qtsflphone_LIB_SRCS
+      libringclient_LIB_SRCS
       ${callmanager_xml}
       callmanager_dbus_interface
    )
 ELSE()
    QT4_ADD_DBUS_INTERFACE(
-      qtsflphone_LIB_SRCS
+      libringclient_LIB_SRCS
       ${callmanager_xml}
       callmanager_dbus_interface
    )
@@ -278,13 +274,13 @@ SET_SOURCE_FILES_PROPERTIES(
 
 IF(${ENABLE_QT5} MATCHES true)
    QT5_ADD_DBUS_INTERFACE(
-      qtsflphone_LIB_SRCS
+      libringclient_LIB_SRCS
       ${video_xml}
       video_dbus_interface
    )
 ELSE()
    QT4_ADD_DBUS_INTERFACE(
-      qtsflphone_LIB_SRCS
+      libringclient_LIB_SRCS
       ${video_xml}
       video_dbus_interface
    )
@@ -302,67 +298,68 @@ SET_SOURCE_FILES_PROPERTIES(
 
 IF(${ENABLE_QT5} MATCHES true)
    QT5_ADD_DBUS_INTERFACE(
-      qtsflphone_LIB_SRCS
+      libringclient_LIB_SRCS
       ${instance_xml}
       instance_dbus_interface
    )
 ELSE()
    QT4_ADD_DBUS_INTERFACE(
-      qtsflphone_LIB_SRCS
+      libringclient_LIB_SRCS
       ${instance_xml}
       instance_dbus_interface
    )
 ENDIF(${ENABLE_QT5} MATCHES true)
 
 # Manually wrap private files
-SET(qtsflphone_PRIVATE_HDRS
+SET(libringclient_PRIVATE_HDRS
    private/call_p.h
    private/phonedirectorymodel_p.h
    private/instantmessagingmodel_p.h
 )
 
 IF(${ENABLE_QT5} MATCHES true)
-   QT5_WRAP_CPP(LIB_HEADER_MOC ${qtsflphone_PRIVATE_HDRS})
+   QT5_WRAP_CPP(LIB_HEADER_MOC ${libringclient_PRIVATE_HDRS})
 ELSE()
-   QT4_WRAP_CPP(LIB_HEADER_MOC ${qtsflphone_PRIVATE_HDRS})
+   QT4_WRAP_CPP(LIB_HEADER_MOC ${libringclient_PRIVATE_HDRS})
 ENDIF(${ENABLE_QT5} MATCHES true)
 
 
-add_library( qtsflphone  SHARED ${qtsflphone_LIB_SRCS} ${LIB_HEADER_MOC} )
+add_library( ringclient  SHARED ${libringclient_LIB_SRCS} ${LIB_HEADER_MOC} )
+add_library( ringclient_static  STATIC ${libringclient_LIB_SRCS} ${LIB_HEADER_MOC} )
 # REMOVE_DEFINITIONS("-w")
 
 IF(${ENABLE_QT5} MATCHES true)
-   QT5_USE_MODULES(qtsflphone Core DBus)
+   QT5_USE_MODULES(ringclient Core DBus)
 ENDIF(${ENABLE_QT5} MATCHES true)
 
 IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    SET(LINK_LIBRT "-lrt")
 ENDIF()
 
-target_link_libraries( qtsflphone
+target_link_libraries( ringclient
   ${LINK_LIBRT}
   -lpthread
   ${QT_QTDBUS_LIBRARY}
   ${QT_QTCORE_LIBRARY}
 )
 
-set_target_properties( qtsflphone
+set_target_properties( ringclient
   PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_VERSION}
 )
 
 SET(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include)
 
-install( FILES ${qtsflphone_LIB_HDRS} ${qtsflphone_extra_LIB_HDRS}
-  DESTINATION ${INCLUDE_INSTALL_DIR}/qtsflphone
+install( FILES ${libringclient_LIB_HDRS} ${libringclient_extra_LIB_HDRS}
+  DESTINATION ${INCLUDE_INSTALL_DIR}/libringclient
   COMPONENT Devel
 )
 
 #This hack force Debian based system to return a non multi-arch path
-#this is required to prevent the .deb libqtsflphone.so from having an
+#this is required to prevent the .deb libringclient.so from having an
 #higher priority than the prefixed one.
 STRING(REPLACE "${CMAKE_LIBRARY_ARCHITECTURE}" "" SANE_LIBRARY_PATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
 
-install( TARGETS qtsflphone
+install( TARGETS ringclient
   ARCHIVE DESTINATION ${SANE_LIBRARY_PATH}
   LIBRARY DESTINATION ${SANE_LIBRARY_PATH}
   DESTINATION ${SANE_LIBRARY_PATH}
diff --git a/src/Messages.sh b/src/Messages.sh
index 8734a9e4..ab5cdd89 100755
--- a/src/Messages.sh
+++ b/src/Messages.sh
@@ -1,3 +1,3 @@
 #! /bin/sh
 
-$XGETTEXT_QT `find . -name '*.cpp'` -o $podir/sflphone-client-kde_qt.pot
+$XGETTEXT_QT `find . -name '*.cpp'` -o $podir/ring-kde_qt.pot
diff --git a/src/abstractbookmarkmodel.cpp b/src/abstractbookmarkmodel.cpp
index 9f23699d..b1e94e52 100644
--- a/src/abstractbookmarkmodel.cpp
+++ b/src/abstractbookmarkmodel.cpp
@@ -20,7 +20,7 @@
 //Qt
 #include <QtCore/QMimeData>
 
-//SFLPhone
+//Ring
 #include "historymodel.h"
 #include "dbus/presencemanager.h"
 #include "phonedirectorymodel.h"
@@ -28,6 +28,7 @@
 #include "callmodel.h"
 #include "call.h"
 #include "uri.h"
+#include "mime.h"
 #include "abstractitembackend.h"
 
 static bool test = false;
@@ -70,7 +71,7 @@ QObject* AbstractBookmarkModel::TopLevelItem::getSelf() const
 AbstractBookmarkModel::AbstractBookmarkModel(QObject* parent) : QAbstractItemModel(parent){
    setObjectName("AbstractBookmarkModel");
    reloadCategories();
-   m_lMimes << MIME_PLAIN_TEXT << MIME_PHONENUMBER;
+   m_lMimes << RingMimes::PLAIN_TEXT << RingMimes::PHONENUMBER;
 
    //Connect
    connect(&DBus::PresenceManager::instance(),SIGNAL(newServerSubscriptionRequest(QString)),this,SLOT(slotRequest(QString)));
@@ -259,8 +260,8 @@ QMimeData* AbstractBookmarkModel::mimeData(const QModelIndexList &indexes) const
    foreach (const QModelIndex &index, indexes) {
       if (index.isValid()) {
          QString text = data(index, Call::Role::Number).toString();
-         mimeData->setData(MIME_PLAIN_TEXT , text.toUtf8());
-         mimeData->setData(MIME_PHONENUMBER, text.toUtf8());
+         mimeData->setData(RingMimes::PLAIN_TEXT , text.toUtf8());
+         mimeData->setData(RingMimes::PHONENUMBER, text.toUtf8());
          return mimeData;
       }
    }
diff --git a/src/abstractbookmarkmodel.h b/src/abstractbookmarkmodel.h
index 1b7efd58..527b1a2e 100644
--- a/src/abstractbookmarkmodel.h
+++ b/src/abstractbookmarkmodel.h
@@ -23,7 +23,7 @@
 #include <QtCore/QStringList>
 #include <QtCore/QDateTime>
 
-//SFLPhone
+//Ring
 #include "../lib/typedefs.h"
 #include "../lib/contact.h"
 #include "../lib/call.h"
diff --git a/src/abstractitembackend.cpp b/src/abstractitembackend.cpp
index 21a2c4a1..7148cafc 100644
--- a/src/abstractitembackend.cpp
+++ b/src/abstractitembackend.cpp
@@ -20,7 +20,7 @@
 //Parent
 #include "abstractitembackend.h"
 
-//SFLPhone library
+//Ring library
 #include "contact.h"
 #include "call.h"
 #include "phonenumber.h"
diff --git a/src/abstractitembackend.h b/src/abstractitembackend.h
index 53882a75..ca280af2 100644
--- a/src/abstractitembackend.h
+++ b/src/abstractitembackend.h
@@ -27,7 +27,7 @@
 #include "typedefs.h"
 #include "contact.h"
 
-//SFLPhone
+//Ring
 class Contact;
 class Account;
 class Call   ;
diff --git a/src/account.cpp b/src/account.cpp
index 62d979bb..3a9d9138 100644
--- a/src/account.cpp
+++ b/src/account.cpp
@@ -25,10 +25,7 @@
 #include <QtCore/QObject>
 #include <QtCore/QString>
 
-//SFLPhone
-#include "sflphone_const.h"
-
-//SFLPhone lib
+//Ring lib
 #include "dbus/configurationmanager.h"
 #include "dbus/callmanager.h"
 #include "dbus/videomanager.h"
diff --git a/src/account.h b/src/account.h
index 3cff0656..368b79da 100644
--- a/src/account.h
+++ b/src/account.h
@@ -25,11 +25,10 @@
 //Qt
 class QString;
 
-//SFLPhone
+//Ring
 #include "video/codecmodel2.h"
 #include "keyexchangemodel.h"
 #include "tlsmethodmodel.h"
-#include "sflphone_const.h"
 #include "typedefs.h"
 class CredentialModel;
 class RingToneModel  ;
@@ -400,8 +399,8 @@ class LIB_EXPORT Account : public QObject {
       QVariant roleData            (int role) const;
 
       //Setters
-      void setId      (const QString& id);
-      void setAlias                         (const QString& detail);
+      void setId                            (const QString& id      );
+      void setAlias                         (const QString& detail  );
       void setProtocol                      (Account::Protocol proto);
       void setHostname                      (const QString& detail );
       void setUsername                      (const QString& detail );
diff --git a/src/accountmodel.cpp b/src/accountmodel.cpp
index 32ba0854..41721235 100644
--- a/src/accountmodel.cpp
+++ b/src/accountmodel.cpp
@@ -16,17 +16,13 @@
  *   You should have received a copy of the GNU General Public License      *
  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
  ***************************************************************************/
-
 //Parent
 #include "accountmodel.h"
 
-//SFLPhone
-#include "sflphone_const.h"
-
 //Qt
 #include <QtCore/QObject>
 
-//SFLPhone library
+//Ring library
 #include "dbus/configurationmanager.h"
 #include "dbus/callmanager.h"
 #include "visitors/accountlistcolorvisitor.h"
diff --git a/src/audio/alsapluginmodel.cpp b/src/audio/alsapluginmodel.cpp
index 6ac4fa5e..482849cb 100644
--- a/src/audio/alsapluginmodel.cpp
+++ b/src/audio/alsapluginmodel.cpp
@@ -17,7 +17,7 @@
  ***************************************************************************/
 #include "alsapluginmodel.h"
 
-//SFLPhone
+//Ring
 #include "dbus/configurationmanager.h"
 
 class AlsaPluginModelPrivate : public QObject
diff --git a/src/audio/alsapluginmodel.h b/src/audio/alsapluginmodel.h
index fde12a40..84d41854 100644
--- a/src/audio/alsapluginmodel.h
+++ b/src/audio/alsapluginmodel.h
@@ -23,7 +23,7 @@
 //Qt
 #include <QtCore/QStringList>
 
-//SFLPhone
+//Ring
 #include "../typedefs.h"
 
 class AlsaPluginModelPrivate;
diff --git a/src/audio/codecmodel.cpp b/src/audio/codecmodel.cpp
index 02b6c973..1b350f78 100644
--- a/src/audio/codecmodel.cpp
+++ b/src/audio/codecmodel.cpp
@@ -21,7 +21,7 @@
 #include <QtCore/QDebug>
 #include <QtCore/QCoreApplication>
 
-//SFLPhone
+//Ring
 #include "account.h"
 #include "dbus/configurationmanager.h"
 
diff --git a/src/audio/codecmodel.h b/src/audio/codecmodel.h
index 8aef1b2b..9b8e420e 100644
--- a/src/audio/codecmodel.h
+++ b/src/audio/codecmodel.h
@@ -23,7 +23,7 @@
 //Qt
 #include <QtCore/QString>
 
-//SFLPhone
+//Ring
 #include "../typedefs.h"
 
 class Account;
diff --git a/src/audio/inputdevicemodel.cpp b/src/audio/inputdevicemodel.cpp
index ce96458b..9e510299 100644
--- a/src/audio/inputdevicemodel.cpp
+++ b/src/audio/inputdevicemodel.cpp
@@ -17,7 +17,7 @@
  ***************************************************************************/
 #include "inputdevicemodel.h"
 
-//SFLPhone
+//Ring
 #include "dbus/configurationmanager.h"
 #include "settings.h"
 
diff --git a/src/audio/inputdevicemodel.h b/src/audio/inputdevicemodel.h
index 01c3ca3e..2abc25df 100644
--- a/src/audio/inputdevicemodel.h
+++ b/src/audio/inputdevicemodel.h
@@ -23,7 +23,7 @@
 //Qt
 #include <QtCore/QStringList>
 
-//SFLPhone
+//Ring
 #include "../typedefs.h"
 
 class InputDeviceModelPrivate;
diff --git a/src/audio/managermodel.cpp b/src/audio/managermodel.cpp
index dec6550e..9fd9af47 100644
--- a/src/audio/managermodel.cpp
+++ b/src/audio/managermodel.cpp
@@ -17,7 +17,7 @@
  ***************************************************************************/
 #include "managermodel.h"
 
-//SFLPhone
+//Ring
 #include "dbus/configurationmanager.h"
 #include "settings.h"
 
diff --git a/src/audio/managermodel.h b/src/audio/managermodel.h
index 6b5a2f9e..5ed998ca 100644
--- a/src/audio/managermodel.h
+++ b/src/audio/managermodel.h
@@ -23,7 +23,7 @@
 //Qt
 #include <QtCore/QStringList>
 
-//SFLPhone
+//Ring
 #include "../typedefs.h"
 
 class ManagerModelPrivate;
diff --git a/src/audio/outputdevicemodel.cpp b/src/audio/outputdevicemodel.cpp
index c59d6c94..34900d2b 100644
--- a/src/audio/outputdevicemodel.cpp
+++ b/src/audio/outputdevicemodel.cpp
@@ -17,7 +17,7 @@
  ***************************************************************************/
 #include "outputdevicemodel.h"
 
-//SFLPhone
+//Ring
 #include "dbus/configurationmanager.h"
 #include "settings.h"
 
diff --git a/src/audio/outputdevicemodel.h b/src/audio/outputdevicemodel.h
index ac6572ae..024e828d 100644
--- a/src/audio/outputdevicemodel.h
+++ b/src/audio/outputdevicemodel.h
@@ -23,7 +23,7 @@
 //Qt
 #include <QtCore/QStringList>
 
-//SFLPhone
+//Ring
 #include "../typedefs.h"
 
 class OutputDeviceModelPrivate;
diff --git a/src/audio/ringtonedevicemodel.cpp b/src/audio/ringtonedevicemodel.cpp
index 7b792f19..aa2d308e 100644
--- a/src/audio/ringtonedevicemodel.cpp
+++ b/src/audio/ringtonedevicemodel.cpp
@@ -17,7 +17,7 @@
  ***************************************************************************/
 #include "ringtonedevicemodel.h"
 
-//SFLPhone
+//Ring
 #include "dbus/configurationmanager.h"
 #include "settings.h"
 
diff --git a/src/audio/ringtonedevicemodel.h b/src/audio/ringtonedevicemodel.h
index 2250e96f..54b6715a 100644
--- a/src/audio/ringtonedevicemodel.h
+++ b/src/audio/ringtonedevicemodel.h
@@ -23,7 +23,7 @@
 //Qt
 #include <QtCore/QStringList>
 
-//SFLPhone
+//Ring
 #include "../typedefs.h"
 
 class RingtoneDeviceModelPrivate;
diff --git a/src/audio/settings.cpp b/src/audio/settings.cpp
index 743b84af..bd18600c 100644
--- a/src/audio/settings.cpp
+++ b/src/audio/settings.cpp
@@ -17,7 +17,7 @@
  ***************************************************************************/
 #include "settings.h"
 
-//SFLPhone
+//Ring
 #include "dbus/configurationmanager.h"
 #include "dbus/callmanager.h"
 #include "ringtonedevicemodel.h"
diff --git a/src/audio/settings.h b/src/audio/settings.h
index db915732..a19ed231 100644
--- a/src/audio/settings.h
+++ b/src/audio/settings.h
@@ -20,7 +20,7 @@
 
 #include <QtCore/QAbstractListModel>
 
-//SFLPhone
+//Ring
 #include "../typedefs.h"
 
 
diff --git a/src/call.cpp b/src/call.cpp
index 6094bc39..85272baf 100644
--- a/src/call.cpp
+++ b/src/call.cpp
@@ -28,7 +28,7 @@
 #include <QtCore/QTimer>
 
 
-//SFLPhone library
+//Ring library
 #include "dbus/callmanager.h"
 #include "dbus/configurationmanager.h"
 #include "abstractitembackend.h"
@@ -1080,8 +1080,8 @@ void CallPrivate::error()
       //Well, in this case we have no choice, it still doesn't belong here
       q_ptr->videoRenderer()->stopRendering();
    }
-   throw QString("There was an error handling your call, please restart SFLPhone.Is you encounter this problem often, \
-   please open SFLPhone-KDE in a terminal and send this last 100 lines before this message in a bug report at \
+   throw QString("There was an error handling your call, please restart Ring.Is you encounter this problem often, \
+   please open Ring-KDE in a terminal and send this last 100 lines before this message in a bug report at \
    https://projects.savoirfairelinux.com/projects/sflphone/issues");
 }
 
@@ -1239,7 +1239,7 @@ void CallPrivate::call()
       qDebug() << "Account is not set, taking the first registered.";
       this->m_Account = AccountModel::currentAccount();
    }
-   //Calls to empty URI should not be allowed, sflphoned will go crazy
+   //Calls to empty URI should not be allowed, dring will go crazy
    if ((!m_pDialNumber) || m_pDialNumber->uri().isEmpty()) {
       qDebug() << "Trying to call an empty URI";
       changeCurrentState(Call::State::FAILURE);
@@ -1386,7 +1386,7 @@ void CallPrivate::warning()
          //If not stopped, then the counter will keep going
          //Getting here indicate something wrong happened
          //It can be normal, aka, an invalid URI such as '><'
-         // or an SFLPhone-KDE bug
+         // or an Ring-KDE bug
          stop();
          break;
       case Call::State::TRANSFERRED    :
diff --git a/src/call.h b/src/call.h
index a6b215a7..a65dad66 100644
--- a/src/call.h
+++ b/src/call.h
@@ -27,8 +27,7 @@
 class QString;
 class QTimer;
 
-//SFLPhone
-#include "sflphone_const.h"
+//Ring
 #include "typedefs.h"
 #include "historytimecategorymodel.h"
 class Account;
@@ -152,7 +151,7 @@ public:
    * History items create before December 2013 will have a "state" field
    * mixing direction and missed. Newer items will have separated fields for that.
    *
-   * SFLPhone-KDE will keep support for at least a year
+   * Ring-KDE will keep support for at least a year
    */
    enum class LegacyHistoryState : int //DEPRECATED remove
    {
diff --git a/src/callmodel.cpp b/src/callmodel.cpp
index d34ce0b3..ddc009bc 100644
--- a/src/callmodel.cpp
+++ b/src/callmodel.cpp
@@ -21,7 +21,7 @@
 #include <QtCore/QDebug>
 #include <QtGui/QDragEnterEvent>
 
-//SFLPhone library
+//Ring library
 #include "call.h"
 #include "uri.h"
 #include "phonedirectorymodel.h"
@@ -31,7 +31,7 @@
 #include "dbus/callmanager.h"
 #include "dbus/configurationmanager.h"
 #include "dbus/instancemanager.h"
-#include "sflphone_const.h"
+#include "mime.h"
 #include "typedefs.h"
 #include "abstractitembackend.h"
 #include "dbus/videomanager.h"
@@ -785,7 +785,7 @@ QStringList CallModel::mimeTypes() const
 {
    static QStringList mimes;
    if (!mimes.size()) {
-      mimes << MIME_PLAIN_TEXT << MIME_PHONENUMBER << MIME_CALLID << "text/html";
+      mimes << RingMimes::PLAIN_TEXT << RingMimes::PHONENUMBER << RingMimes::CALLID << "text/html";
    }
    return mimes;
 }
@@ -796,12 +796,12 @@ QMimeData* CallModel::mimeData(const QModelIndexList& indexes) const
    foreach (const QModelIndex &idx, indexes) {
       if (idx.isValid()) {
          const QString text = data(idx, Call::Role::Number).toString();
-         mData->setData(MIME_PLAIN_TEXT , text.toUtf8());
+         mData->setData(RingMimes::PLAIN_TEXT , text.toUtf8());
          Call* call = getCall(idx);
          if (call)
-            mData->setData(MIME_PHONENUMBER, call->peerPhoneNumber()->toHash().toUtf8());
+            mData->setData(RingMimes::PHONENUMBER, call->peerPhoneNumber()->toHash().toUtf8());
          qDebug() << "Setting mime" << idx.data(Call::Role::Id).toString();
-         mData->setData(MIME_CALLID  , idx.data(Call::Role::Id).toString().toUtf8());
+         mData->setData(RingMimes::CALLID  , idx.data(Call::Role::Id).toString().toUtf8());
          return mData;
       }
    }
@@ -824,8 +824,8 @@ bool CallModel::dropMimeData(const QMimeData* mimedata, Qt::DropAction action, i
 {
    Q_UNUSED(action)
    const QModelIndex targetIdx    = index   ( row,column,parentIdx );
-   if (mimedata->hasFormat(MIME_CALLID)) {
-      const QByteArray encodedCallId = mimedata->data( MIME_CALLID    );
+   if (mimedata->hasFormat(RingMimes::CALLID)) {
+      const QByteArray encodedCallId = mimedata->data( RingMimes::CALLID    );
       Call* call                     = getCall ( encodedCallId        );
       Call* target                   = getCall ( targetIdx            );
 
@@ -888,8 +888,8 @@ bool CallModel::dropMimeData(const QMimeData* mimedata, Qt::DropAction action, i
             break;
       }
    }
-   else if (mimedata->hasFormat(MIME_PHONENUMBER)) {
-      const QByteArray encodedPhoneNumber = mimedata->data( MIME_PHONENUMBER );
+   else if (mimedata->hasFormat(RingMimes::PHONENUMBER)) {
+      const QByteArray encodedPhoneNumber = mimedata->data( RingMimes::PHONENUMBER );
       Call* target = getCall(targetIdx);
       qDebug() << "Phone number" << encodedPhoneNumber << "on call" << target;
       Call* newCall = dialingCall(QString(),target->account());
@@ -898,8 +898,8 @@ bool CallModel::dropMimeData(const QMimeData* mimedata, Qt::DropAction action, i
       newCall->performAction(Call::Action::ACCEPT);
       createConferenceFromCall(newCall,target);
    }
-   else if (mimedata->hasFormat(MIME_CONTACT)) {
-      const QByteArray encodedContact = mimedata->data(MIME_CONTACT);
+   else if (mimedata->hasFormat(RingMimes::CONTACT)) {
+      const QByteArray encodedContact = mimedata->data(RingMimes::CONTACT);
       Call* target = getCall(targetIdx);
       qDebug() << "Contact" << encodedContact << "on call" << target;
       if (PhoneNumberSelector::defaultVisitor()) {
diff --git a/src/callmodel.h b/src/callmodel.h
index 9dba6533..5e806988 100644
--- a/src/callmodel.h
+++ b/src/callmodel.h
@@ -23,7 +23,7 @@
 #include <QMap>
 #include "typedefs.h"
 
-//SFLPhone
+//Ring
 #include "call.h"
 class Account;
 struct InternalStruct;
@@ -34,7 +34,7 @@ class CallModelPrivate;
 typedef QMap<uint, Call*>  CallMap;
 typedef QList<Call*>       CallList;
 
-///CallModel: Central model/frontend to deal with sflphoned
+///CallModel: Central model/frontend to deal with dring
 class LIB_EXPORT CallModel : public QAbstractItemModel
 {
    #pragma GCC diagnostic push
diff --git a/src/contact.cpp b/src/contact.cpp
index 4ec69667..2df69204 100644
--- a/src/contact.cpp
+++ b/src/contact.cpp
@@ -23,8 +23,7 @@
 //Qt
 #include <QtGui/QPixmap>
 
-//SFLPhone library
-#include "sflphone_const.h"
+//Ring library
 #include "phonenumber.h"
 #include "abstractitembackend.h"
 #include "transitionalcontactbackend.h"
diff --git a/src/contact.h b/src/contact.h
index b6fee3e8..3a3263c6 100644
--- a/src/contact.h
+++ b/src/contact.h
@@ -34,7 +34,7 @@ namespace KABC {
    class PhoneNumber ;
 }
 
-//SFLPhone
+//Ring
 class PhoneNumber;
 class AbstractContactBackend;
 class ContactPrivate;
diff --git a/src/contactmodel.cpp b/src/contactmodel.cpp
index acad22c1..d6383857 100644
--- a/src/contactmodel.cpp
+++ b/src/contactmodel.cpp
@@ -19,7 +19,7 @@
 //Parent
 #include "contactmodel.h"
 
-//SFLPhone library
+//Ring library
 #include "contact.h"
 #include "call.h"
 #include "uri.h"
diff --git a/src/contactmodel.h b/src/contactmodel.h
index edd56325..dbd5d8d3 100644
--- a/src/contactmodel.h
+++ b/src/contactmodel.h
@@ -28,7 +28,7 @@
 #include "contact.h"
 #include "commonbackendmanagerinterface.h"
 
-//SFLPhone
+//Ring
 class Contact;
 class Account;
 class AbstractContactBackend;
diff --git a/src/contactproxymodel.cpp b/src/contactproxymodel.cpp
index af08b078..55d0bc60 100644
--- a/src/contactproxymodel.cpp
+++ b/src/contactproxymodel.cpp
@@ -23,7 +23,7 @@
 #include <QtCore/QMimeData>
 #include <QtCore/QCoreApplication>
 
-//SFLPhone
+//Ring
 #include "callmodel.h"
 #include "historymodel.h"
 #include "phonenumber.h"
@@ -31,6 +31,7 @@
 #include "historytimecategorymodel.h"
 #include "contact.h"
 #include "uri.h"
+#include "mime.h"
 #include "contactmodel.h"
 
 class ContactTreeNode;
@@ -191,7 +192,7 @@ ContactProxyModel::ContactProxyModel(int role, bool showAll) : QAbstractItemMode
    d_ptr->m_Role    = role;
    d_ptr->m_ShowAll = showAll;
    d_ptr->m_lCategoryCounter.reserve(32);
-   d_ptr->m_lMimes << MIME_PLAIN_TEXT << MIME_PHONENUMBER;
+   d_ptr->m_lMimes << RingMimes::PLAIN_TEXT << RingMimes::PHONENUMBER;
    connect(ContactModel::instance(),SIGNAL(reloaded()),d_ptr.data(),SLOT(reloadCategories()));
    connect(ContactModel::instance(),SIGNAL(newContactAdded(Contact*)),d_ptr.data(),SLOT(slotContactAdded(Contact*)));
    QHash<int, QByteArray> roles = roleNames();
@@ -357,8 +358,8 @@ bool ContactProxyModel::dropMimeData(const QMimeData *data, Qt::DropAction actio
 {
    Q_UNUSED( action )
    setData(parent,-1,Call::Role::DropState);
-   if (data->hasFormat(MIME_CALLID)) {
-      const QByteArray encodedCallId = data->data( MIME_CALLID    );
+   if (data->hasFormat(RingMimes::CALLID)) {
+      const QByteArray encodedCallId = data->data( RingMimes::CALLID    );
       const QModelIndex targetIdx    = index   ( row,column,parent );
       Call* call                     = CallModel::instance()->getCall ( encodedCallId        );
       if (call && targetIdx.isValid()) {
@@ -507,9 +508,9 @@ QMimeData* ContactProxyModel::mimeData(const QModelIndexList &indexes) const
                const Contact* ct = static_cast<Contact*>(modelItem->getSelf());
                if (ct) {
                   if (ct->phoneNumbers().size() == 1) {
-                     mimeData->setData(MIME_PHONENUMBER , ct->phoneNumbers()[0]->toHash().toUtf8());
+                     mimeData->setData(RingMimes::PHONENUMBER , ct->phoneNumbers()[0]->toHash().toUtf8());
                   }
-                  mimeData->setData(MIME_CONTACT , ct->uid());
+                  mimeData->setData(RingMimes::CONTACT , ct->uid());
                }
                return mimeData;
                } break;
@@ -518,8 +519,8 @@ QMimeData* ContactProxyModel::mimeData(const QModelIndexList &indexes) const
                const QString text = data(index, Qt::DisplayRole).toString();
                const Contact::PhoneNumbers nbs = *static_cast<Contact::PhoneNumbers*>(index.internalPointer());
                const PhoneNumber*          nb  = nbs[index.row()];
-               mimeData->setData(MIME_PLAIN_TEXT , text.toUtf8());
-               mimeData->setData(MIME_PHONENUMBER, nb->toHash().toUtf8());
+               mimeData->setData(RingMimes::PLAIN_TEXT , text.toUtf8());
+               mimeData->setData(RingMimes::PHONENUMBER, nb->toHash().toUtf8());
                return mimeData;
                } break;
             case CategorizedCompositeNode::Type::TOP_LEVEL:
diff --git a/src/contactproxymodel.h b/src/contactproxymodel.h
index 6b3589df..2f475341 100644
--- a/src/contactproxymodel.h
+++ b/src/contactproxymodel.h
@@ -22,7 +22,7 @@
 #include <QtCore/QStringList>
 #include <QtCore/QAbstractItemModel>
 
-//SFLPhone
+//Ring
 #include "../lib/typedefs.h"
 #include "../lib/contact.h"
 class ContactModel;
diff --git a/src/dbus/callmanager-introspec.xml b/src/dbus/callmanager-introspec.xml
index 1b866464..78df357e 100644
--- a/src/dbus/callmanager-introspec.xml
+++ b/src/dbus/callmanager-introspec.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 
 <node name="/callmanager-introspec" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
-    <interface name="org.sflphone.SFLphone.CallManager">
+    <interface name="cx.ring.Ring.CallManager">
 
         <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
             <p>The CallManager interface is used to manage call and conference related actions.</p>
diff --git a/src/dbus/callmanager.cpp b/src/dbus/callmanager.cpp
index 1eb1d2d7..26c9eff3 100644
--- a/src/dbus/callmanager.cpp
+++ b/src/dbus/callmanager.cpp
@@ -24,10 +24,10 @@ CallManagerInterface * DBus::CallManager::interface = nullptr;
 CallManagerInterface & DBus::CallManager::instance(){
    if (!dbus_metaTypeInit) registerCommTypes();
    if (!interface)
-      interface = new CallManagerInterface( "org.sflphone.SFLphone", "/org/sflphone/SFLphone/CallManager", QDBusConnection::sessionBus());
+      interface = new CallManagerInterface( "cx.ring.Ring", "/cx/ring/Ring/CallManager", QDBusConnection::sessionBus());
    if(!interface->connection().isConnected())
-      throw "Error : sflphoned not connected. Service " + interface->service() + " not connected. From call manager interface.";
+      throw "Error : dring not connected. Service " + interface->service() + " not connected. From call manager interface.";
    if (!interface->isValid())
-      throw "SFLphone daemon not available, be sure it running";
+      throw "Dring daemon not available, be sure it running";
    return *interface;
 }
diff --git a/src/dbus/configurationmanager-introspec.xml b/src/dbus/configurationmanager-introspec.xml
index 8cc1c5dc..a947da85 100644
--- a/src/dbus/configurationmanager-introspec.xml
+++ b/src/dbus/configurationmanager-introspec.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" ?>
 <node name="/configurationmanager-introspec" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
-    <interface name="org.sflphone.SFLphone.ConfigurationManager">
+    <interface name="cx.ring.Ring.ConfigurationManager">
 
         <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
             Used to handle the configuration stuff: accounts settings, account registration, user preferences, ...
@@ -74,7 +74,7 @@
         <method name="setAccountDetails" tp:name-for-bindings="setAccountDetails">
             <tp:docstring>
                 Send new account parameters, or account parameters changes, to the core. The hash table is not required to be complete, only the updated parameters may be specified.
-                <tp:rationale>Account settings are written to the configuration file when sflphone properly quits.</tp:rationale>
+                <tp:rationale>Account settings are written to the configuration file when Ring properly quits.</tp:rationale>
                 <tp:rationale>After calling this method, the core will emit the signal <tp:member-ref>accountsChanged</tp:member-ref> with the updated data. The client must subscribe to this signal and use it to update its internal data structure.</tp:rationale>
             </tp:docstring>
             <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="MapStringString"/>
diff --git a/src/dbus/configurationmanager.cpp b/src/dbus/configurationmanager.cpp
index 2a85454e..80a06f6a 100644
--- a/src/dbus/configurationmanager.cpp
+++ b/src/dbus/configurationmanager.cpp
@@ -24,12 +24,12 @@ ConfigurationManagerInterface& DBus::ConfigurationManager::instance()
 {
    if (!dbus_metaTypeInit) registerCommTypes();
    if (!interface)
-      interface = new ConfigurationManagerInterface("org.sflphone.SFLphone", "/org/sflphone/SFLphone/ConfigurationManager", QDBusConnection::sessionBus());
+      interface = new ConfigurationManagerInterface("cx.ring.Ring", "/cx/ring/Ring/ConfigurationManager", QDBusConnection::sessionBus());
    if(!interface->connection().isConnected()) {
-      qDebug() << "Error : sflphoned not connected. Service " << interface->service() << " not connected. From configuration manager interface.";
-      throw "Error : sflphoned not connected. Service " + interface->service() + " not connected. From configuration manager interface.";
+      qDebug() << "Error : dring not connected. Service " << interface->service() << " not connected. From configuration manager interface.";
+      throw "Error : dring not connected. Service " + interface->service() + " not connected. From configuration manager interface.";
    }
    if (!interface->isValid())
-      throw "SFLphone daemon not available, be sure it running";
+      throw "DRing daemon not available, be sure it running";
    return *interface;
 }
diff --git a/src/dbus/instance-introspec.xml b/src/dbus/instance-introspec.xml
index f3d1373a..d8a620bc 100644
--- a/src/dbus/instance-introspec.xml
+++ b/src/dbus/instance-introspec.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" ?>
 <node name="/instance-introspec" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
-	<interface name="org.sflphone.SFLphone.Instance">
+	<interface name="cx.ring.Ring.Instance">
 		<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 		<p>Count the number of clients actually registered to the core. When initializing your client, you need to register it against the core by using this interface.</p>
 		</tp:docstring>
diff --git a/src/dbus/instancemanager.cpp b/src/dbus/instancemanager.cpp
index 1b3002ce..ac0eb541 100644
--- a/src/dbus/instancemanager.cpp
+++ b/src/dbus/instancemanager.cpp
@@ -25,9 +25,9 @@ InstanceInterface& DBus::InstanceManager::instance()
 {
    if (!dbus_metaTypeInit) registerCommTypes();
    if (!interface)
-      interface = new InstanceInterface("org.sflphone.SFLphone", "/org/sflphone/SFLphone/Instance", QDBusConnection::sessionBus());
+      interface = new InstanceInterface("cx.ring.Ring", "/cx/ring/Ring/Instance", QDBusConnection::sessionBus());
    if(!interface->connection().isConnected()) {
-      throw "Error : sflphoned not connected. Service " + interface->service() + " not connected. From instance interface.";
+      throw "Error : dring not connected. Service " + interface->service() + " not connected. From instance interface.";
    }
    return *interface;
 }
diff --git a/src/dbus/presencemanager-introspec.xml b/src/dbus/presencemanager-introspec.xml
index 77b1527a..7aad39b0 100644
--- a/src/dbus/presencemanager-introspec.xml
+++ b/src/dbus/presencemanager-introspec.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 
 <node name="/presencemanager-introspec" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
-    <interface name="org.sflphone.SFLphone.PresenceManager">
+    <interface name="cx.ring.Ring.PresenceManager">
         <!-- METHODS !-->
         <method name="publish" tp:name-for-bindings="publish">
             <tp:added version="1.3.0"/>
diff --git a/src/dbus/presencemanager.cpp b/src/dbus/presencemanager.cpp
index 4d9656e6..0b40f9a2 100644
--- a/src/dbus/presencemanager.cpp
+++ b/src/dbus/presencemanager.cpp
@@ -23,10 +23,10 @@ PresenceManagerInterface& DBus::PresenceManager::instance()
 {
    if (!dbus_metaTypeInit) registerCommTypes();
    if (!interface)
-      interface = new PresenceManagerInterface("org.sflphone.SFLphone", "/org/sflphone/SFLphone/PresenceManager", QDBusConnection::sessionBus());
+      interface = new PresenceManagerInterface("cx.ring.Ring", "/cx/ring/Ring/PresenceManager", QDBusConnection::sessionBus());
 
    if(!interface->connection().isConnected()) {
-      throw "Error : sflphoned not connected. Service " + interface->service() + " not connected. From instance interface.";
+      throw "Error : dring not connected. Service " + interface->service() + " not connected. From instance interface.";
    }
    return *interface;
 }
diff --git a/src/dbus/videomanager-introspec.xml b/src/dbus/videomanager-introspec.xml
index b7773f83..de9761b9 100644
--- a/src/dbus/videomanager-introspec.xml
+++ b/src/dbus/videomanager-introspec.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" ?>
 <node name="/videomanager-introspec" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
-    <interface name="org.sflphone.SFLphone.VideoManager">
+    <interface name="cx.ring.Ring.VideoManager">
         <!-- Video device methods -->
 
         <method name="getDeviceList" tp:name-for-bindings="getDeviceList">
diff --git a/src/dbus/videomanager.cpp b/src/dbus/videomanager.cpp
index d271efd2..4aa75121 100644
--- a/src/dbus/videomanager.cpp
+++ b/src/dbus/videomanager.cpp
@@ -23,10 +23,10 @@ VideoManagerInterface& DBus::VideoManager::instance()
 {
    if (!dbus_metaTypeInit) registerCommTypes();
    if (!interface)
-      interface = new VideoManagerInterface("org.sflphone.SFLphone", "/org/sflphone/SFLphone/VideoManager", QDBusConnection::sessionBus());
+      interface = new VideoManagerInterface("cx.ring.Ring", "/cx/ring/Ring/VideoManager", QDBusConnection::sessionBus());
    
    if(!interface->connection().isConnected()) {
-      throw "Error : sflphoned not connected. Service " + interface->service() + " not connected. From instance interface.";
+      throw "Error : dring not connected. Service " + interface->service() + " not connected. From instance interface.";
    }
    return *interface;
 }
diff --git a/src/historymodel.cpp b/src/historymodel.cpp
index 96745cc3..f762ffcb 100644
--- a/src/historymodel.cpp
+++ b/src/historymodel.cpp
@@ -20,7 +20,8 @@
 //C include
 #include <time.h>
 
-//SFLPhone lib
+//Ring lib
+#include "mime.h"
 #include "dbus/callmanager.h"
 #include "dbus/configurationmanager.h"
 #include "call.h"
@@ -182,7 +183,7 @@ m_Role(Call::Role::FuzzyDate)
 HistoryModel::HistoryModel():QAbstractItemModel(QCoreApplication::instance()),d_ptr(new HistoryModelPrivate(this))
 {
    m_spInstance  = this;
-   d_ptr->m_lMimes << MIME_PLAIN_TEXT << MIME_PHONENUMBER << MIME_HISTORYID;
+   d_ptr->m_lMimes << RingMimes::PLAIN_TEXT << RingMimes::PHONENUMBER << RingMimes::HISTORYID;
    QHash<int, QByteArray> roles = roleNames();
    roles.insert(Call::Role::Name          ,QByteArray("name"          ));
    roles.insert(Call::Role::Number        ,QByteArray("number"        ));
@@ -541,12 +542,12 @@ QMimeData* HistoryModel::mimeData(const QModelIndexList &indexes) const
    foreach (const QModelIndex &idx, indexes) {
       if (idx.isValid()) {
          const QString text = data(idx, Call::Role::Number).toString();
-         mimeData2->setData(MIME_PLAIN_TEXT , text.toUtf8());
+         mimeData2->setData(RingMimes::PLAIN_TEXT , text.toUtf8());
          const Call* call = (Call*)((CategorizedCompositeNode*)(idx.internalPointer()))->getSelf();
-         mimeData2->setData(MIME_PHONENUMBER, call->peerPhoneNumber()->toHash().toUtf8());
+         mimeData2->setData(RingMimes::PHONENUMBER, call->peerPhoneNumber()->toHash().toUtf8());
          CategorizedCompositeNode* node = static_cast<CategorizedCompositeNode*>(idx.internalPointer());
          if (node->type() == CategorizedCompositeNode::Type::CALL)
-            mimeData2->setData(MIME_HISTORYID  , static_cast<Call*>(node->getSelf())->id().toUtf8());
+            mimeData2->setData(RingMimes::HISTORYID  , static_cast<Call*>(node->getSelf())->id().toUtf8());
          return mimeData2;
       }
    }
@@ -560,11 +561,11 @@ bool HistoryModel::dropMimeData(const QMimeData *mime, Qt::DropAction action, in
    Q_UNUSED(column)
    Q_UNUSED(action)
    setData(parentIdx,-1,Call::Role::DropState);
-   QByteArray encodedPhoneNumber = mime->data( MIME_PHONENUMBER );
-   QByteArray encodedContact     = mime->data( MIME_CONTACT     );
+   QByteArray encodedPhoneNumber = mime->data( RingMimes::PHONENUMBER );
+   QByteArray encodedContact     = mime->data( RingMimes::CONTACT     );
 
-   if (parentIdx.isValid() && mime->hasFormat( MIME_CALLID)) {
-      QByteArray encodedCallId      = mime->data( MIME_CALLID      );
+   if (parentIdx.isValid() && mime->hasFormat( RingMimes::CALLID)) {
+      QByteArray encodedCallId      = mime->data( RingMimes::CALLID      );
       Call* call = CallModel::instance()->getCall(encodedCallId);
       if (call) {
          const QModelIndex& idx = index(row,column,parentIdx);
diff --git a/src/historymodel.h b/src/historymodel.h
index 53eb0a12..d699f600 100644
--- a/src/historymodel.h
+++ b/src/historymodel.h
@@ -25,7 +25,7 @@
 
 //Qt
 
-//SFLPhone
+//Ring
 #include "call.h"
 #include "commonbackendmanagerinterface.h"
 
diff --git a/src/imconversationmanager.h b/src/imconversationmanager.h
index 8a9caeee..bf5e31e5 100644
--- a/src/imconversationmanager.h
+++ b/src/imconversationmanager.h
@@ -21,7 +21,7 @@
 
 #include "typedefs.h"
 
-//SFLPhone
+//Ring
 class Call;
 class InstantMessagingModel;
 class IMConversationManagerPrivate;
diff --git a/src/itembackendmodel.h b/src/itembackendmodel.h
index 39080293..1b00a08e 100644
--- a/src/itembackendmodel.h
+++ b/src/itembackendmodel.h
@@ -27,7 +27,7 @@
 #include "contactmodel.h"
 #include "abstractitembackend.h"
 
-//SFLPhone
+//Ring
 class AbstractItemBackendModelExtension;
 
 class CommonItemBackendModelPrivate;
diff --git a/src/legacyhistorybackend.cpp b/src/legacyhistorybackend.cpp
index 9ea0945d..c0e98272 100644
--- a/src/legacyhistorybackend.cpp
+++ b/src/legacyhistorybackend.cpp
@@ -18,7 +18,7 @@
  ***********************************************************************************/
 #include "legacyhistorybackend.h"
 
-//SFLPhone
+//Ring
 #include "dbus/configurationmanager.h"
 #include "call.h"
 #include "private/call_p.h"
diff --git a/src/mime.h b/src/mime.h
new file mode 100644
index 00000000..2fc335d8
--- /dev/null
+++ b/src/mime.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ *   Copyright (C) 2012-2015 by Savoir-Faire Linux                          *
+ *   Author : Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> *
+ *                                                                          *
+ *   This library is free software; you can redistribute it and/or          *
+ *   modify it under the terms of the GNU Lesser General Public             *
+ *   License as published by the Free Software Foundation; either           *
+ *   version 2.1 of the License, or (at your option) any later version.     *
+ *                                                                          *
+ *   This library is distributed in the hope that it will be useful,        *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      *
+ *   Lesser General Public License for more details.                        *
+ *                                                                          *
+ *   You should have received a copy of the GNU General Public License      *
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
+ ***************************************************************************/
+#ifndef MIME_H
+#define MIME_H
+
+namespace RingMimes {
+   constexpr static const char* CALLID      = "text/ring.call.id"      ;
+   constexpr static const char* CONTACT     = "text/ring.contact"      ;
+   constexpr static const char* HISTORYID   = "text/ring.history.id"   ;
+   constexpr static const char* PHONENUMBER = "text/ring.phone.number" ;
+   constexpr static const char* PLAIN_TEXT  = "text/plain"             ;
+}
+
+#endif
+
diff --git a/src/numbercompletionmodel.cpp b/src/numbercompletionmodel.cpp
index 3ff05276..ef16967f 100644
--- a/src/numbercompletionmodel.cpp
+++ b/src/numbercompletionmodel.cpp
@@ -23,7 +23,7 @@
 //System
 #include <cmath>
 
-//SFLPhone
+//Ring
 #include "phonedirectorymodel.h"
 #include "phonenumber.h"
 #include "call.h"
diff --git a/src/numbercompletionmodel.h b/src/numbercompletionmodel.h
index 8698c709..e5af8aea 100644
--- a/src/numbercompletionmodel.h
+++ b/src/numbercompletionmodel.h
@@ -22,7 +22,7 @@
 #include "typedefs.h"
 #include "phonedirectorymodel.h"
 
-//SFLPhone
+//Ring
 class PhoneNumber;
 class Call;
 
diff --git a/src/phonedirectorymodel.cpp b/src/phonedirectorymodel.cpp
index 88cf111e..2e433c02 100644
--- a/src/phonedirectorymodel.cpp
+++ b/src/phonedirectorymodel.cpp
@@ -20,7 +20,7 @@
 //Qt
 #include <QtCore/QCoreApplication>
 
-//SFLPhone
+//Ring
 #include "phonenumber.h"
 #include "call.h"
 #include "uri.h"
diff --git a/src/phonedirectorymodel.h b/src/phonedirectorymodel.h
index 708b9295..ada0013b 100644
--- a/src/phonedirectorymodel.h
+++ b/src/phonedirectorymodel.h
@@ -23,7 +23,7 @@
 #include <QtCore/QString>
 #include <QtCore/QAbstractTableModel>
 
-//SFLPhone
+//Ring
 #include "uri.h"
 class PhoneNumber         ;
 class Contact             ;
diff --git a/src/phonenumber.h b/src/phonenumber.h
index 906fc0a4..3010a377 100644
--- a/src/phonenumber.h
+++ b/src/phonenumber.h
@@ -26,7 +26,7 @@
 #include <QtCore/QSize>
 #include <QtCore/QObject>
 
-//SFLPhone
+//Ring
 #include "uri.h"
 class Account;
 class Contact;
diff --git a/src/presencestatusmodel.cpp b/src/presencestatusmodel.cpp
index fe4f0674..f032fdbf 100644
--- a/src/presencestatusmodel.cpp
+++ b/src/presencestatusmodel.cpp
@@ -20,7 +20,7 @@
 //Qt
 #include <QtCore/QCoreApplication>
 
-//SFLPhone
+//Ring
 #include "accountmodel.h"
 #include "dbus/presencemanager.h"
 #include "visitors/presenceserializationvisitor.h"
@@ -327,7 +327,7 @@ void PresenceStatusModel::setCurrentIndex  (const QModelIndex& index)
    emit currentStatusChanged(d_ptr->m_pCurrentStatus->status);
    for (int i=0; i < AccountModel::instance()->size(); i++) {
       DBus::PresenceManager::instance().publish(
-         (*AccountModel::instance())[1]->id(), d_ptr->m_pCurrentStatus->status,d_ptr->m_pCurrentStatus->message
+         (*AccountModel::instance())[i]->id(), d_ptr->m_pCurrentStatus->status,d_ptr->m_pCurrentStatus->message
       );
    }
 }
diff --git a/src/private/call_p.h b/src/private/call_p.h
index e6f33980..e19b47fe 100644
--- a/src/private/call_p.h
+++ b/src/private/call_p.h
@@ -26,7 +26,7 @@
 class QTimer;
 
 
-//SFLPhone
+//Ring
 class Account;
 class PhoneNumber;
 class UserActionModel;
diff --git a/src/private/phonedirectorymodel_p.h b/src/private/phonedirectorymodel_p.h
index 9c1fe9a0..0435c930 100644
--- a/src/private/phonedirectorymodel_p.h
+++ b/src/private/phonedirectorymodel_p.h
@@ -19,7 +19,7 @@
 #define PHONEDIRECTORYMODEL_PRIVATE_H
 #include <QtCore/QObject>
 
-//SFLphone
+//Ring
 class PhoneDirectoryModel;
 #include "phonenumber.h"
 
diff --git a/src/ringtonemodel.cpp b/src/ringtonemodel.cpp
index 0ef020e0..20e06181 100644
--- a/src/ringtonemodel.cpp
+++ b/src/ringtonemodel.cpp
@@ -20,7 +20,7 @@
 //Qt
 #include <QtCore/QTimer>
 
-//SFLphone
+//Ring
 #include "dbus/configurationmanager.h"
 #include "dbus/callmanager.h"
 #include "account.h"
diff --git a/src/ringtonemodel.h b/src/ringtonemodel.h
index 04dd6c41..fa967726 100644
--- a/src/ringtonemodel.h
+++ b/src/ringtonemodel.h
@@ -24,7 +24,7 @@
 #include <QtCore/QAbstractTableModel>
 class QTimer;
 
-//SFLPhone
+//Ring
 class Account;
 
 ///CredentialModel: A model for account credentials
diff --git a/src/securityvalidationmodel.h b/src/securityvalidationmodel.h
index 101c5dad..27052393 100644
--- a/src/securityvalidationmodel.h
+++ b/src/securityvalidationmodel.h
@@ -19,12 +19,12 @@
 #define SECURITYVALIDATIONMODEL_H
 #include <QAbstractListModel>
 
-//SFLPhone
+//Ring
 #include "certificate.h"
 #include "typedefs.h"
 
 
-//SFLPhone
+//Ring
 class Account;
 class Flaw;
 
@@ -41,7 +41,7 @@ public:
     * 2) Decide if an account can be considered secure
     * 3) Decide if a call can be considered secure
     * 
-    * End users should not have to be security gurus to setup SFLphone. It is our
+    * End users should not have to be security gurus to setup Ring. It is our
     * job to do as much as we can to make security configuration as transparent as
     * possible.
     * 
diff --git a/src/sflphone_const.h b/src/sflphone_const.h
index e11c29e7..95f09919 100644
--- a/src/sflphone_const.h
+++ b/src/sflphone_const.h
@@ -19,45 +19,9 @@
 
 /* THIS FILE IS DEPRECATED DO NOT ADD NEW GLOBAL CONSTANTS */
 
-#ifndef SFLPHONE_CONST_H
-#define SFLPHONE_CONST_H
 
 
-#define ICON_INCOMING                     ":/images/icons/ring.svg"
-#define ICON_RINGING                      ":/images/icons/ring.svg"
-#define ICON_CURRENT                      ":/images/icons/current.svg"
-#define ICON_DIALING                      ":/images/icons/dial.svg"
-#define ICON_HOLD                         ":/images/icons/hold.svg"
-#define ICON_FAILURE                      ":/images/icons/fail.svg"
-#define ICON_BUSY                         ":/images/icons/busy.svg"
-#define ICON_TRANSFER                     ":/images/icons/transfert.svg"
-#define ICON_TRANSF_HOLD                  ":/images/icons/transfert.svg"
-#define ICON_CONFERENCE                   ":/images/icons/user-group-properties.svg"
-#define ICON_CALL                         ":/images/icons/call.svg"
-#define ICON_HANGUP                       ":/images/icons/hang_up.svg"
-#define ICON_UNHOLD                       ":/images/icons/unhold.svg"
-#define ICON_ACCEPT                       ":/images/icons/accept.svg"
-#define ICON_REFUSE                       ":/images/icons/refuse.svg"
-#define ICON_EXEC_TRANSF                  ":/images/icons/call.svg"
-#define ICON_REC_DEL_OFF                  ":/images/icons/record_disabled.svg"
-#define ICON_REC_DEL_ON                   ":/images/icons/record.svg"
-#define ICON_MAILBOX                      ":/images/icons/mailbox.svg"
 
-#define ICON_DISPLAY_VOLUME_CONSTROLS     ":/images/icons/icon_volume_off.svg"
-#define ICON_DISPLAY_DIALPAD              ":/images/icons/icon_dialpad.svg"
-#define ICON_HISTORY_INCOMING             ":/images/icons/incoming.svg"
-#define ICON_HISTORY_OUTGOING             ":/images/icons/outgoing.svg"
-#define ICON_HISTORY_MISSED               ":/images/icons/missed.svg"
-#define ICON_HISTORY_MISSED_OUT           ":/images/icons/missed_out.svg"
-#define ICON_SFLPHONE                     ":/images/icons/sflphone.svg"
 
-// #define ACCOUNT_TYPES_TAB                 {QString(Account::ProtocolName::SIP), QString(Account::ProtocolName::IAX)}
-/*********************/
 
-/** MIME API */
-#define MIME_CALLID           "text/sflphone.call.id"
-#define MIME_CONTACT          "text/sflphone.contact"
-#define MIME_HISTORYID        "text/sflphone.history.id"
-#define MIME_PHONENUMBER      "text/sflphone.phone.number"
-#define MIME_PLAIN_TEXT       "text/plain"
 #endif
diff --git a/src/uri.h b/src/uri.h
index 8322b3aa..608c9db9 100644
--- a/src/uri.h
+++ b/src/uri.h
@@ -27,7 +27,7 @@ class URIPrivate;
 /**
     * @class URI A specialized string with multiple attributes
     * 
-    * Most of SFLPhone-KDE handle uri as strings, but more
+    * Most of Ring-KDE handle uri as strings, but more
     * advanced algorithms need to access the various sections.
     * 
     * Here is some example of common numbers/URIs:
diff --git a/src/video/channel.cpp b/src/video/channel.cpp
index 59de066e..cb335727 100644
--- a/src/video/channel.cpp
+++ b/src/video/channel.cpp
@@ -17,7 +17,7 @@
  ***************************************************************************/
 #include "channel.h"
 
-//SFLphone
+//Ring
 #include "resolution.h"
 #include "device.h"
 #include "../dbus/videomanager.h"
diff --git a/src/video/codecmodel2.h b/src/video/codecmodel2.h
index 75ee9630..4b669148 100644
--- a/src/video/codecmodel2.h
+++ b/src/video/codecmodel2.h
@@ -23,7 +23,7 @@
 
 //Qt
 
-//SFLPhone
+//Ring
 class Account;
 
 //Typedef
diff --git a/src/video/device.h b/src/video/device.h
index 2f1cf6d1..e2cf6e95 100644
--- a/src/video/device.h
+++ b/src/video/device.h
@@ -25,7 +25,7 @@
 #include <QStringList>
 #include <QtCore/QSize>
 
-//SFLPhone
+//Ring
 namespace Video {
    class Renderer;
    class Resolution;
diff --git a/src/video/manager.cpp b/src/video/manager.cpp
index 01ef8008..336eba38 100644
--- a/src/video/manager.cpp
+++ b/src/video/manager.cpp
@@ -20,7 +20,7 @@
 //Qt
 #include <QtCore/QMutex>
 
-//SFLPhone
+//Ring
 #include "../dbus/videomanager.h"
 #include "device.h"
 #include <call.h>
diff --git a/src/video/manager.h b/src/video/manager.h
index 818afd25..2434a16e 100644
--- a/src/video/manager.h
+++ b/src/video/manager.h
@@ -24,7 +24,7 @@
 //Qt
 #include <QtCore/QHash>
 
-//SFLPhone
+//Ring
 #include "device.h"
 namespace Video {
    class Renderer;
diff --git a/src/video/renderer.h b/src/video/renderer.h
index 3f07e910..ed1902f1 100644
--- a/src/video/renderer.h
+++ b/src/video/renderer.h
@@ -28,7 +28,7 @@
 class QTimer;
 class QMutex;
 
-//SFLPhone
+//Ring
 #include "device.h"
 
 //Private
diff --git a/src/video/sourcesmodel.h b/src/video/sourcesmodel.h
index afe1e80b..b8db7319 100644
--- a/src/video/sourcesmodel.h
+++ b/src/video/sourcesmodel.h
@@ -21,7 +21,7 @@
 #include <QtCore/QRect>
 #include "../typedefs.h"
 
-//SFLPhone
+//Ring
 
 namespace Video {
 
diff --git a/src/visitors/accountlistcolorvisitor.h b/src/visitors/accountlistcolorvisitor.h
index 21351c23..77b0991b 100644
--- a/src/visitors/accountlistcolorvisitor.h
+++ b/src/visitors/accountlistcolorvisitor.h
@@ -22,7 +22,7 @@
 #include "../typedefs.h"
 class Account;
 
-///SFLPhonelib Qt does not link to QtGui, and does not need to, this allow to add runtime Gui support
+///Ringlib Qt does not link to QtGui, and does not need to, this allow to add runtime Gui support
 class LIB_EXPORT AccountListColorVisitor {
 public:
    virtual QVariant getColor(const Account* a) = 0;
diff --git a/src/visitors/itemmodelstateserializationvisitor.h b/src/visitors/itemmodelstateserializationvisitor.h
index a462b81f..b7a618ef 100644
--- a/src/visitors/itemmodelstateserializationvisitor.h
+++ b/src/visitors/itemmodelstateserializationvisitor.h
@@ -23,7 +23,7 @@
 class AbstractItemBackendBase;
 class Account;
 
-///SFLPhonelib Qt does not link to QtGui, and does not need to, this allow to add runtime Gui support
+///Ringlib Qt does not link to QtGui, and does not need to, this allow to add runtime Gui support
 class LIB_EXPORT ItemModelStateSerializationVisitor {
 public:
    virtual bool save() = 0;
diff --git a/src/visitors/pixmapmanipulationvisitor.h b/src/visitors/pixmapmanipulationvisitor.h
index b6341b7a..1465bfa5 100644
--- a/src/visitors/pixmapmanipulationvisitor.h
+++ b/src/visitors/pixmapmanipulationvisitor.h
@@ -23,7 +23,7 @@
 #include <QtCore/QVariant>
 #include <QtCore/QModelIndex>
 
-//SFLPhone
+//Ring
 class Contact    ;
 class PhoneNumber;
 class Call       ;
-- 
GitLab