Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
savoirfairelinux
jami-lrc
Commits
2bffc30f
Commit
2bffc30f
authored
Jul 13, 2020
by
Aline Gondim Santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix windows build
Change-Id: Ie03359a3550c39e9d223e4e8aee2bcc664d454aa
parent
f1963250
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
7 deletions
+73
-7
CMakeLists.txt
CMakeLists.txt
+11
-5
src/qtwrapper/CMakeLists.txt
src/qtwrapper/CMakeLists.txt
+6
-0
src/qtwrapper/pluginmanager_wrap.h
src/qtwrapper/pluginmanager_wrap.h
+56
-2
No files found.
CMakeLists.txt
View file @
2bffc30f
...
...
@@ -81,6 +81,13 @@ FIND_PACKAGE(Qt5LinguistTools) # translations
FIND_PACKAGE
(
Qt5Sql REQUIRED
)
FIND_PACKAGE
(
Qt5Gui REQUIRED
)
IF
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Linux"
)
MESSAGE
(
STATUS
"PLUGIN enabled"
)
SET
(
ENABLE_PLUGIN 0 CACHE BOOLEAN
"Enable plugin"
)
SET
(
ENABLE_PLUGIN true
)
add_definitions
(
-DENABLE_PLUGIN=true
)
ENDIF
()
IF
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Linux"
AND NOT ENABLE_LIBWRAP
)
FIND_PACKAGE
(
Qt5DBus
)
ELSE
()
...
...
@@ -238,11 +245,10 @@ IF(NOT (${ENABLE_VIDEO} MATCHES false))
add_definitions
(
-DENABLE_VIDEO=true
)
ENDIF
(
NOT
(
${
ENABLE_VIDEO
}
MATCHES false
))
IF
(
NOT
(
${
ENABLE_PLUGIN
}
MATCHES false
))
MESSAGE
(
STATUS
"PLUGIN enabled"
)
SET
(
ENABLE_PLUGIN 1 CACHE BOOLEAN
"Enable plugin"
)
add_definitions
(
-DENABLE_PLUGIN=true
)
ENDIF
(
NOT
(
${
ENABLE_PLUGIN
}
MATCHES false
))
IF
(
NOT
(
${
ENABLE_PLUGIN
}
MATCHES true
))
MESSAGE
(
STATUS
"PLUGIN disabled"
)
SET
(
ENABLE_PLUGIN 0 CACHE BOOLEAN
"Disable plugin"
)
ENDIF
(
NOT
(
${
ENABLE_PLUGIN
}
MATCHES true
))
# ADD_DEFINITIONS(-DQT_DISABLE_DEPRECATED_BEFORE=1)
...
...
src/qtwrapper/CMakeLists.txt
View file @
2bffc30f
...
...
@@ -34,6 +34,12 @@ IF(NOT (${ENABLE_VIDEO} MATCHES "false"))
SET
(
ENABLE_VIDEO 1 CACHE BOOLEAN
"Enable video"
)
ENDIF
(
NOT
(
${
ENABLE_VIDEO
}
MATCHES
"false"
))
IF
(
NOT
(
${
ENABLE_PLUGIN
}
MATCHES
"true"
))
MESSAGE
(
"PLUGIN disabled"
)
ADD_DEFINITIONS
(
-DENABLE_PLUGIN=false
)
SET
(
ENABLE_PLUGIN 0 CACHE BOOLEAN
"Disable plugin"
)
ENDIF
(
NOT
(
${
ENABLE_PLUGIN
}
MATCHES
"true"
))
INCLUDE_DIRECTORIES
(
SYSTEM
${
Qt5Core_INCLUDE_DIRS
}
)
INCLUDE_DIRECTORIES
(
${
CMAKE_CURRENT_SOURCE_DIR
}
)
INCLUDE_DIRECTORIES
(
${
ring_INCLUDE_DIRS
}
)
...
...
src/qtwrapper/pluginmanager_wrap.h
View file @
2bffc30f
...
...
@@ -27,7 +27,9 @@
#include <QtCore/QTimer>
#include "typedefs.h"
#ifdef ENABLE_PLUGIN
#include <plugin_manager_interface.h>
#endif
#include "conversions_wrap.hpp"
...
...
@@ -46,69 +48,121 @@ public Q_SLOTS: // METHODS
bool
loadPlugin
(
const
QString
&
path
)
{
#ifdef ENABLE_PLUGIN
return
DRing
::
loadPlugin
(
path
.
toStdString
());
#else
return
false
;
#endif
}
bool
unloadPlugin
(
const
QString
&
path
)
{
#ifdef ENABLE_PLUGIN
return
DRing
::
unloadPlugin
(
path
.
toStdString
());
#else
return
false
;
#endif
}
MapStringString
getPluginDetails
(
const
QString
&
path
)
{
MapStringString
temp
=
convertMap
(
DRing
::
getPluginDetails
(
path
.
toStdString
()));
#ifdef ENABLE_PLUGIN
return
convertMap
(
DRing
::
getPluginDetails
(
path
.
toStdString
()));
#else
MapStringString
temp
;
return
temp
;
#endif
}
QStringList
listAvailablePlugins
()
{
#ifdef ENABLE_PLUGIN
return
convertStringList
(
DRing
::
listAvailablePlugins
());
#else
QStringList
temp
;
return
temp
;
#endif
}
QStringList
listLoadedPlugins
()
{
#ifdef ENABLE_PLUGIN
return
convertStringList
(
DRing
::
listLoadedPlugins
());
#else
QStringList
temp
;
return
temp
;
#endif
}
int
installPlugin
(
const
QString
&
jplPath
,
bool
force
)
{
#ifdef ENABLE_PLUGIN
return
DRing
::
installPlugin
(
jplPath
.
toStdString
(),
force
);
#else
return
0
;
#endif
}
int
uninstallPlugin
(
const
QString
&
pluginRootPath
)
{
#ifdef ENABLE_PLUGIN
return
DRing
::
uninstallPlugin
(
pluginRootPath
.
toStdString
());
#else
return
0
;
#endif
}
QStringList
listCallMediaHandlers
()
{
#ifdef ENABLE_PLUGIN
return
convertStringList
(
DRing
::
listCallMediaHandlers
());
#else
QStringList
temp
;
return
temp
;
#endif
}
void
toggleCallMediaHandler
(
const
QString
&
id
,
bool
toggle
)
{
#ifdef ENABLE_PLUGIN
DRing
::
toggleCallMediaHandler
(
id
.
toStdString
(),
toggle
);
#endif
}
MapStringString
getCallMediaHandlerStatus
()
{
#ifdef ENABLE_PLUGIN
return
convertMap
(
DRing
::
getCallMediaHandlerStatus
());
#else
MapStringString
temp
;
return
temp
;
#endif
}
MapStringString
getCallMediaHandlerDetails
(
const
QString
&
id
)
{
#ifdef ENABLE_PLUGIN
return
convertMap
(
DRing
::
getCallMediaHandlerDetails
(
id
.
toStdString
()));
#else
MapStringString
temp
;
return
temp
;
#endif
}
void
setPluginsEnabled
(
bool
enable
)
{
#ifdef ENABLE_PLUGIN
DRing
::
setPluginsEnabled
(
enable
);
#endif
}
bool
getPluginsEnabled
()
{
#ifdef ENABLE_PLUGIN
return
DRing
::
getPluginsEnabled
();
#else
return
false
;
#endif
}
};
...
...
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