kcontext_base.h 638 B

1234567891011121314151617181920212223242526272829303132
  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_ACTION,
  14. KCONTEXT_SERVICE_ACTION,
  15. } kcontext_type_e;
  16. C_DECL_BEGIN
  17. kcontext_t *kcontext_new(kcontext_type_e type);
  18. void kcontext_free(kcontext_t *context);
  19. kcontext_type_e kcontext_type(const kcontext_t *context);
  20. bool_t kcontext_set_type(kcontext_t *context, kcontext_type_e type);
  21. C_DECL_END
  22. #endif // _klish_kcontext_base_h