celix icon indicating copy to clipboard operation
celix copied to clipboard

Refactor event admin

Open rlenferink opened this issue 6 years ago • 0 comments

The event admin currently does not work anymore. Refactor the event admin so that it works again and that:

  • It created and export a event_admin_api interface library target containing the api
  • Update api so that for event admin no event struct is needed -> i.e. signature celix_status_t (postEvent)(event_admin_t *event_admin, const char *topic, propeties_t *props);
  • event admin api only contains a sendEvent and postEvent method.
  • For sendEvent and postEvent the caller is responsbile for freeing the properties
  • For postEvent the event admin will create a copy of the properties
  • The eventHandle api contains one method with the signature: celix_status_t (*handleEvent)(void *handle, const char *topic, const properties_t *props);
  • For event handler the topic and properties arguments are only ensure to be valid during the executing of the handleEvent method.

Original creation date: 09/Apr/2018 Reporter: @pnoltes

rlenferink avatar Sep 28 '19 14:09 rlenferink