1
0

private.h 966 B

123456789101112131415161718192021222324252627282930
  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. void *func; /* Function address */
  12. int type; /* Function type */
  13. bool_t permanent; /* If permanent the dry-run can't switch it off */
  14. clish_plugin_t *plugin; /* Parent plugin */
  15. };
  16. struct clish_plugin_s {
  17. char *name; /* Plugin name. */
  18. char *alias; /* User defined plugin name. Can be used in builtin ref. */
  19. char *file; /* Shared object file name. */
  20. bool_t builtin_flag; /* If plugin is built into binary */
  21. char *conf; /* The content of <PLUGIN>...</PLUGIN> */
  22. lub_list_t *syms; /* List of plugin symbols */
  23. void *dlhan; /* Handler of dlopen() */
  24. clish_plugin_init_t *init; /* Init function (constructor) != NULL */
  25. clish_plugin_fini_t *fini; /* Fini function (destructor) */
  26. };