Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
7afa3950
Commit
7afa3950
authored
Apr 12, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(src/components/core/CoreManager): set root ca file path
parent
8fedfb58
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
26 deletions
+38
-26
Paths.cpp
linphone-desktop/src/app/paths/Paths.cpp
+28
-17
Paths.hpp
linphone-desktop/src/app/paths/Paths.hpp
+7
-8
ContactsListProxyModel.cpp
...esktop/src/components/contacts/ContactsListProxyModel.cpp
+1
-1
CoreManager.cpp
linphone-desktop/src/components/core/CoreManager.cpp
+2
-0
No files found.
linphone-desktop/src/app/paths/Paths.cpp
View file @
7afa3950
...
...
@@ -40,6 +40,7 @@
#define PATH_CALL_HISTORY_LIST "/call-history.db"
#define PATH_CONFIG "/linphonerc"
#define PATH_FACTORY_CONFIG "/linphonerc-factory"
#define PATH_ROOT_CA "/rootca.pem"
#define PATH_FRIENDS_LIST "/friends.db"
#define PATH_MESSAGE_HISTORY_LIST "/message-history.db"
#define PATH_ZRTP_DATA "/zrtp-lime.db"
...
...
@@ -100,50 +101,56 @@ inline string getWritableFilePath (const QString &filename) {
return
getReadableFilePath
(
filename
);
}
static
QString
getAppPackageDataDirpath
()
{
// -----------------------------------------------------------------------------
inline
QString
getAppPackageDataDirpath
()
{
QDir
dir
(
QCoreApplication
::
applicationDirPath
());
if
(
dir
.
dirName
()
==
"MacOS"
)
{
dir
.
cdUp
();
dir
.
cd
(
"Resources"
);
}
else
{
}
else
dir
.
cdUp
();
}
dir
.
cd
(
"share/linphone"
);
return
dir
.
absolutePath
();
}
static
QString
getAppPackageMsPluginsDirpath
()
{
inline
QString
getAppPackageMsPluginsDirpath
()
{
QDir
dir
(
QCoreApplication
::
applicationDirPath
());
if
(
dir
.
dirName
()
==
"MacOS"
)
{
dir
.
cdUp
();
dir
.
cd
(
"Resources"
);
}
else
{
}
else
dir
.
cdUp
();
}
dir
.
cd
(
MSPLUGINS_DIR
);
return
dir
.
absolutePath
();
}
static
QString
getAppConfigFilepath
()
{
inline
QString
getAppConfigFilepath
()
{
if
(
QSysInfo
::
productType
()
==
"macos"
)
return
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_CONFIG
;
return
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppConfigLocation
)
+
PATH_CONFIG
;
}
static
QString
getAppCallHistoryFilepath
()
{
inline
QString
getAppCallHistoryFilepath
()
{
return
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_CALL_HISTORY_LIST
;
}
static
QString
getAppFactoryConfigFilepath
()
{
inline
QString
getAppFactoryConfigFilepath
()
{
return
getAppPackageDataDirpath
()
+
PATH_FACTORY_CONFIG
;
}
static
QString
getAppFriendsFilepath
()
{
inline
QString
getAppRootCaFilepath
()
{
return
getAppPackageDataDirpath
()
+
PATH_ROOT_CA
;
}
inline
QString
getAppFriendsFilepath
()
{
return
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_FRIENDS_LIST
;
}
static
QString
getAppMessageHistoryFilepath
()
{
inline
QString
getAppMessageHistoryFilepath
()
{
return
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_MESSAGE_HISTORY_LIST
;
}
...
...
@@ -157,6 +164,10 @@ string Paths::getCallHistoryFilepath () {
return
getWritableFilePath
(
getAppCallHistoryFilepath
());
}
string
Paths
::
getCapturesDirpath
()
{
return
getWritableDirectoryPath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_CAPTURES
);
}
string
Paths
::
getConfigFilepath
(
const
QString
&
config_path
)
{
if
(
!
config_path
.
isEmpty
())
return
getWritableFilePath
(
QFileInfo
(
config_path
).
absoluteFilePath
());
...
...
@@ -188,12 +199,16 @@ string Paths::getPackageMsPluginsDirpath () {
return
getReadableDirectoryPath
(
getAppPackageMsPluginsDirpath
());
}
string
Paths
::
getRootCaFilepath
()
{
return
getReadableFilePath
(
getAppRootCaFilepath
());
}
string
Paths
::
getThumbnailsDirpath
()
{
return
getWritableDirectoryPath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_THUMBNAILS
);
}
string
Paths
::
get
Captur
esDirpath
()
{
return
getWritableDirectoryPath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_
CAPTUR
ES
);
string
Paths
::
get
UserCertificat
esDirpath
()
{
return
getWritableDirectoryPath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_
USER_CERTIFICAT
ES
);
}
string
Paths
::
getZrtpDataFilepath
()
{
...
...
@@ -204,10 +219,6 @@ string Paths::getZrtpSecretsFilepath () {
return
getWritableFilePath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
CacheLocation
)
+
PATH_ZRTP_SECRETS
);
}
string
Paths
::
getUserCertificatesDirpath
()
{
return
getWritableDirectoryPath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_USER_CERTIFICATES
);
}
// -----------------------------------------------------------------------------
static
void
migrateFile
(
const
QString
&
old_path
,
const
QString
&
new_path
)
{
...
...
linphone-desktop/src/app/paths/Paths.hpp
View file @
7afa3950
...
...
@@ -31,19 +31,18 @@
namespace
Paths
{
std
::
string
getAvatarsDirpath
();
std
::
string
getCapturesDirpath
();
std
::
string
getLogsDirpath
();
std
::
string
getThumbnailsDirpath
();
std
::
string
getUserCertificatesDirpath
();
std
::
string
getPackageDataDirpath
();
std
::
string
getPackageMsPluginsDirpath
();
std
::
string
getCallHistoryFilepath
();
std
::
string
getCapturesDirpath
();
std
::
string
getConfigFilepath
(
const
QString
&
config_path
=
QString
());
std
::
string
getFactoryConfigFilepath
();
std
::
string
getFriendsListFilepath
();
std
::
string
getLogsDirpath
();
std
::
string
getMessageHistoryFilepath
();
std
::
string
getPackageDataDirpath
();
std
::
string
getPackageMsPluginsDirpath
();
std
::
string
getRootCaFilepath
();
std
::
string
getThumbnailsDirpath
();
std
::
string
getUserCertificatesDirpath
();
std
::
string
getZrtpDataFilepath
();
std
::
string
getZrtpSecretsFilepath
();
...
...
linphone-desktop/src/components/contacts/ContactsListProxyModel.cpp
View file @
7afa3950
...
...
@@ -146,6 +146,6 @@ float ContactsListProxyModel::computeContactWeight (const ContactModel *contact)
void
ContactsListProxyModel
::
setConnectedFilter
(
bool
use_connected_filter
)
{
if
(
use_connected_filter
!=
m_use_connected_filter
)
{
m_use_connected_filter
=
use_connected_filter
;
invalidate
Filter
();
invalidate
();
}
}
linphone-desktop/src/components/core/CoreManager.cpp
View file @
7afa3950
...
...
@@ -99,6 +99,8 @@ void CoreManager::setOtherPaths () {
m_core
->
setZrtpCacheDatabasePath
(
Paths
::
getZrtpDataFilepath
());
m_core
->
setUserCertificatesPath
(
Paths
::
getUserCertificatesDirpath
());
m_core
->
setRootCa
(
Paths
::
getRootCaFilepath
());
}
void
CoreManager
::
setResourcesPaths
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment