Commit 2826692c authored by Johan Pascal's avatar Johan Pascal Committed by Jehan Monnier

Set zrtp/lime database path in qt desktop app

parent b8323378
......@@ -43,6 +43,7 @@
#define PATH_FRIENDS_LIST "/friends.db"
#define PATH_MESSAGE_HISTORY_LIST "/message-history.db"
#define PATH_ZRTP_SECRETS "/zidcache"
#define PATH_ZRTP_DATA "/zrtp-lime.db"
using namespace std;
......@@ -199,6 +200,10 @@ string Paths::getZrtpSecretsFilepath () {
return getWritableFilePath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + PATH_ZRTP_SECRETS);
}
string Paths::getZrtpDataFilepath () {
return getWritableFilePath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + PATH_ZRTP_DATA);
}
string Paths::getUserCertificatesDirpath () {
return getWritableDirectoryPath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + PATH_USER_CERTIFICATES);
}
......
......@@ -45,6 +45,7 @@ namespace Paths {
std::string getFriendsListFilepath ();
std::string getMessageHistoryFilepath ();
std::string getZrtpSecretsFilepath ();
std::string getZrtpDataFilepath ();
void migrate ();
}
......
......@@ -92,6 +92,8 @@ void CoreManager::setDatabasesPaths () {
void CoreManager::setOtherPaths () {
m_core->setZrtpSecretsFile(Paths::getZrtpSecretsFilepath());
/* this one is actually a database but it MUST be set after the zrtp secrets as it allows automatic migration from old version(secrets, xml) to new version (data, sqlite)*/
m_core->setZrtpCacheDatabasePath(Paths::getZrtpDataFilepath());
m_core->setUserCertificatesPath(Paths::getUserCertificatesDirpath());
}
......
bzrtp @ 8e9b45db
Subproject commit 556335fee2bbb28e6cbe40510499ef15abef85fb
Subproject commit 8e9b45db8a5ab7deac4a3a2c122af3e5f6239695
linphone @ 9368df72
Subproject commit bfcda8ef5dae3297ed13e6485f6a85fff3e89a46
Subproject commit 9368df723805a7d79f53badb0b64f39a6f6bf978
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment