diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-09-14 19:31:42 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-12-14 11:00:25 +0100 |
commit | eabae24ea592420de46e36f0b1af5d39eee5b8a4 (patch) | |
tree | 16cbc39e84eb71d655add40e715f7d87b4b02132 /signal-composer-binding/signal-composer.hpp | |
parent | 140fd3d8f76a8cbbde8f6b0bf997808855f3da43 (diff) |
Attach and recursion check working
Change-Id: I2f9509d4b6aa63a16df8db2187810337fd802ef4
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'signal-composer-binding/signal-composer.hpp')
-rw-r--r-- | signal-composer-binding/signal-composer.hpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/signal-composer-binding/signal-composer.hpp b/signal-composer-binding/signal-composer.hpp index 44b958f..8affc7a 100644 --- a/signal-composer-binding/signal-composer.hpp +++ b/signal-composer-binding/signal-composer.hpp @@ -19,12 +19,8 @@ #include <memory> #include <vector> #include <string> -#include <ctl-config.h> -#include <json-c/json.h> -#include <systemd/sd-event.h> #include "source.hpp" -#include "signal-composer-binding.hpp" class bindingApp { @@ -32,7 +28,7 @@ private: CtlConfigT* ctlConfig_; static CtlSectionT ctlSections_[]; ///< Config Section definition (note: controls section index should match handle retrieval in) - std::vector<Source> sourcesList_; + std::vector<SourceAPI> sourcesList_; explicit bindingApp(const std::string& filepath); bindingApp(); @@ -40,19 +36,19 @@ private: CtlActionT* convert2Action(const std::string& name, json_object* action); - int loadOneSource(json_object* sourcesJ); - static int loadSources(CtlSectionT* section, json_object *sectionJ); + int loadOneSourceAPI(json_object* sourcesJ); + static int loadSourcesAPI(CtlSectionT* section, json_object *sectionJ); int loadOneSignal(json_object* signalsJ); static int loadSignals(CtlSectionT* section, json_object *sectionJ); - Source* getSource(const std::string& api); - public: static bindingApp& instance(); - void loadConfig(const std::string& filepath); - void loadSignalsFile(std::string signalsFile); + int loadConfig(const std::string& filepath); + //void loadSignalsFile(std::string signalsFile); + SourceAPI* getSourceAPI(const std::string& api); + std::shared_ptr<Signal> searchSignal(const std::string& aName); std::vector<std::shared_ptr<Signal>> getAllSignals(); CtlConfigT* ctlConfig(); }; |