aboutsummaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/source.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'signal-composer-binding/source.cpp')
-rw-r--r--signal-composer-binding/source.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/signal-composer-binding/source.cpp b/signal-composer-binding/source.cpp
index f616e51..f34b88f 100644
--- a/signal-composer-binding/source.cpp
+++ b/signal-composer-binding/source.cpp
@@ -21,13 +21,27 @@
SourceAPI::SourceAPI()
{}
-SourceAPI::SourceAPI(const std::string& api, const std::string& info, CtlActionT* init, CtlActionT* getSignals, CtlActionT* onReceived, int retention):api_(api),
- info_(info),
- init_(init),
- getSignals_(getSignals),
+SourceAPI::SourceAPI(const std::string& uid, const std::string& api, const std::string& info, CtlActionT* init, CtlActionT* getSignals, CtlActionT* onReceived, int retention):
+ uid_{uid},
+ api_{api},
+ info_{info},
+ init_{init},
+ getSignals_{getSignals},
signalsDefault_({onReceived, retention})
{}
+bool SourceAPI::operator ==(const SourceAPI& other) const
+{
+ if(uid_ == other.uid_) {return true;}
+ return false;
+}
+
+bool SourceAPI::operator ==(const std::string& other) const
+{
+ if(uid_ == other) {return true;}
+ return false;
+}
+
void SourceAPI::init()
{
if(init_)