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
73e0f0b7
Commit
73e0f0b7
authored
Jun 26, 2017
by
Wescoeur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(App): add an app directory for plugins
parent
8c2943d6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
31 deletions
+38
-31
App.cpp
src/app/App.cpp
+7
-9
App.hpp
src/app/App.hpp
+0
-1
Paths.cpp
src/app/paths/Paths.cpp
+9
-0
Paths.hpp
src/app/paths/Paths.hpp
+22
-21
No files found.
src/app/App.cpp
View file @
73e0f0b7
...
...
@@ -158,13 +158,17 @@ void App::initContentApp () {
// Don't quit if last window is closed!!!
setQuitOnLastWindowClosed
(
false
);
// Deal with received messages and CLI.
mCli
=
new
Cli
(
this
);
QObject
::
connect
(
this
,
&
App
::
receivedMessage
,
this
,
[
this
](
int
,
const
QByteArray
&
byteArray
)
{
QString
command
(
byteArray
);
qInfo
()
<<
QStringLiteral
(
"Received command from other application: `%1`."
).
arg
(
command
);
executeCommand
(
command
);
mCli
->
executeCommand
(
command
);
});
mCli
=
new
Cli
(
this
);
// Add plugins directory.
addLibraryPath
(
::
Utils
::
coreStringToAppString
(
Paths
::
getPluginsDirPath
()));
qInfo
()
<<
QStringLiteral
(
"Library paths:"
)
<<
libraryPaths
();
}
// Init core.
...
...
@@ -236,12 +240,6 @@ QString App::getCommandArgument () {
// -----------------------------------------------------------------------------
void
App
::
executeCommand
(
const
QString
&
command
)
{
mCli
->
executeCommand
(
command
);
}
// -----------------------------------------------------------------------------
QQuickWindow
*
App
::
getCallsWindow
()
{
if
(
!
mCallsWindow
)
mCallsWindow
=
::
createSubWindow
(
mEngine
,
QML_VIEW_CALLS_WINDOW
);
...
...
@@ -551,7 +549,7 @@ void App::openAppAfterInit () {
{
const
QString
commandArgument
=
getCommandArgument
();
if
(
!
commandArgument
.
isEmpty
())
executeCommand
(
commandArgument
);
mCli
->
executeCommand
(
commandArgument
);
}
#ifdef ENABLE_UPDATE_CHECK
...
...
src/app/App.hpp
View file @
73e0f0b7
...
...
@@ -54,7 +54,6 @@ public:
void
initContentApp
();
QString
getCommandArgument
();
void
executeCommand
(
const
QString
&
command
);
QQmlEngine
*
getEngine
()
{
return
mEngine
;
...
...
src/app/paths/Paths.cpp
View file @
73e0f0b7
...
...
@@ -37,6 +37,7 @@
#define PATH_AVATARS "/avatars/"
#define PATH_CAPTURES "/Linphone/captures/"
#define PATH_LOGS "/logs/"
#define PATH_PLUGINS "/plugins/"
#define PATH_THUMBNAILS "/thumbnails/"
#define PATH_USER_CERTIFICATES "/usr-crt/"
...
...
@@ -139,6 +140,10 @@ inline QString getAppFactoryConfigFilePath () {
return
::
getAppPackageDataDirPath
()
+
PATH_FACTORY_CONFIG
;
}
inline
QString
getAppPluginsDirPath
()
{
return
::
getAppPackageDataDirPath
()
+
PATH_PLUGINS
;
}
inline
QString
getAppRootCaFilePath
()
{
return
::
getAppPackageDataDirPath
()
+
PATH_ROOT_CA
;
}
...
...
@@ -211,6 +216,10 @@ string Paths::getPackageMsPluginsDirPath () {
return
::
getReadableDirPath
(
::
getAppPackageMsPluginsDirPath
());
}
string
Paths
::
getPluginsDirPath
()
{
return
::
getWritableDirPath
(
::
getAppPluginsDirPath
());
}
string
Paths
::
getRootCaFilePath
()
{
return
::
getReadableFilePath
(
::
getAppRootCaFilePath
());
}
...
...
src/app/paths/Paths.hpp
View file @
73e0f0b7
...
...
@@ -30,27 +30,28 @@
// =============================================================================
namespace
Paths
{
bool
filePathExists
(
const
std
::
string
&
path
);
std
::
string
getAssistantConfigDirPath
();
std
::
string
getAvatarsDirPath
();
std
::
string
getCallHistoryFilePath
();
std
::
string
getCapturesDirPath
();
std
::
string
getConfigFilePath
(
const
QString
&
configPath
=
QString
(),
bool
writable
=
true
);
std
::
string
getFactoryConfigFilePath
();
std
::
string
getFriendsListFilePath
();
std
::
string
getDownloadDirPath
();
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
();
void
migrate
();
bool
filePathExists
(
const
std
::
string
&
path
);
std
::
string
getAssistantConfigDirPath
();
std
::
string
getAvatarsDirPath
();
std
::
string
getCallHistoryFilePath
();
std
::
string
getCapturesDirPath
();
std
::
string
getConfigFilePath
(
const
QString
&
configPath
=
QString
(),
bool
writable
=
true
);
std
::
string
getFactoryConfigFilePath
();
std
::
string
getFriendsListFilePath
();
std
::
string
getDownloadDirPath
();
std
::
string
getLogsDirPath
();
std
::
string
getMessageHistoryFilePath
();
std
::
string
getPackageDataDirPath
();
std
::
string
getPackageMsPluginsDirPath
();
std
::
string
getPluginsDirPath
();
std
::
string
getRootCaFilePath
();
std
::
string
getThumbnailsDirPath
();
std
::
string
getUserCertificatesDirPath
();
std
::
string
getZrtpDataFilePath
();
std
::
string
getZrtpSecretsFilePath
();
void
migrate
();
}
#endif // PATHS_H_
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