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 "esp_event.h" 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 /** 25 * @brief Searches handlers registered with an event loop to see if it has been registered. 26 * 27 * @param[in] event_loop the loop to search 28 * @param[in] event_base the event base to search 29 * @param[in] event_id the event id to search 30 * @param[in] event_handler the event handler to look for 31 * 32 * @return true handler registered 33 * @return false handler not registered 34 * 35 * @return 36 * - true: Handler registered 37 * - false: Handler not registered 38 */ 39 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); 40 41 /** 42 * @brief Deinitializes the event loop library 43 * 44 * @return 45 * - ESP_OK: Success 46 * - Others: Fail 47 */ 48 esp_err_t esp_event_loop_deinit(void); 49 50 #ifdef __cplusplus 51 } // extern "C" 52 #endif 53 54 #endif // #ifndef ESP_EVENT_PRIVATE_H_ 55