MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
triggers.h
Go to the documentation of this file.
1 #pragma once
2 #include <string>
3 
4 namespace Triggers{
5  bool doTrigger(const std::string triggerType, const std::string &payload, const std::string &streamName, bool dryRun, std::string & response);
6  std::string handleTrigger(const std::string &triggerType, const std::string &value, const std::string &payload, int sync);
7 
8  //All of the below are just shorthands for specific usage of the doTrigger function above:
9  bool shouldTrigger(const std::string triggerType);
10  bool shouldTrigger(const std::string triggerType, const std::string &streamName);
11  bool doTrigger(const std::string triggerType);
12  bool doTrigger(const std::string triggerType, const std::string &payload);
13  bool doTrigger(const std::string triggerType, const std::string &payload, const std::string &streamName);
14 }
bool shouldTrigger(const std::string type)
Checks if one or more triggers are defined that should be handled for all streams (for a trigger even...
Definition: triggers.cpp:113
std::string handleTrigger(const std::string &trigger, const std::string &value, const std::string &payload, int sync)
Handles a trigger by sending a payload to a destination.
Definition: triggers.cpp:30
bool doTrigger(const std::string type)
handles triggers for a specific trigger event type, without a payload, server-wide ...
Definition: triggers.cpp:133
Definition: triggers.cpp:22