Skip to content

Commit

Permalink
add ESDAction::SendToPropertyInspector
Browse files Browse the repository at this point in the history
  • Loading branch information
fredemmott committed Feb 15, 2021
1 parent a62b19c commit 4f4570c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 10 additions & 1 deletion StreamDeckSDK/ESDAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

ESDAction::ESDAction(
ESDConnectionManager* esd_connection,
const std::string& action,
const std::string& context)
: mESDConnection(esd_connection), mContext(context) {
: mESDConnection(esd_connection), mAction(action), mContext(context) {
}

ESDAction::~ESDAction() {
Expand Down Expand Up @@ -58,3 +59,11 @@ void ESDAction::ShowAlert() {
void ESDAction::ShowOK() {
GetESD()->ShowOKForContext(mContext);
}

void ESDAction::SendToPropertyInspector(const nlohmann::json& payload) {
GetESD()->SendToPropertyInspector(
mAction,
mContext,
payload
);
}
6 changes: 4 additions & 2 deletions StreamDeckSDK/ESDAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ESDConnectionManager;
*/
class ESDAction {
public:
ESDAction(ESDConnectionManager* esd_connection, const std::string& context);
ESDAction(ESDConnectionManager* esd_connection, const std::string& action, const std::string& context);
virtual ~ESDAction();

virtual void DidReceiveSettings(const nlohmann::json& settings);
Expand All @@ -55,11 +55,13 @@ class ESDAction {
const std::string& inBase64ImageString,
ESDSDKTarget = kESDSDKTarget_HardwareAndSoftware
);
void SetSettings(const nlohmann::json& inSettings);
void ShowAlert();
void ShowOK();
void SetSettings(const nlohmann::json& inSettings);
void SendToPropertyInspector(const nlohmann::json& inSettings);

private:
std::string mAction;
std::string mContext;
ESDConnectionManager* mESDConnection = nullptr;
};

0 comments on commit 4f4570c

Please sign in to comment.