diff --git a/languages/cpp/src/shared/src/Event/Event.cpp b/languages/cpp/src/shared/src/Event/Event.cpp index 3ee54683..6f771462 100644 --- a/languages/cpp/src/shared/src/Event/Event.cpp +++ b/languages/cpp/src/shared/src/Event/Event.cpp @@ -89,7 +89,12 @@ namespace FireboltSDK { return result; } - Firebolt::Error Event::Dispatch(const string& eventName, const WPEFramework::Core::ProxyType& jsonResponse) /* override */ + + /* This function combines both internal and external event maps, and iterates over them to find the specified event. + If the event is found, it iterates over its associated callbacks, updating their states and executing them if applicable. + Callbacks in the REVOKED state are removed. + */ + Firebolt::Error Event::Dispatch(const string& eventName, const WPEFramework::Core::ProxyType& jsonResponse) /* override */ { string response = jsonResponse->Result.Value(); std::vector eventMaps = {&_internalEventMap, &_externalEventMap};