esp_event_private.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. // http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. // Unless required by applicable law or agreed to in writing, software
  9. // distributed under the License is distributed on an "AS IS" BASIS,
  10. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. // See the License for the specific language governing permissions and
  12. // limitations under the License.
  13. #ifndef ESP_EVENT_PRIVATE_H_
  14. #define ESP_EVENT_PRIVATE_H_
  15. #include <stdbool.h>
  16. #include "esp_event.h"
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. /**
  21. * @brief Searches handlers registered with an event loop to see if it has been registered.
  22. *
  23. * @param[in] event_loop the loop to search
  24. * @param[in] event_base the event base to search
  25. * @param[in] event_id the event id to search
  26. * @param[in] event_handler the event handler to look for
  27. *
  28. * @return true handler registered
  29. * @return false handler not registered
  30. *
  31. * @return
  32. * - true: Handler registered
  33. * - false: Handler not registered
  34. */
  35. 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);
  36. /**
  37. * @brief Deinitializes the event loop library
  38. *
  39. * @return
  40. * - ESP_OK: Success
  41. * - Others: Fail
  42. */
  43. esp_err_t esp_event_loop_deinit(void);
  44. #ifdef __cplusplus
  45. } // extern "C"
  46. #endif
  47. #endif // #ifndef ESP_EVENT_PRIVATE_H_