1
0

private.h 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * plugin private.h
  3. */
  4. #include "lub/list.h"
  5. #include "clish/plugin.h"
  6. /*---------------------------------------------------------
  7. * PRIVATE TYPES
  8. *--------------------------------------------------------- */
  9. struct clish_sym_s {
  10. char *name; /* Symbol name */
  11. const void *func; /* Function address */
  12. int type; /* Function type */
  13. clish_sym_api_e api; /* Function API */
  14. bool_t permanent; /* If permanent the dry-run can't switch it off */
  15. clish_plugin_t *plugin; /* Parent plugin */
  16. };
  17. struct clish_plugin_s {
  18. char *name; /* Plugin name. */
  19. char *alias; /* User defined plugin name. Can be used in builtin ref. */
  20. char *file; /* Shared object file name. */
  21. bool_t builtin_flag; /* If plugin is built into binary */
  22. char *conf; /* The content of <PLUGIN>...</PLUGIN> */
  23. lub_list_t *syms; /* List of plugin symbols */
  24. void *dlhan; /* Handler of dlopen() */
  25. clish_plugin_init_t *init; /* Init function (constructor) != NULL */
  26. clish_plugin_fini_t *fini; /* Fini function (destructor) */
  27. bool_t rtld_global; /* RTLD_GLOBAL flag for dlopen() */
  28. };