From 6b84ec54083da9911f5ad4816d0eb4f4745afad4 Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Mon, 7 Oct 2019 09:52:33 +0200 Subject: [HICN-298] Release new hICN app for Android MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I43adc62fadf00690b687078d739788dffdc5e566 Signed-off-by: Jordan Augé --- ctrl/facemgr/src/interface.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'ctrl/facemgr/src/interface.h') diff --git a/ctrl/facemgr/src/interface.h b/ctrl/facemgr/src/interface.h index f38313182..331312bde 100644 --- a/ctrl/facemgr/src/interface.h +++ b/ctrl/facemgr/src/interface.h @@ -30,27 +30,30 @@ #include -struct event_s; -typedef int (*callback_t)(struct event_s * event, void * callback_data); +struct facelet_s; +typedef int (*callback_t)(struct facelet_s * facelet, void * callback_data); struct interface_s; -struct face_rules_s; /** * \brief Interface operations */ typedef struct { + /** The type given to the interfaces */ char * type; - bool is_singleton; - int (*initialize)(struct interface_s * interface, struct face_rules_s * rules, void ** pdata); + /* Constructor */ + int (*initialize)(struct interface_s * interface, void * cfg); + /* Destructor */ int (*finalize)(struct interface_s * interface); + /* Callback upon file descriptor event (iif previously registered) */ int (*callback)(struct interface_s * interface); - int (*on_event)(struct interface_s * interface, const struct event_s * event); + /* Callback upon face events coming from the face manager */ + int (*on_event)(struct interface_s * interface, const struct facelet_s * facelet); } interface_ops_t; typedef struct interface_s { char * name; - interface_ops_t * ops; + const interface_ops_t * ops; callback_t callback; void * callback_data; void * data; @@ -90,9 +93,9 @@ void _interface_set_callback(interface_t * interface, callback_t callback, void #define interface_set_callback(interface, callback, callback_data) \ _interface_set_callback(interface, (callback_t)callback, (void*)callback_data) -int interface_initialize(interface_t * interface, struct face_rules_s * rules); +int interface_initialize(interface_t * interface, void * cfg); int interface_finalize(interface_t * interface); -int interface_on_event(interface_t * interface, const struct event_s * event); +int interface_on_event(interface_t * interface, const struct facelet_s * facelet); #endif /* FACEMGR_INTERFACE_H */ -- cgit 1.2.3-korg