|
Hybrid ICN (hICN) plugin
v21.06-rc0-4-g18fa668
|
Interface base class. More...

Go to the source code of this file.
Classes | |
| struct | interface_ops_t |
| struct | interface_s |
Typedefs | |
| typedef int(* | interface_cb_t) (facemgr_t *facemgr, interface_cb_type_t type, void *data) |
| typedef struct interface_s | interface_t |
| typedef int(* | interface_fd_callback_t) (interface_t *interface, int fd, void *unused) |
Functions | |
| int | interface_register (const interface_ops_t *ops) |
| Registers a new interface type. More... | |
| int | interface_unregister_all () |
| Unregister all interface types. | |
| interface_t * | interface_create (const char *name, const char *type) |
| Create a new instance of an interface of a given type. More... | |
| void | interface_free (interface_t *interface) |
| Free an interface instance. More... | |
| void | interface_set_callback (interface_t *interface, void *callback_owner, interface_cb_t callback) |
| int | interface_initialize (interface_t *interface, void *cfg) |
| int | interface_finalize (interface_t *interface) |
| int | interface_on_event (interface_t *interface, struct facelet_s *facelet) |
| int | interface_callback (interface_t *interface, interface_cb_type_t type, void *data) |
| Raises a facelet event to the face manager. More... | |
| int | interface_raise_event (interface_t *interface, facelet_t *facelet) |
| int | interface_register_fd (interface_t *interface, int fd, void *data) |
| int | interface_unregister_fd (interface_t *interface, int fd) |
| int | interface_register_timer (interface_t *interface, unsigned delay_ms, interface_fd_callback_t callback, void *data) |
| Registers a timer event. More... | |
| int | interface_unregister_timer (interface_t *interface, int fd) |
| Unregisters a timer event. More... | |
Interface base class.
Interfaces are the priviledged way to extend the functionalities of the face manager. They both provide input and/or output functionality to allow for several components to interoperate, respectively by raising/receiving events about changes in the underlying network.
All communication happens through base operations (create, delete, etc.) over a generic face abstraction.
| int interface_callback | ( | interface_t * | interface, |
| interface_cb_type_t | type, | ||
| void * | data | ||
| ) |
Raises a facelet event to the face manager.
| [in] | interface | - Interface that raised the event (or NULL if it was created but the face manager itself, or is a joined event) |
| [in] | facelet | - Facelet to communicate with the event |
| interface_t* interface_create | ( | const char * | name, |
| const char * | type | ||
| ) |
Create a new instance of an interface of a given type.
| [in] | name | - Name of the newly create interface instance. |
| [in] | type | - Name of the interface type to create. |
| void interface_free | ( | interface_t * | interface | ) |
Free an interface instance.
| [in] | interface | - Pointer to the instance to free. |
| int interface_register | ( | const interface_ops_t * | ops | ) |
Registers a new interface type.
| [in] | ops | - Virtual function table representing the interface operations. |
| int interface_register_timer | ( | interface_t * | interface, |
| unsigned | delay_ms, | ||
| interface_fd_callback_t | callback, | ||
| void * | data | ||
| ) |
Registers a timer event.
| [in] | interface | - Pointer to the interface responsible for the timer |
| [in] | delay_ms | - Delay in milliseconds between timer events (first occurence happends after this delay) |
| [in] | callback | - Callback function to be triggered |
| [in] | data | - User data |
| int interface_unregister_timer | ( | interface_t * | interface, |
| int | fd | ||
| ) |
Unregisters a timer event.
| [in] | interface | - Pointer to the interface responsible for the timer |
| [in] | fd | - Timer identifier |
1.8.17