ODeV framework  v2
IListenerVtbl.h
Go to the documentation of this file.
1 
31 #ifndef INCLUDE_EVENTS_ILISTENERVTBL_H_
32 #define INCLUDE_EVENTS_ILISTENERVTBL_H_
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 
39 #include "systypes.h"
40 #include "syserror.h"
41 #include "systp.h"
42 
43 typedef struct _IListener_vtbl IListener_vtbl;
44 
45 
46 struct _IListener_vtbl {
47  sys_error_code_t (*OnStatusChange)(IListener *this);
48 };
49 
50 struct _IListener {
51  const IListener_vtbl *vptr;
52 };
53 
54 // Public API declaration
55 //***********************
56 
57 
58 
59 // Inline functions definition
60 // ***************************
61 
62 SYS_DEFINE_INLINE
63 sys_error_code_t IListenerOnStatusChange(IListener *this) {
64  return this->vptr->OnStatusChange(this);
65 }
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 
72 #endif /* INCLUDE_EVENTS_ILISTENERVTBL_H_ */
Define the global error management API.
Common type declaration.
unsigned short sys_error_code_t
Definition: syserror.h:45
Target platform definition.