1 // Copyright 2018 Espressif Systems (Shanghai) PTE LTD 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef ESP_EVENT_PRIVATE_H_ 16 #define ESP_EVENT_PRIVATE_H_ 17 18 #include <stdbool.h> 19 #include "esp_event.h" 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 /** 26 * @brief Searches handlers registered with an event loop to see if it has been registered. 27 * 28 * @param[in] event_loop the loop to search 29 * @param[in] event_base the event base to search 30 * @param[in] event_id the event id to search 31 * @param[in] event_handler the event handler to look for 32 * 33 * @return true handler registered 34 * @return false handler not registered 35 * 36 * @return 37 * - true: Handler registered 38 * - false: Handler not registered 39 */ 40 bool esp_event_is_handler_registered(esp_event_loop_handle_t event_loop, esp_event_base_t event_base, int32_t event_id, esp_event_handler_t event_handler); 41 42 /** 43 * @brief Deinitializes the event loop library 44 * 45 * @return 46 * - ESP_OK: Success 47 * - Others: Fail 48 */ 49 esp_err_t esp_event_loop_deinit(void); 50 51 #ifdef __cplusplus 52 } // extern "C" 53 #endif 54 55 #endif // #ifndef ESP_EVENT_PRIVATE_H_ 56