1 /******************************************************************************* 2 / 3 / File: modules.h 4 / 5 / Description: Public module-related API 6 / 7 / Copyright 1998, Be Incorporated, All Rights Reserved. 8 / 9 *******************************************************************************/ 10 11 #ifndef _MODULE_H 12 #define _MODULE_H 13 14 #include <BeBuild.h> 15 #include <OS.h> 16 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 21 /* module flags */ 22 23 #define B_KEEP_LOADED 0x00000001 24 25 26 /* module info structure */ 27 28 typedef struct module_info module_info; 29 30 struct module_info { 31 const char *name; 32 uint32 flags; 33 status_t (*std_ops)(int32, ...); 34 }; 35 36 #define B_MODULE_INIT 1 37 #define B_MODULE_UNINIT 2 38 39 _IMPEXP_KERNEL status_t get_module(const char *path, module_info **vec); 40 _IMPEXP_KERNEL status_t put_module(const char *path); 41 42 _IMPEXP_KERNEL status_t get_next_loaded_module_name(uint32 *cookie, char *buf, size_t *bufsize); 43 _IMPEXP_KERNEL void * open_module_list(const char *prefix); 44 _IMPEXP_KERNEL status_t read_next_module_name(void *cookie, char *buf, size_t *bufsize); 45 _IMPEXP_KERNEL status_t close_module_list(void *cookie); 46 47 #ifdef __cplusplus 48 } 49 #endif 50 51 #endif 52