kcontext_base.h 618 B

12345678910111213141516171819202122232425262728293031
  1. /** @file kcontext_base.h
  2. *
  3. * @brief Klish base context to pass to plugin's functions
  4. */
  5. #ifndef _klish_kcontext_base_h
  6. #define _klish_kcontext_base_h
  7. #include <faux/faux.h>
  8. typedef struct kcontext_s kcontext_t;
  9. typedef enum {
  10. KCONTEXT_NONE,
  11. KCONTEXT_PLUGIN_INIT,
  12. KCONTEXT_PLUGIN_FINI,
  13. KCONTEXT_PLUGIN_ACTION
  14. } kcontext_type_e;
  15. C_DECL_BEGIN
  16. kcontext_t *kcontext_new(kcontext_type_e type);
  17. void kcontext_free(kcontext_t *context);
  18. kcontext_type_e kcontext_type(const kcontext_t *context);
  19. bool_t kcontext_set_type(kcontext_t *context, kcontext_type_e type);
  20. C_DECL_END
  21. #endif // _klish_kcontext_base_h