nebmodules.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _NEBMODULES_H
00026 #define _NEBMODULES_H
00027
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031
00032
00033
00034 #define NEB_API_VERSION(x) int __neb_api_version = x;
00035 #define CURRENT_NEB_API_VERSION 3
00036
00037
00038
00039
00040
00041 #define NEBMODULE_MODINFO_NUMITEMS 6
00042 #define NEBMODULE_MODINFO_TITLE 0
00043 #define NEBMODULE_MODINFO_AUTHOR 1
00044 #define NEBMODULE_MODINFO_COPYRIGHT 2
00045 #define NEBMODULE_MODINFO_VERSION 3
00046 #define NEBMODULE_MODINFO_LICENSE 4
00047 #define NEBMODULE_MODINFO_DESC 5
00048
00049
00050
00051
00052
00053 #define NEBMODULE_NORMAL_LOAD 0
00054 #define NEBMODULE_REQUEST_UNLOAD 0
00055 #define NEBMODULE_FORCE_UNLOAD 1
00056
00057
00058
00059
00060
00061 #define NEBMODULE_NEB_SHUTDOWN 1
00062 #define NEBMODULE_NEB_RESTART 2
00063 #define NEBMODULE_ERROR_NO_INIT 3
00064 #define NEBMODULE_ERROR_BAD_INIT 4
00065 #define NEBMODULE_ERROR_API_VERSION 5
00066
00067
00068
00069
00070
00071
00072 typedef struct nebmodule_struct{
00073 char *filename;
00074 char *args;
00075 char *info[NEBMODULE_MODINFO_NUMITEMS];
00076 int should_be_loaded;
00077 int is_currently_loaded;
00078 #ifdef USE_LTDL
00079 lt_dlhandle module_handle;
00080 lt_ptr init_func;
00081 lt_ptr deinit_func;
00082 #else
00083 void *module_handle;
00084 void *init_func;
00085 void *deinit_func;
00086 #endif
00087 #ifdef HAVE_PTHREAD_H
00088 pthread_t thread_id;
00089 #endif
00090 struct nebmodule_struct *next;
00091 }nebmodule;
00092
00093
00094
00095
00096 int neb_set_module_info(void *,int,char *);
00097
00098 #ifdef __cplusplus
00099 }
00100 #endif
00101
00102 #endif