Update date of copyright notices
[src/app-framework-binder.git] / include / afb / afb-event.h
index c3686fd..0876d8c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017 "IoT.bzh"
+ * Copyright (C) 2016, 2017, 2018 "IoT.bzh"
  * Author: José Bollo <jose.bollo@iot.bzh>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,6 +28,14 @@ struct afb_event
        struct afb_eventid *closure;            /* the closure argument for functions of 'itf' */
 };
 
+/*
+ * Converts the 'event' to an afb_eventid.
+ */
+static inline struct afb_eventid *afb_event_to_eventid(struct afb_event event)
+{
+       return event.closure;
+}
+
 /*
  * Checks wether the 'event' is valid or not.
  *