Implemented triggers.

Merged from code by Wouter Spruit, with additions by yours truly.
This commit is contained in:
Thulinma 2015-10-07 13:23:27 +02:00
parent eb6b98b219
commit 279add438a
18 changed files with 597 additions and 6 deletions

14
lib/triggers.h Normal file
View file

@ -0,0 +1,14 @@
#pragma once
#include <string>
namespace Triggers{
bool doTrigger(const std::string triggerType, const std::string &payload, const std::string &streamName, bool dryRun, std::string & response);
std::string handleTrigger(const std::string &triggerType, const std::string &value, const std::string &payload, int sync);
//All of the below are just shorthands for specific usage of the doTrigger function above:
bool shouldTrigger(const std::string triggerType);
bool shouldTrigger(const std::string triggerType, const std::string &streamName);
bool doTrigger(const std::string triggerType);
bool doTrigger(const std::string triggerType, const std::string &payload);
bool doTrigger(const std::string triggerType, const std::string &payload, const std::string &streamName);
}