1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

REST API: config: GET (3): mechanism to deal with channel settings API formatting without creating a complete channel object. Applied to AM demod

This commit is contained in:
f4exb
2019-08-01 18:50:21 +02:00
parent 8ce4788b55
commit 810bbe2979
17 changed files with 250 additions and 38 deletions
+11 -1
View File
@@ -27,17 +27,24 @@
#include "settings/preset.h"
#include "commands/command.h"
class PluginManager;
/**
* Adapter between API and objects in sdrbase library
*/
class SDRBASE_API WebAPIAdapterBase
{
public:
WebAPIAdapterBase();
~WebAPIAdapterBase();
void setPluginManager(const PluginManager *pluginManager) { m_pluginManager = pluginManager; }
static void webapiFormatPreferences(
SWGSDRangel::SWGPreferences *apiPreferences,
const Preferences& preferences
);
static void webapiFormatPreset(
void webapiFormatPreset(
SWGSDRangel::SWGPreset *apiPreset,
const Preset& preset
);
@@ -45,6 +52,9 @@ public:
SWGSDRangel::SWGCommand *apiCommand,
const Command& command
);
private:
const PluginManager *m_pluginManager;
};
#endif // SDRBASE_WEBAPI_WEBAPIADAPTERBASE_H_