We now have our own (and cleaner) modules.h file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2111 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+33
-36
@@ -1,51 +1,48 @@
|
|||||||
/*******************************************************************************
|
/* Modules Definitions
|
||||||
/
|
**
|
||||||
/ File: modules.h
|
** Distributed under the terms of the OpenBeOS License.
|
||||||
/
|
*/
|
||||||
/ Description: Public module-related API
|
|
||||||
/
|
|
||||||
/ Copyright 1998, Be Incorporated, All Rights Reserved.
|
|
||||||
/
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
#ifndef _MODULE_H
|
#ifndef _MODULE_H
|
||||||
#define _MODULE_H
|
#define _MODULE_H
|
||||||
|
|
||||||
#include <BeBuild.h>
|
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* module info structure
|
||||||
|
* Every module exports it - modules are identified
|
||||||
|
* by the name given in this structure.
|
||||||
|
* It exports the functions that the module support.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct module_info {
|
||||||
|
const char *name;
|
||||||
|
uint32 flags;
|
||||||
|
status_t (*std_ops)(int32, ...);
|
||||||
|
} module_info;
|
||||||
|
|
||||||
|
/* module standard operations */
|
||||||
|
#define B_MODULE_INIT 1
|
||||||
|
#define B_MODULE_UNINIT 2
|
||||||
|
|
||||||
|
/* module flags */
|
||||||
|
#define B_KEEP_LOADED 0x00000001
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* module flags */
|
extern status_t get_module(const char *path, module_info **_info);
|
||||||
|
extern status_t put_module(const char *path);
|
||||||
#define B_KEEP_LOADED 0x00000001
|
extern status_t get_next_loaded_module_name(uint32 *cookie, char *buffer, size_t *_bufferSize);
|
||||||
|
extern void *open_module_list(const char *prefix);
|
||||||
|
extern status_t close_module_list(void *cookie);
|
||||||
/* module info structure */
|
extern status_t read_next_module_name(void *cookie, char *buffer, size_t *_bufferSize);
|
||||||
|
|
||||||
typedef struct module_info module_info;
|
|
||||||
|
|
||||||
struct module_info {
|
|
||||||
const char *name;
|
|
||||||
uint32 flags;
|
|
||||||
status_t (*std_ops)(int32, ...);
|
|
||||||
};
|
|
||||||
|
|
||||||
#define B_MODULE_INIT 1
|
|
||||||
#define B_MODULE_UNINIT 2
|
|
||||||
|
|
||||||
_IMPEXP_KERNEL status_t get_module(const char *path, module_info **vec);
|
|
||||||
_IMPEXP_KERNEL status_t put_module(const char *path);
|
|
||||||
|
|
||||||
_IMPEXP_KERNEL status_t get_next_loaded_module_name(uint32 *cookie, char *buf, size_t *bufsize);
|
|
||||||
_IMPEXP_KERNEL void * open_module_list(const char *prefix);
|
|
||||||
_IMPEXP_KERNEL status_t read_next_module_name(void *cookie, char *buf, size_t *bufsize);
|
|
||||||
_IMPEXP_KERNEL status_t close_module_list(void *cookie);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif /* _MODULE_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user