event.h 789 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. #ifndef _EVENT_H_
  6. #define _EVENT_H_
  7. #include "bh_platform.h"
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. /**
  12. * Handle event request from host agent
  13. *
  14. * @param code the coap packet code
  15. * @param event_url the event url
  16. *
  17. * @return true if success, false otherwise
  18. */
  19. bool
  20. event_handle_event_request(uint8_t code, const char *event_url,
  21. uint32_t register);
  22. /**
  23. * Test whether the event is registered
  24. *
  25. * @param event_url the event url
  26. *
  27. * @return true for registered, false for not registered
  28. */
  29. bool
  30. event_is_registered(const char *event_url);
  31. #ifdef __cplusplus
  32. } /* end of extern "C" */
  33. #endif
  34. #endif /* _EVENT_H_ */