kcontext_base.h 593 B

12345678910111213141516171819202122232425262728
  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. typedef struct kcontext_s kcontext_t;
  8. typedef enum {
  9. KCONTEXT_NONE,
  10. KCONTEXT_PLUGIN_INIT,
  11. KCONTEXT_PLUGIN_FINI,
  12. KCONTEXT_PLUGIN_ACTION
  13. } kcontext_type_e;
  14. C_DECL_BEGIN
  15. kcontext_t *kcontext_new(kcontext_type_e type);
  16. void kcontext_free(kcontext_t *context);
  17. kcontext_type_e kcontext_type(const kcontext_t *context);
  18. bool_t kcontext_set_type(kcontext_t *context, kcontext_type_e type);
  19. C_DECL_END
  20. #endif // _klish_kcontext_base_h