private.h 941 B

1234567891011121314151617181920212223242526272829
  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 *file; /* Plugin file name. Must be unique. */
  18. char *name; /* Plugin name defined by plugin itself. */
  19. char *alias; /* User defined plugin name. Can be used in builtin ref. */
  20. char *conf; /* The content of <PLUGIN>...</PLUGIN> */
  21. lub_list_t *syms; /* List of plugin symbols */
  22. void *dlhan; /* Handler of dlopen() */
  23. clish_plugin_init_t *init; /* Init function (constructor) != NULL */
  24. clish_plugin_fini_t *fini; /* Fini function (destructor) */
  25. };