mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-30 18:39:23 +00:00
- Add feedback on errors - More generic import requests - Replace storing password by a native popup that ask passwork when needed - Store passwords in settings file - Import Feedback in advanced settings tab - Use English as default translator if no translations are found - Add OpenSSL packaging for Windows to deal with Qt connections - Add option to overwrite plugin if exists - Plugin load/unload managment. Hot-Dynamic load of plugins. Safely test the loaded plugin - Set plugin data with default value when all GUI items are loaded - Rewrite folder priority - Add filename info from pluginloader - Add plugin versionning - Specify inputs for saving - Copy desktop headers in OUTPUT to be used by external projects - Add a plugins folder auto-managed by cmake - Remove obsolete contact api submodule - Clean plugin example - Add specific behaviour for plugin type : inputs have been splitted by Capability. - Update save/load to be more generic and add clean function for configurations - Instantiate Importer List model - Add IDE integration for plugins - Set input fields to be dependent of capability - Change signals interface to take account capability
55 lines
2.2 KiB
C++
55 lines
2.2 KiB
C++
#ifndef LINPHONE_APP_PLUGIN_DATA_H
|
|
#define LINPHONE_APP_PLUGIN_DATA_H
|
|
|
|
#include <QVariantMap>
|
|
|
|
#ifdef ENABLE_APP_EXPORT_PLUGIN
|
|
#include "include/LinphoneApp/LinphonePlugin.hpp"
|
|
#else
|
|
#include <LinphoneApp/LinphonePlugin.hpp>
|
|
#endif
|
|
|
|
class QPluginLoader;
|
|
class LinphonePlugin;
|
|
|
|
// This class regroup Data interface for importing contacts
|
|
class LINPHONEAPP_DLL_API PluginDataAPI : public QObject {
|
|
Q_OBJECT
|
|
public:
|
|
typedef enum{ALL=-1, NOTHING=0, CONTACTS=1, LAST} PluginCapability;// LAST must not be used. It is for internal process only.
|
|
PluginDataAPI(LinphonePlugin * plugin, void * linphoneCore, QPluginLoader * pluginLoader);
|
|
virtual ~PluginDataAPI();
|
|
|
|
virtual bool isValid(const bool &pRequestData=true, QString * pError= nullptr) = 0; // Test if the passed data is valid. Used for saving.
|
|
virtual void setInputFields(const PluginCapability& capability = ALL, const QVariantMap &inputFields = QVariantMap());// Set all inputs for the selected capability
|
|
virtual QMap<PluginCapability, QVariantMap> getInputFields(const PluginCapability& capability);// Get all inputs
|
|
virtual QMap<PluginCapability, QVariantMap> getInputFieldsToSave(const PluginCapability& capability = ALL);// Get all inputs to save in config file.
|
|
|
|
// Configuration management
|
|
void setSectionConfiguration(const QString& section);
|
|
virtual void loadConfiguration(const PluginCapability& capability = ALL);
|
|
virtual void saveConfiguration(const PluginCapability& capability = ALL);
|
|
virtual void cleanAllConfigurations();// Remove all saved configuration
|
|
|
|
QPluginLoader * getPluginLoader();// Used to retrieve the loader that created this instance, in order to unload it
|
|
|
|
virtual void run(const PluginCapability& actionType)=0;
|
|
|
|
signals:
|
|
void dataReceived(const PluginCapability& actionType, QVector<QMultiMap<QString,QString> > data);
|
|
//------------------------------------
|
|
|
|
void inputFieldsChanged(const PluginCapability&, const QVariantMap &inputFields); // Input fields have been changed
|
|
void message(const QtMsgType& type, const QString &message); // Send a message to GUI
|
|
|
|
|
|
protected:
|
|
QMap<PluginCapability, QVariantMap> mInputFields;
|
|
void * mLinphoneCore;
|
|
LinphonePlugin * mPlugin;
|
|
QPluginLoader * mPluginLoader;
|
|
private:
|
|
QString mSectionConfigurationName;
|
|
};
|
|
|
|
#endif // LINPHONE_APP_PLUGIN_DATA_H
|