#include <stdio.h>
#include <stdlib.h>
#include <cJSON.h>
Go to the source code of this file.
Classes | |
struct | openme_event |
struct | openme_hooks |
struct | openme_info |
Defines | |
#define | OPENME_USE "OPENME_USE" |
#define | OPENME_PLUGINS "OPENME_PLUGINS" |
#define | OPENME_PLUGIN_INIT_FUNC "openme_plugin_init" |
#define | OPENME_OUTPUT_FILE "OPENME_OUTPUT_FILE" |
#define | OPENME_DEBUG "OPENME_DEBUG" |
Functions | |
int | openme_init (char *env_use, char *env_plugins, char *plugin_names, int force_use) |
void | openme_callback (char *event_name, void *params) |
void | openme_register_callback (struct openme_info *ome_info, char *event_name, void *func) |
cJSON * | openme_create_obj (char *str) |
cJSON * | openme_get_obj (cJSON *json, char *str) |
void | openme_print_obj (cJSON *obj) |
cJSON * | cm_action (cJSON *inp) |
void | openme_init_hooks (struct openme_hooks *ome_hooks) |
cJSON * | openme_load_json_file (char *file_name) |
int | openme_store_json_file (cJSON *json, char *file_name) |
void | openme_set_error (char *format, char *text) |
void | openme_print_error (void) |
int | openme_init_f_ (char *env_use, char *env_plugins, char *plugin_names, int force_use) |
int | OPENME_INIT_F (char *env_use, char *env_plugins, char *plugin_names, int force_use) |
void | openme_callback_f (char *event_name, void *params) |
void | OPENME_CALLBACK_F (char *event_name, void *params) |
cJSON * | openme_create_obj_f_ (char *str) |
cJSON * | OPENME_CREATE_OBJ_F (char *str) |
cJSON * | openme_get_obj_f_ (char *str) |
cJSON * | OPENME_GET_OBJ_F (char *str) |
void | openme_print_obj_f_ (cJSON **obj) |
void | OPENME_PRINT_OBJ_F (cJSON **obj) |
#define OPENME_DEBUG "OPENME_DEBUG" |
Definition at line 30 of file openme.h.
Referenced by openme_callback(), openme_init(), and openme_register_callback().
#define OPENME_PLUGIN_INIT_FUNC "openme_plugin_init" |
Definition at line 28 of file openme.h.
Referenced by openme_init().
#define OPENME_PLUGINS "OPENME_PLUGINS" |
Definition at line 27 of file openme.h.
Referenced by openme_init().
#define OPENME_USE "OPENME_USE" |
Definition at line 26 of file openme.h.
Referenced by openme_init().
cJSON* cm_action | ( | cJSON * | inp | ) |
Definition at line 481 of file openme.c.
References bufx, bufy, json, openme_get_obj(), openme_load_json_file(), openme_set_error(), openme_store_json_file(), module::r, and cm::system().
Referenced by CM_ACTION_F(), and cm_action_f_().
void openme_callback | ( | char * | event_name, | |
void * | params | |||
) |
Definition at line 193 of file openme.c.
References openme_info::event_list, openme_event::func, openme_event::name, openme_event::next, OPENME_DEBUG, openme_initialized, and openme_use.
Referenced by OPENME_CALLBACK_F(), and openme_callback_f_().
void OPENME_CALLBACK_F | ( | char * | event_name, | |
void * | params | |||
) |
Definition at line 558 of file openme.c.
References openme_callback().
void openme_callback_f | ( | char * | event_name, | |
void * | params | |||
) |
cJSON* openme_create_obj | ( | char * | str | ) |
Definition at line 295 of file openme.c.
References cmx::il, and openme_load_json_file().
Referenced by OPENME_CREATE_OBJ_F(), and openme_create_obj_f_().
cJSON* OPENME_CREATE_OBJ_F | ( | char * | str | ) |
Definition at line 561 of file openme.c.
References openme_create_obj().
cJSON* openme_create_obj_f_ | ( | char * | str | ) |
Definition at line 560 of file openme.c.
References openme_create_obj().
cJSON* openme_get_obj | ( | cJSON * | json, | |
char * | str | |||
) |
Definition at line 364 of file openme.c.
Referenced by cm_action().
cJSON* OPENME_GET_OBJ_F | ( | char * | str | ) |
cJSON* openme_get_obj_f_ | ( | char * | str | ) |
int openme_init | ( | char * | env_use, | |
char * | env_plugins, | |||
char * | plugin_names, | |||
int | force_use | |||
) |
Definition at line 54 of file openme.c.
References dll, openme_hooks::fclose, openme_hooks::fopen, openme_hooks::fprintf, openme_hooks::fread, openme_hooks::free, openme_hooks::fseek, openme_hooks::ftell, openme_info::hooks, openme_hooks::malloc, OPENME_DEBUG, openme_initialized, OPENME_PLUGIN_INIT_FUNC, OPENME_PLUGINS, openme_use, OPENME_USE, and cmx::p.
Referenced by OPENME_INIT_F(), and openme_init_f_().
int OPENME_INIT_F | ( | char * | env_use, | |
char * | env_plugins, | |||
char * | plugin_names, | |||
int | force_use | |||
) |
Definition at line 554 of file openme.c.
References openme_init().
int openme_init_f_ | ( | char * | env_use, | |
char * | env_plugins, | |||
char * | plugin_names, | |||
int | force_use | |||
) |
Definition at line 552 of file openme.c.
References openme_init().
void openme_init_hooks | ( | struct openme_hooks * | ome_hooks | ) |
Definition at line 177 of file openme.c.
References openme_hooks::fclose, openme_hooks::fopen, openme_hooks::fprintf, openme_hooks::fread, openme_hooks::free, openme_hooks::fseek, openme_hooks::ftell, openme_info::hooks, and openme_hooks::malloc.
cJSON* openme_load_json_file | ( | char * | file_name | ) |
Definition at line 391 of file openme.c.
References openme_hooks::fclose, openme_hooks::fopen, openme_hooks::fread, openme_hooks::free, openme_hooks::fseek, openme_hooks::ftell, openme_hooks::malloc, and openme_set_error().
Referenced by cm_action(), and openme_create_obj().
void openme_print_error | ( | void | ) |
Definition at line 468 of file openme.c.
References openme_info::error.
void openme_print_obj | ( | cJSON * | obj | ) |
Definition at line 378 of file openme.c.
Referenced by OPENME_PRINT_OBJ_F(), and openme_print_obj_f_().
void OPENME_PRINT_OBJ_F | ( | cJSON ** | obj | ) |
Definition at line 564 of file openme.c.
References openme_print_obj().
void openme_print_obj_f_ | ( | cJSON ** | obj | ) |
Definition at line 563 of file openme.c.
References openme_print_obj().
void openme_register_callback | ( | struct openme_info * | ome_info, | |
char * | event_name, | |||
void * | func | |||
) |
Definition at line 240 of file openme.c.
References openme_info::event_list, openme_event::func, openme_info::hooks, openme_hooks::malloc, openme_event::name, openme_event::next, and OPENME_DEBUG.
void openme_set_error | ( | char * | format, | |
char * | text | |||
) |
Definition at line 454 of file openme.c.
References openme_info::error.
Referenced by cm_action(), openme_load_json_file(), and openme_store_json_file().
int openme_store_json_file | ( | cJSON * | json, | |
char * | file_name | |||
) |
Definition at line 426 of file openme.c.
References openme_hooks::fclose, openme_hooks::fopen, openme_hooks::fprintf, and openme_set_error().
Referenced by cm_action().