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
00026
00027
00028
00036 #ifndef _MI_MI_H_
00037 #define _MI_MI_H_
00038
00039 #include "../../str.h"
00040 #include "../../mi/mi_types.h"
00041 #include "tree.h"
00042
00043 #define MI_ASYNC_RPL_FLAG (1<<0)
00044 #define MI_NO_INPUT_FLAG (1<<1)
00045
00046 #define MI_ROOT_ASYNC_RPL ((struct mi_root*)-1)
00047
00048
00049
00050 struct mi_handler {
00051 mi_handler_f *handler_f;
00052 void * param;
00053 };
00054
00055
00056 struct mi_cmd {
00057 int id;
00058 str name;
00059 mi_child_init_f *init_f;
00060 mi_cmd_f *f;
00061 unsigned int flags;
00062 void *param;
00063 };
00064
00065
00066 int register_mi_cmd( mi_cmd_f f, char *name, void *param,
00067 mi_child_init_f in, unsigned int flags);
00068
00069 int register_mi_mod( char *mod_name, mi_export_t *mis);
00070
00071 int init_mi_child(int rank, int mode);
00072
00073 struct mi_cmd* lookup_mi_cmd( char *name, int len);
00074
00075 static inline struct mi_root* run_mi_cmd(struct mi_cmd *cmd, struct mi_root *t)
00076 {
00077 return cmd->f( t, cmd->param);
00078 }
00079
00080 void get_mi_cmds( struct mi_cmd** cmds, int *size);
00081
00082 int init_mi_core(void);
00083
00084 #endif
00085