Skip to content

Commit

Permalink
core: move module init/cleanup prototypes to ubx_core.h
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Klotzbuecher <mk@mkio.de>
  • Loading branch information
kmarkus committed Jun 10, 2020
1 parent 378dca8 commit d81ba17
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
20 changes: 19 additions & 1 deletion libubx/ubx_core.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* ubx core API */

#include "stdint.h"
#include "ubx_types.h"

#ifndef UBX_CORE_H
Expand All @@ -26,7 +27,24 @@ int ubx_module_load(ubx_node_info_t *ni, const char *lib);
ubx_module_t *ubx_module_get(ubx_node_info_t *ni, const char *lib);
void ubx_module_unload(ubx_node_info_t *ni, const char *lib);

/* TODO drop? int ubx_block_check(ubx_node_info_t *ni, ubx_block_t *b); */
/**
* __ubx_initialize_module - module initialization hook
*
* This symbol is setup by using the UBX_MODULE_INIT macro.
*
* @ni: node handle for the module to register blocks and types
* @return: 0 if OK, -1 otherwise
*/
int __ubx_initialize_module(struct ubx_node_info *ni);

/**
* __ubx_cleanup_module - module cleanuphook
*
* This symbol is setup by using the UBX_MODULE_CLEANUP macro.
*
* @ni: node handle for the module to unregister blocks and types
*/
void __ubx_cleanup_module(struct ubx_node_info *ni);

int ubx_block_register(ubx_node_info_t *ni, struct ubx_proto_block *prot);
int ubx_block_unregister(ubx_node_info_t *ni, const char *name);
Expand Down
16 changes: 0 additions & 16 deletions libubx/ubx_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,6 @@ struct ubx_block;
struct ubx_node_info;
struct ubx_log_msg;

/**
* __ubx_initialize_module - module initialization hook
*
* @ni: node handle for the module to register blocks and types
* @return: 0 if OK, -1 otherwise
*/
int __ubx_initialize_module(struct ubx_node_info *ni);

/**
* __ubx_cleanup_module - module cleanuphook
*
* @ni: node handle for the module to unregister blocks and types
*/
void __ubx_cleanup_module(struct ubx_node_info *ni);


/**
* type classes
*
Expand Down

0 comments on commit d81ba17

Please sign in to comment.