mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
plugin: add plugin to dbus interface
Change-Id: I0bdffd53e9ba9463e3daacbc0641ab82e1ba89dd
This commit is contained in:
@ -29,6 +29,11 @@ dbusconfigurationmanager.adaptor.h: cx.ring.Ring.ConfigurationManager.xml Makefi
|
||||
dbusinstance.adaptor.h: cx.ring.Ring.Instance.xml Makefile.am
|
||||
dbusxx-xml2cpp $< --adaptor=$@
|
||||
|
||||
BUILT_SOURCES+=dbuspluginmanagerinterface.adaptor.h
|
||||
# Rule to generate the binding headers
|
||||
dbuspluginmanagerinterface.adaptor.h: cx.ring.Ring.PluginManagerInterface.xml Makefile.am
|
||||
dbusxx-xml2cpp $< --adaptor=$@
|
||||
|
||||
libclient_dbus_la_SOURCES = \
|
||||
dbuscallmanager.cpp \
|
||||
dbuscallmanager.h \
|
||||
@ -41,6 +46,8 @@ libclient_dbus_la_SOURCES = \
|
||||
dbus_cpp.h \
|
||||
dbuspresencemanager.cpp \
|
||||
dbuspresencemanager.h \
|
||||
dbuspluginmanagerinterface.cpp \
|
||||
dbuspluginmanagerinterface.h \
|
||||
$(BUILT_SOURCES)
|
||||
|
||||
if ENABLE_VIDEO
|
||||
@ -64,7 +71,8 @@ interfacedir = $(datadir)/dbus-1/interfaces
|
||||
interface_DATA = cx.ring.Ring.CallManager.xml \
|
||||
cx.ring.Ring.ConfigurationManager.xml \
|
||||
cx.ring.Ring.Instance.xml \
|
||||
cx.ring.Ring.PresenceManager.xml
|
||||
cx.ring.Ring.PresenceManager.xml \
|
||||
cx.ring.Ring.PluginManagerInterface.xml
|
||||
|
||||
if ENABLE_VIDEO
|
||||
interface_DATA += cx.ring.Ring.VideoManager.xml
|
||||
|
129
bin/dbus/cx.ring.Ring.PluginManagerInterface.xml
Normal file
129
bin/dbus/cx.ring.Ring.PluginManagerInterface.xml
Normal file
@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<node name="/cx.ring.Ring.PluginManagerInterface" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
|
||||
<interface name="cx.ring.Ring.PluginManagerInterface">
|
||||
<!-- METHODS !-->
|
||||
<method name="loadPlugin" tp:name-for-bindings="loadPlugin">
|
||||
<tp:added version="0.0.0"/>
|
||||
<arg type="s" name="path" direction="in">
|
||||
</arg>
|
||||
<arg type="b" name="loaded" direction="out">
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="unloadPlugin" tp:name-for-bindings="unloadPlugin">
|
||||
<tp:added version="0.0.0"/>
|
||||
<arg type="s" name="path" direction="in">
|
||||
</arg>
|
||||
<arg type="b" name="unloaded" direction="out">
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="togglePlugin" tp:name-for-bindings="togglePlugin">
|
||||
<tp:added version="0.0.0"/>
|
||||
<arg type="s" name="path" direction="in">
|
||||
</arg>
|
||||
<arg type="b" name="toggle" direction="in">
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="getPluginDetails" tp:name-for-bindings="getPluginDetails">
|
||||
<tp:added version="0.0.0"/>
|
||||
<arg type="s" name="path" direction="in">
|
||||
</arg>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="MapStringString"/>
|
||||
<arg type="a{ss}" name="details" direction="out" tp:type="String_String_Map">
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="getPluginPreferences" tp:name-for-bindings="getPluginPreferences">
|
||||
<tp:added version="0.0.0"/>
|
||||
<arg type="s" name="path" direction="in">
|
||||
</arg>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="VectorMapStringString"/>
|
||||
<arg type="aa{ss}" name="PluginPreferences" direction="out" tp:type="String_String_Map">
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="setPluginPreference" tp:name-for-bindings="setPluginPreference">
|
||||
<tp:added version="0.0.0"/>
|
||||
<arg type="s" name="path" direction="in">
|
||||
</arg>
|
||||
<arg type="s" name="key" direction="in">
|
||||
</arg>
|
||||
<arg type="s" name="value" direction="in">
|
||||
</arg>
|
||||
<arg type="b" name="pluginPreferencesSet" direction="out">
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="getPluginPreferencesValues" tp:name-for-bindings="getPluginPreferencesValues">
|
||||
<tp:added version="0.0.0"/>
|
||||
<arg type="s" name="path" direction="in">
|
||||
</arg>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="MapStringString"/>
|
||||
<arg type="a{ss}" name="preferencesValues" direction="out" tp:type="String_String_Map">
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="resetPluginPreferencesValues" tp:name-for-bindings="resetPluginPreferencesValues">
|
||||
<tp:added version="0.0.0"/>
|
||||
<arg type="s" name="path" direction="in">
|
||||
</arg>
|
||||
<arg type="b" name="reset" direction="out">
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="listAvailablePlugins" tp:name-for-bindings="listAvailablePlugins">
|
||||
<tp:added version="0.0.0"/>
|
||||
<arg type="as" name="availablePlugins" direction="out">
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="listLoadedPlugins" tp:name-for-bindings="listLoadedPlugins">
|
||||
<tp:added version="0.0.0"/>
|
||||
<arg type="as" name="LoadedPlugins" direction="out">
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="installPlugin" tp:name-for-bindings="installPlugin">
|
||||
<tp:added version="0.0.0"/>
|
||||
<arg type="s" name="jplPath" direction="in">
|
||||
</arg>
|
||||
<arg type="b" name="force" direction="in">
|
||||
</arg>
|
||||
<arg type="i" name="instaled" direction="out">
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="uninstallPlugin" tp:name-for-bindings="uninstallPlugin">
|
||||
<tp:added version="0.0.0"/>
|
||||
<arg type="s" name="pluginRootPath" direction="in">
|
||||
</arg>
|
||||
<arg type="i" name="uninstaled" direction="out">
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="listCallMediaHandlers" tp:name-for-bindings="listCallMediaHandlers">
|
||||
<tp:added version="0.0.0"/>
|
||||
<arg type="as" name="listCallMediaHandlers" direction="out">
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="toggleCallMediaHandler" tp:name-for-bindings="toggleCallMediaHandler">
|
||||
<tp:added version="0.0.0"/>
|
||||
<arg type="s" name="id" direction="in">
|
||||
</arg>
|
||||
<arg type="b" name="toggle" direction="in">
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="getCallMediaHandlerDetails" tp:name-for-bindings="getCallMediaHandlerDetails">
|
||||
<tp:added version="0.0.0"/>
|
||||
<arg type="s" name="id" direction="in">
|
||||
</arg>
|
||||
<arg type="a{ss}" name="CallMediaHandlerDetails" direction="out">
|
||||
</arg>
|
||||
</method>
|
||||
</interface>
|
||||
</node>
|
@ -38,6 +38,9 @@
|
||||
#include "dbuspresencemanager.h"
|
||||
#include "presencemanager_interface.h"
|
||||
|
||||
#include "dbuspluginmanagerinterface.h"
|
||||
#include "plugin_manager_interface.h"
|
||||
|
||||
#include "datatransfer_interface.h"
|
||||
|
||||
#ifdef ENABLE_VIDEO
|
||||
@ -84,6 +87,7 @@ DBusClient::DBusClient(int flags, bool persistent)
|
||||
callManager_.reset(new DBusCallManager {sessionConnection});
|
||||
configurationManager_.reset(new DBusConfigurationManager {sessionConnection});
|
||||
presenceManager_.reset(new DBusPresenceManager {sessionConnection});
|
||||
pluginManagerInterface_.reset(new DBusPluginManagerInterface{sessionConnection});
|
||||
|
||||
DBusInstance::OnNoMoreClientFunc onNoMoreClientFunc;
|
||||
if (!persistent)
|
||||
@ -116,6 +120,7 @@ DBusClient::~DBusClient()
|
||||
presenceManager_.reset();
|
||||
configurationManager_.reset();
|
||||
callManager_.reset();
|
||||
pluginManagerInterface_.reset();
|
||||
}
|
||||
|
||||
int
|
||||
@ -136,6 +141,7 @@ DBusClient::initLibrary(int flags)
|
||||
auto callM = callManager_.get();
|
||||
auto confM = configurationManager_.get();
|
||||
auto presM = presenceManager_.get();
|
||||
auto plugM = pluginManagerInterface_.get();
|
||||
|
||||
#ifdef ENABLE_VIDEO
|
||||
using DRing::VideoSignal;
|
||||
|
@ -33,6 +33,7 @@ class DBusCallManager;
|
||||
class DBusNetworkManager;
|
||||
class DBusInstance;
|
||||
class DBusPresenceManager;
|
||||
class DBusPluginManagerInterface;
|
||||
|
||||
#ifdef ENABLE_VIDEO
|
||||
class DBusVideoManager;
|
||||
@ -55,13 +56,14 @@ class DRING_PUBLIC DBusClient {
|
||||
int initLibrary(int flags);
|
||||
void finiLibrary() noexcept;
|
||||
|
||||
std::unique_ptr<DBus::BusDispatcher> dispatcher_;
|
||||
std::unique_ptr<DBus::DefaultTimeout> timeout_;
|
||||
std::unique_ptr<DBus::BusDispatcher> dispatcher_;
|
||||
std::unique_ptr<DBus::DefaultTimeout> timeout_;
|
||||
|
||||
std::unique_ptr<DBusCallManager> callManager_;
|
||||
std::unique_ptr<DBusConfigurationManager> configurationManager_;
|
||||
std::unique_ptr<DBusPresenceManager> presenceManager_;
|
||||
std::unique_ptr<DBusInstance> instanceManager_;
|
||||
std::unique_ptr<DBusCallManager> callManager_;
|
||||
std::unique_ptr<DBusConfigurationManager> configurationManager_;
|
||||
std::unique_ptr<DBusPresenceManager> presenceManager_;
|
||||
std::unique_ptr<DBusInstance> instanceManager_;
|
||||
std::unique_ptr<DBusPluginManagerInterface> pluginManagerInterface_;
|
||||
|
||||
#ifdef ENABLE_VIDEO
|
||||
std::unique_ptr<DBusVideoManager> videoManager_;
|
||||
|
116
bin/dbus/dbuspluginmanagerinterface.cpp
Normal file
116
bin/dbus/dbuspluginmanagerinterface.cpp
Normal file
@ -0,0 +1,116 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2020 Savoir-faire Linux Inc.
|
||||
*
|
||||
* Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "dbuspluginmanagerinterface.h"
|
||||
#include "dring/plugin_manager_interface.h"
|
||||
|
||||
DBusPluginManagerInterface::DBusPluginManagerInterface(DBus::Connection& connection)
|
||||
: DBus::ObjectAdaptor(connection, "/cx/ring/Ring/PluginManagerInterface")
|
||||
{}
|
||||
|
||||
bool
|
||||
DBusPluginManagerInterface::loadPlugin(const std::string& path)
|
||||
{
|
||||
return DRing::loadPlugin(path);
|
||||
}
|
||||
|
||||
bool
|
||||
DBusPluginManagerInterface::unloadPlugin(const std::string& path)
|
||||
{
|
||||
return DRing::unloadPlugin(path);
|
||||
}
|
||||
|
||||
void
|
||||
DBusPluginManagerInterface::togglePlugin(const std::string& path, const bool& toggle)
|
||||
{
|
||||
DRing::togglePlugin(path, toggle);
|
||||
}
|
||||
|
||||
std::map<std::string,std::string>
|
||||
DBusPluginManagerInterface::getPluginDetails(const std::string& path)
|
||||
{
|
||||
return DRing::getPluginDetails(path);
|
||||
}
|
||||
|
||||
std::vector<std::map<std::string,std::string>>
|
||||
DBusPluginManagerInterface::getPluginPreferences(const std::string& path)
|
||||
{
|
||||
return DRing::getPluginPreferences(path);
|
||||
}
|
||||
|
||||
bool
|
||||
DBusPluginManagerInterface::setPluginPreference(const std::string& path, const std::string& key, const std::string& value)
|
||||
{
|
||||
return DRing::setPluginPreference(path, key, value);
|
||||
}
|
||||
|
||||
std::map<std::string,std::string>
|
||||
DBusPluginManagerInterface::getPluginPreferencesValues(const std::string& path)
|
||||
{
|
||||
return DRing::getPluginPreferencesValues(path);
|
||||
}
|
||||
|
||||
bool
|
||||
DBusPluginManagerInterface::resetPluginPreferencesValues(const std::string& path)
|
||||
{
|
||||
return DRing::resetPluginPreferencesValues(path);
|
||||
}
|
||||
|
||||
auto
|
||||
DBusPluginManagerInterface::listAvailablePlugins() -> decltype(DRing::listAvailablePlugins())
|
||||
{
|
||||
return DRing::listAvailablePlugins();
|
||||
}
|
||||
|
||||
auto
|
||||
DBusPluginManagerInterface::listLoadedPlugins() -> decltype(DRing::listLoadedPlugins())
|
||||
{
|
||||
return DRing::listLoadedPlugins();
|
||||
}
|
||||
|
||||
int
|
||||
DBusPluginManagerInterface::installPlugin(const std::string& jplPath, const bool& force)
|
||||
{
|
||||
return DRing::installPlugin(jplPath, force);
|
||||
}
|
||||
|
||||
int
|
||||
DBusPluginManagerInterface::uninstallPlugin(const std::string& pluginRootPath)
|
||||
{
|
||||
return DRing::uninstallPlugin(pluginRootPath);
|
||||
}
|
||||
|
||||
std::vector<std::string>
|
||||
DBusPluginManagerInterface::listCallMediaHandlers( )
|
||||
{
|
||||
return DRing::listCallMediaHandlers();
|
||||
}
|
||||
|
||||
void
|
||||
DBusPluginManagerInterface::toggleCallMediaHandler(const std::string& id, const bool& toggle)
|
||||
{
|
||||
DRing::toggleCallMediaHandler(id, toggle);
|
||||
}
|
||||
|
||||
std::map<std::string,std::string>
|
||||
DBusPluginManagerInterface::getCallMediaHandlerDetails(const std::string& id)
|
||||
{
|
||||
return DRing::getCallMediaHandlerDetails(id);
|
||||
}
|
70
bin/dbus/dbuspluginmanagerinterface.h
Normal file
70
bin/dbus/dbuspluginmanagerinterface.h
Normal file
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2020 Savoir-faire Linux Inc.
|
||||
*
|
||||
* Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "dring/def.h"
|
||||
#include "dbus_cpp.h"
|
||||
|
||||
#if __GNUC__ >= 5 || (__GNUC__ >=4 && __GNUC_MINOR__ >= 6)
|
||||
/* This warning option only exists for gcc 4.6.0 and greater. */
|
||||
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
#endif
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wignored-qualifiers"
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#include "dbuspluginmanagerinterface.adaptor.h"
|
||||
#pragma GCC diagnostic warning "-Wignored-qualifiers"
|
||||
#pragma GCC diagnostic warning "-Wunused-parameter"
|
||||
|
||||
#if __GNUC__ >= 5 || (__GNUC__ >=4 && __GNUC_MINOR__ >= 6)
|
||||
/* This warning option only exists for gcc 4.6.0 and greater. */
|
||||
#pragma GCC diagnostic warning "-Wunused-but-set-variable"
|
||||
#endif
|
||||
|
||||
class DRING_PUBLIC DBusPluginManagerInterface :
|
||||
public cx::ring::Ring::PluginManagerInterface_adaptor,
|
||||
public DBus::IntrospectableAdaptor,
|
||||
public DBus::ObjectAdaptor
|
||||
{
|
||||
public:
|
||||
DBusPluginManagerInterface(DBus::Connection& connection);
|
||||
|
||||
// Methods
|
||||
bool loadPlugin(const std::string& path);
|
||||
bool unloadPlugin(const std::string& path);
|
||||
void togglePlugin(const std::string& path, const bool& toggle);
|
||||
std::map<std::string,std::string> getPluginDetails(const std::string& path);
|
||||
std::vector<std::map<std::string,std::string>> getPluginPreferences(const std::string& path);
|
||||
bool setPluginPreference(const std::string& path, const std::string& key, const std::string& value);
|
||||
std::map<std::string,std::string> getPluginPreferencesValues(const std::string& path);
|
||||
bool resetPluginPreferencesValues(const std::string& path);
|
||||
std::vector<std::string> listAvailablePlugins();
|
||||
std::vector<std::string> listLoadedPlugins();
|
||||
int installPlugin(const std::string& jplPath, const bool& force);
|
||||
int uninstallPlugin(const std::string& pluginRootPath);
|
||||
std::vector<std::string> listCallMediaHandlers();
|
||||
void toggleCallMediaHandler(const std::string& id, const bool& toggle);
|
||||
std::map<std::string,std::string> getCallMediaHandlerDetails(const std::string& id);
|
||||
};
|
@ -18,6 +18,6 @@ std::vector<std::string> listLoadedPlugins();
|
||||
int installPlugin(const std::string& jplPath, bool force);
|
||||
int uninstallPlugin(const std::string& pluginRootPath);
|
||||
std::vector<std::string> listCallMediaHandlers();
|
||||
void toggleCallMediaHandler(const std::string& id, const bool toggle);
|
||||
void toggleCallMediaHandler(const std::string& id, bool toggle);
|
||||
std::map<std::string,std::string> getCallMediaHandlerDetails(const std::string& id);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ dnl Jami - configure.ac for automake 1.9 and autoconf 2.59
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ([2.65])
|
||||
AC_INIT([Jami Daemon],[9.1.0],[ring@gnu.org],[jami])
|
||||
AC_INIT([Jami Daemon],[9.2.0],[ring@gnu.org],[jami])
|
||||
|
||||
AC_COPYRIGHT([[Copyright (c) Savoir-faire Linux 2004-2019]])
|
||||
AC_REVISION([$Revision$])
|
||||
|
@ -181,6 +181,7 @@ nobase_include_HEADERS= dring/dring.h \
|
||||
dring/security_const.h \
|
||||
dring/callmanager_interface.h \
|
||||
dring/configurationmanager_interface.h \
|
||||
dring/plugin_manager_interface.h \
|
||||
dring/presencemanager_interface.h \
|
||||
dring/datatransfer_interface.h \
|
||||
dring/account_const.h \
|
||||
|
@ -22,74 +22,74 @@
|
||||
#include "logger.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace DRing {
|
||||
//
|
||||
bool
|
||||
loadPlugin(const std::string& path){
|
||||
return jami::Manager::instance().getJamiPluginManager().loadPlugin(path);
|
||||
}
|
||||
namespace DRing
|
||||
{
|
||||
bool
|
||||
loadPlugin(const std::string& path){
|
||||
return jami::Manager::instance().getJamiPluginManager().loadPlugin(path);
|
||||
}
|
||||
|
||||
bool
|
||||
unloadPlugin(const std::string& path){
|
||||
return jami::Manager::instance().getJamiPluginManager().unloadPlugin(path);
|
||||
}
|
||||
bool
|
||||
unloadPlugin(const std::string& path){
|
||||
return jami::Manager::instance().getJamiPluginManager().unloadPlugin(path);
|
||||
}
|
||||
|
||||
void
|
||||
togglePlugin(const std::string& path, bool toggle){
|
||||
jami::Manager::instance().getJamiPluginManager().togglePlugin(path,toggle);
|
||||
}
|
||||
void
|
||||
togglePlugin(const std::string& path, bool toggle){
|
||||
jami::Manager::instance().getJamiPluginManager().togglePlugin(path,toggle);
|
||||
}
|
||||
|
||||
std::map<std::string,std::string>
|
||||
getPluginDetails(const std::string& path){
|
||||
return jami::Manager::instance().getJamiPluginManager().getPluginDetails(path);
|
||||
}
|
||||
std::map<std::string,std::string>
|
||||
getPluginDetails(const std::string& path){
|
||||
return jami::Manager::instance().getJamiPluginManager().getPluginDetails(path);
|
||||
}
|
||||
|
||||
std::vector<std::map<std::string,std::string>>
|
||||
getPluginPreferences(const std::string& path){
|
||||
return jami::Manager::instance().getJamiPluginManager().getPluginPreferences(path);
|
||||
}
|
||||
std::vector<std::map<std::string,std::string>>
|
||||
getPluginPreferences(const std::string& path){
|
||||
return jami::Manager::instance().getJamiPluginManager().getPluginPreferences(path);
|
||||
}
|
||||
|
||||
bool
|
||||
setPluginPreference(const std::string& path, const std::string& key, const std::string& value) {
|
||||
return jami::Manager::instance().getJamiPluginManager().setPluginPreference(path, key, value);
|
||||
}
|
||||
bool
|
||||
setPluginPreference(const std::string& path, const std::string& key, const std::string& value) {
|
||||
return jami::Manager::instance().getJamiPluginManager().setPluginPreference(path, key, value);
|
||||
}
|
||||
|
||||
std::map<std::string,std::string>
|
||||
getPluginPreferencesValues(const std::string& path){
|
||||
return jami::Manager::instance().getJamiPluginManager().getPluginPreferencesValuesMap(path);
|
||||
}
|
||||
bool
|
||||
resetPluginPreferencesValues(const std::string& path){
|
||||
return jami::Manager::instance().getJamiPluginManager().resetPluginPreferencesValuesMap(path);
|
||||
}
|
||||
std::map<std::string,std::string>
|
||||
getPluginPreferencesValues(const std::string& path){
|
||||
return jami::Manager::instance().getJamiPluginManager().getPluginPreferencesValuesMap(path);
|
||||
}
|
||||
bool
|
||||
resetPluginPreferencesValues(const std::string& path){
|
||||
return jami::Manager::instance().getJamiPluginManager().resetPluginPreferencesValuesMap(path);
|
||||
}
|
||||
|
||||
std::vector<std::string>
|
||||
listAvailablePlugins() {
|
||||
return jami::Manager::instance().getJamiPluginManager().listAvailablePlugins();
|
||||
}
|
||||
std::vector<std::string>
|
||||
listAvailablePlugins() {
|
||||
return jami::Manager::instance().getJamiPluginManager().listAvailablePlugins();
|
||||
}
|
||||
|
||||
std::vector<std::string>
|
||||
listLoadedPlugins() {
|
||||
return jami::Manager::instance().getJamiPluginManager().listLoadedPlugins();
|
||||
}
|
||||
std::vector<std::string>
|
||||
listLoadedPlugins() {
|
||||
return jami::Manager::instance().getJamiPluginManager().listLoadedPlugins();
|
||||
}
|
||||
|
||||
int installPlugin(const std::string& jplPath, bool force) {
|
||||
return jami::Manager::instance().getJamiPluginManager().installPlugin(jplPath, force);
|
||||
}
|
||||
int installPlugin(const std::string& jplPath, bool force) {
|
||||
return jami::Manager::instance().getJamiPluginManager().installPlugin(jplPath, force);
|
||||
}
|
||||
|
||||
int uninstallPlugin(const std::string& pluginRootPath) {
|
||||
return jami::Manager::instance().getJamiPluginManager().uninstallPlugin(pluginRootPath);
|
||||
}
|
||||
int uninstallPlugin(const std::string& pluginRootPath) {
|
||||
return jami::Manager::instance().getJamiPluginManager().uninstallPlugin(pluginRootPath);
|
||||
}
|
||||
|
||||
std::vector<std::string> listCallMediaHandlers() {
|
||||
return jami::Manager::instance().getJamiPluginManager().getCallServicesManager().listCallMediaHandlers();
|
||||
}
|
||||
std::vector<std::string> listCallMediaHandlers() {
|
||||
return jami::Manager::instance().getJamiPluginManager().getCallServicesManager().listCallMediaHandlers();
|
||||
}
|
||||
|
||||
void toggleCallMediaHandler(const std::string& id, const bool toggle) {
|
||||
return jami::Manager::instance().getJamiPluginManager().getCallServicesManager().toggleCallMediaHandler(id, toggle);
|
||||
}
|
||||
void toggleCallMediaHandler(const std::string& id, bool toggle) {
|
||||
return jami::Manager::instance().getJamiPluginManager().getCallServicesManager().toggleCallMediaHandler(id, toggle);
|
||||
}
|
||||
|
||||
std::map<std::string,std::string> getCallMediaHandlerDetails(const std::string& id) {
|
||||
return jami::Manager::instance().getJamiPluginManager().getCallServicesManager().getCallMediaHandlerDetails(id);
|
||||
}
|
||||
std::map<std::string,std::string> getCallMediaHandlerDetails(const std::string& id) {
|
||||
return jami::Manager::instance().getJamiPluginManager().getCallServicesManager().getCallMediaHandlerDetails(id);
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ list (APPEND Source_Files__dring
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/account_const.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/call_const.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/callmanager_interface.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/plugin_manager_interface.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/configurationmanager_interface.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/datatransfer_interface.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/dring.h"
|
||||
|
@ -18,27 +18,34 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "dring.h"
|
||||
|
||||
#include "def.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace DRing {
|
||||
DRING_PUBLIC bool loadPlugin(const std::string& path);
|
||||
DRING_PUBLIC bool unloadPlugin(const std::string& path);
|
||||
DRING_PUBLIC void togglePlugin(const std::string& path, bool toggle);
|
||||
DRING_PUBLIC std::map<std::string,std::string> getPluginDetails(const std::string& path);
|
||||
DRING_PUBLIC std::vector<std::map<std::string,std::string>> getPluginPreferences(const std::string& path);
|
||||
DRING_PUBLIC bool setPluginPreference(const std::string& path, const std::string& key, const std::string& value);
|
||||
DRING_PUBLIC std::map<std::string,std::string> getPluginPreferencesValues(const std::string& path);
|
||||
DRING_PUBLIC bool resetPluginPreferencesValues(const std::string& path);
|
||||
DRING_PUBLIC std::vector<std::string> listAvailablePlugins();
|
||||
DRING_PUBLIC std::vector<std::string> listLoadedPlugins();
|
||||
DRING_PUBLIC int installPlugin(const std::string& jplPath, bool force);
|
||||
DRING_PUBLIC int uninstallPlugin(const std::string& pluginRootPath);
|
||||
DRING_PUBLIC std::vector<std::string> listCallMediaHandlers();
|
||||
DRING_PUBLIC void toggleCallMediaHandler(const std::string& id, const bool toggle);
|
||||
DRING_PUBLIC std::map<std::string,std::string> getCallMediaHandlerDetails(const std::string& id);
|
||||
#if __APPLE__
|
||||
#import "TargetConditionals.h"
|
||||
#endif
|
||||
|
||||
namespace DRing
|
||||
{
|
||||
DRING_PUBLIC bool loadPlugin(const std::string& path);
|
||||
DRING_PUBLIC bool unloadPlugin(const std::string& path);
|
||||
DRING_PUBLIC void togglePlugin(const std::string& path, bool toggle);
|
||||
DRING_PUBLIC std::map<std::string,std::string> getPluginDetails(const std::string& path);
|
||||
DRING_PUBLIC std::vector<std::map<std::string,std::string>> getPluginPreferences(const std::string& path);
|
||||
DRING_PUBLIC bool setPluginPreference(const std::string& path, const std::string& key, const std::string& value);
|
||||
DRING_PUBLIC std::map<std::string,std::string> getPluginPreferencesValues(const std::string& path);
|
||||
DRING_PUBLIC bool resetPluginPreferencesValues(const std::string& path);
|
||||
DRING_PUBLIC std::vector<std::string> listAvailablePlugins();
|
||||
DRING_PUBLIC std::vector<std::string> listLoadedPlugins();
|
||||
DRING_PUBLIC int installPlugin(const std::string& jplPath, bool force);
|
||||
DRING_PUBLIC int uninstallPlugin(const std::string& pluginRootPath);
|
||||
DRING_PUBLIC std::vector<std::string> listCallMediaHandlers();
|
||||
DRING_PUBLIC void toggleCallMediaHandler(const std::string& id, bool toggle);
|
||||
DRING_PUBLIC std::map<std::string,std::string> getCallMediaHandlerDetails(const std::string& id);
|
||||
}
|
||||
|
||||
|
@ -3108,8 +3108,8 @@ Manager::sipVoIPLink() const
|
||||
return *pimpl_->sipLink_;
|
||||
}
|
||||
|
||||
|
||||
JamiPluginManager& Manager::getJamiPluginManager() const
|
||||
JamiPluginManager&
|
||||
Manager::getJamiPluginManager() const
|
||||
{
|
||||
return pimpl_->jami_plugin_manager;
|
||||
}
|
||||
|
Reference in New Issue
Block a user