Skip to content

Commit

Permalink
Every callback is now a std::function
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Roger committed Apr 14, 2016
1 parent dffcc14 commit 6b0736b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Homie/Datatypes/Callbacks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
#include <functional>

namespace HomieInternals {
typedef void (*OperationFunction)();
typedef std::function<void()> OperationFunction;

typedef bool (*GlobalInputHandler)(String nodeId, String property, String value);
typedef bool (*NodeInputHandler)(String property, String value);
typedef std::function<bool(String)> PropertyInputHandler;
typedef std::function<bool(String nodeId, String property, String value)> GlobalInputHandler;
typedef std::function<bool(String property, String value)> NodeInputHandler;
typedef std::function<bool(String value)> PropertyInputHandler;

typedef void (*EventHandler)(HomieEvent event);
typedef std::function<void(HomieEvent event)> EventHandler;

typedef bool (*ResetFunction)();
typedef std::function<bool()> ResetFunction;
}

0 comments on commit 6b0736b

Please sign in to comment.