diff --git a/src/core/core.cpp b/src/core/core.cpp index 9b43fe38c..ac7de2350 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -69,12 +69,12 @@ const list> &Core::getChatRooms () const { return d->chatRooms; } -const std::string &Core::getDataPath() const { +string Core::getDataPath() const { L_D(); return Paths::getPath(Paths::Data, static_cast(d->cCore->platform_helper)); } -const std::string &Core::getConfigPath() const { +string Core::getConfigPath() const { L_D(); return Paths::getPath(Paths::Config, static_cast(d->cCore->platform_helper)); } diff --git a/src/core/core.h b/src/core/core.h index 6a6086989..1e1c169a5 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -39,8 +39,8 @@ public: std::shared_ptr createClientGroupChatRoom (const std::string &subject); std::shared_ptr getOrCreateChatRoom (const std::string &peerAddress, bool isRtt = false) const; const std::list> &getChatRooms () const; - const std::string &getDataPath() const; - const std::string &getConfigPath() const; + std::string getDataPath() const; + std::string getConfigPath() const; private: L_DECLARE_PRIVATE(Core); diff --git a/src/core/paths/paths-android.cpp b/src/core/paths/paths-android.cpp index 84533965d..b53adbd22 100644 --- a/src/core/paths/paths-android.cpp +++ b/src/core/paths/paths-android.cpp @@ -28,14 +28,14 @@ LINPHONE_BEGIN_NAMESPACE -const std::string &SysPaths::getDataPath (PlatformHelpers *platformHelper) { +std::string SysPaths::getDataPath (PlatformHelpers *platformHelper) { if (!platformHelper) { return Utils::getEmptyConstRefObject(); } return platformHelper->getDataPath(); } -const std::string &SysPaths::getConfigPath (PlatformHelpers *platformHelper) { +std::string SysPaths::getConfigPath (PlatformHelpers *platformHelper) { if (!platformHelper) { return Utils::getEmptyConstRefObject(); } diff --git a/src/core/paths/paths-android.h b/src/core/paths/paths-android.h index ab4848028..7661ebb59 100644 --- a/src/core/paths/paths-android.h +++ b/src/core/paths/paths-android.h @@ -30,8 +30,8 @@ LINPHONE_BEGIN_NAMESPACE class PlatformHelpers; namespace SysPaths { - LINPHONE_PUBLIC const std::string &getDataPath (PlatformHelpers *platformHelper); - LINPHONE_PUBLIC const std::string &getConfigPath (PlatformHelpers *platformHelper); + LINPHONE_PUBLIC std::string getDataPath (PlatformHelpers *platformHelper); + LINPHONE_PUBLIC std::string getConfigPath (PlatformHelpers *platformHelper); } LINPHONE_END_NAMESPACE diff --git a/src/core/paths/paths-apple.h b/src/core/paths/paths-apple.h index f8b031892..acfe25ff0 100644 --- a/src/core/paths/paths-apple.h +++ b/src/core/paths/paths-apple.h @@ -30,8 +30,8 @@ LINPHONE_BEGIN_NAMESPACE class PlatformHelpers; namespace SysPaths { - LINPHONE_PUBLIC const std::string &getDataPath (PlatformHelpers *platformHelper); - LINPHONE_PUBLIC const std::string &getConfigPath (PlatformHelpers *platformHelper); + LINPHONE_PUBLIC std::string getDataPath (PlatformHelpers *platformHelper); + LINPHONE_PUBLIC std::string getConfigPath (PlatformHelpers *platformHelper); } LINPHONE_END_NAMESPACE diff --git a/src/core/paths/paths-apple.mm b/src/core/paths/paths-apple.mm index e4d272713..97bbef63b 100644 --- a/src/core/paths/paths-apple.mm +++ b/src/core/paths/paths-apple.mm @@ -30,7 +30,7 @@ LINPHONE_BEGIN_NAMESPACE -const std::string &SysPaths::getDataPath (PlatformHelpers *platformHelper) { +std::string SysPaths::getDataPath (PlatformHelpers *platformHelper) { #ifdef __OBJC__ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES); NSString *writablePath = [paths objectAtIndex:0]; @@ -41,7 +41,7 @@ const std::string &SysPaths::getDataPath (PlatformHelpers *platformHelper) { return Utils::getEmptyConstRefObject(); } -const std::string &SysPaths::getConfigPath (PlatformHelpers *platformHelper) { +std::string SysPaths::getConfigPath (PlatformHelpers *platformHelper) { #ifdef __OBJC__ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES); NSString *configPath = [paths objectAtIndex:0]; diff --git a/src/core/paths/paths-linux.cpp b/src/core/paths/paths-linux.cpp index f1662690c..7dd122b18 100644 --- a/src/core/paths/paths-linux.cpp +++ b/src/core/paths/paths-linux.cpp @@ -26,12 +26,12 @@ LINPHONE_BEGIN_NAMESPACE -const std::string &SysPaths::getDataPath (PlatformHelpers *platformHelper) { +std::string SysPaths::getDataPath (PlatformHelpers *platformHelper) { //TODO. return Utils::getEmptyConstRefObject(); } -const std::string &SysPaths::getConfigPath (PlatformHelpers *platformHelper) { +std::string SysPaths::getConfigPath (PlatformHelpers *platformHelper) { //TODO. return Utils::getEmptyConstRefObject(); } diff --git a/src/core/paths/paths-linux.h b/src/core/paths/paths-linux.h index 6e7f4e4c5..cc652b833 100644 --- a/src/core/paths/paths-linux.h +++ b/src/core/paths/paths-linux.h @@ -30,8 +30,8 @@ LINPHONE_BEGIN_NAMESPACE class PlatformHelpers; namespace SysPaths { - LINPHONE_PUBLIC const std::string &getDataPath (PlatformHelpers *platformHelper); - LINPHONE_PUBLIC const std::string &getConfigPath (PlatformHelpers *platformHelper); + LINPHONE_PUBLIC std::string getDataPath (PlatformHelpers *platformHelper); + LINPHONE_PUBLIC std::string getConfigPath (PlatformHelpers *platformHelper); } LINPHONE_END_NAMESPACE diff --git a/src/core/paths/paths-windows.cpp b/src/core/paths/paths-windows.cpp index 749f62afa..94b8705ca 100644 --- a/src/core/paths/paths-windows.cpp +++ b/src/core/paths/paths-windows.cpp @@ -26,12 +26,12 @@ LINPHONE_BEGIN_NAMESPACE -const std::string &SysPaths::getDataPath (PlatformHelpers *platformHelper) { +std::string SysPaths::getDataPath (PlatformHelpers *platformHelper) { //TODO. return Utils::getEmptyConstRefObject(); } -const std::string &SysPaths::getConfigPath (PlatformHelpers *platformHelper) { +std::string SysPaths::getConfigPath (PlatformHelpers *platformHelper) { //TODO. return Utils::getEmptyConstRefObject(); } diff --git a/src/core/paths/paths-windows.h b/src/core/paths/paths-windows.h index 7390b3b83..137be1f87 100644 --- a/src/core/paths/paths-windows.h +++ b/src/core/paths/paths-windows.h @@ -30,8 +30,8 @@ LINPHONE_BEGIN_NAMESPACE class PlatformHelpers; namespace SysPaths { - LINPHONE_PUBLIC const std::string &getDataPath (PlatformHelpers *platformHelper); - LINPHONE_PUBLIC const std::string &getConfigPath (PlatformHelpers *platformHelper); + LINPHONE_PUBLIC std::string getDataPath (PlatformHelpers *platformHelper); + LINPHONE_PUBLIC std::string getConfigPath (PlatformHelpers *platformHelper); } LINPHONE_END_NAMESPACE diff --git a/src/core/paths/paths.cpp b/src/core/paths/paths.cpp index c9172c454..01987fec5 100644 --- a/src/core/paths/paths.cpp +++ b/src/core/paths/paths.cpp @@ -38,7 +38,7 @@ using namespace std; LINPHONE_BEGIN_NAMESPACE -const string &Paths::getPath (Paths::Type type, PlatformHelpers *platformHelper) { +string Paths::getPath (Paths::Type type, PlatformHelpers *platformHelper) { switch (type) { case Data: return SysPaths::getDataPath(platformHelper); diff --git a/src/core/paths/paths.h b/src/core/paths/paths.h index ae4355f2b..e600a067e 100644 --- a/src/core/paths/paths.h +++ b/src/core/paths/paths.h @@ -35,7 +35,7 @@ namespace Paths { Config }; - LINPHONE_PUBLIC const std::string &getPath(Type type, PlatformHelpers *platformHelper); + LINPHONE_PUBLIC std::string getPath(Type type, PlatformHelpers *platformHelper); } LINPHONE_END_NAMESPACE