esp_event_private.h 1.5 KB

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