bin: compile lttng as C++
[lttng-tools.git] / include / lttng / event-rule / event-rule-internal.h
index a8ad34fe897728731fd9bb4b0d468bbb90a4292e..98d1f449d2e9000d6d781a6802275d8e74af45e7 100644 (file)
 #include <sys/types.h>
 #include <urcu/ref.h>
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 struct lttng_payload;
 struct lttng_payload_view;
+struct mi_writer;
 
 enum lttng_event_rule_generate_exclusions_status {
        LTTNG_EVENT_RULE_GENERATE_EXCLUSIONS_STATUS_OK,
@@ -46,7 +51,7 @@ typedef enum lttng_error_code (*event_rule_generate_filter_bytecode_cb)(
                const struct lttng_credentials *creds);
 typedef const char *(*event_rule_get_filter_cb)(
                const struct lttng_event_rule *event_rule);
-typedef const struct lttng_filter_bytecode *(
+typedef const struct lttng_bytecode *(
                *event_rule_get_filter_bytecode_cb)(
                const struct lttng_event_rule *event_rule);
 typedef enum lttng_event_rule_generate_exclusions_status (
@@ -57,6 +62,9 @@ typedef unsigned long (*event_rule_hash_cb)(
                const struct lttng_event_rule *event_rule);
 typedef struct lttng_event *(*event_rule_generate_lttng_event_cb)(
                const struct lttng_event_rule *event_rule);
+typedef enum lttng_error_code (*event_rule_mi_serialize_cb)(
+               const struct lttng_event_rule *event_rule,
+               struct mi_writer *writer);
 
 struct lttng_event_rule {
        struct urcu_ref ref;
@@ -71,6 +79,7 @@ struct lttng_event_rule {
        event_rule_generate_exclusions_cb generate_exclusions;
        event_rule_hash_cb hash;
        event_rule_generate_lttng_event_cb generate_lttng_event;
+       event_rule_mi_serialize_cb mi_serialize;
 };
 
 struct lttng_event_rule_comm {
@@ -79,37 +88,28 @@ struct lttng_event_rule_comm {
        char payload[];
 };
 
-LTTNG_HIDDEN
 void lttng_event_rule_init(struct lttng_event_rule *event_rule,
                enum lttng_event_rule_type type);
 
-LTTNG_HIDDEN
 bool lttng_event_rule_validate(const struct lttng_event_rule *event_rule);
 
-LTTNG_HIDDEN
 ssize_t lttng_event_rule_create_from_payload(
                struct lttng_payload_view *payload,
                struct lttng_event_rule **event_rule);
 
-LTTNG_HIDDEN
 int lttng_event_rule_serialize(const struct lttng_event_rule *event_rule,
                struct lttng_payload *payload);
 
-LTTNG_HIDDEN
 bool lttng_event_rule_is_equal(const struct lttng_event_rule *a,
                const struct lttng_event_rule *b);
 
-LTTNG_HIDDEN
 bool lttng_event_rule_get(struct lttng_event_rule *rule);
 
-LTTNG_HIDDEN
 void lttng_event_rule_put(struct lttng_event_rule *rule);
 
-LTTNG_HIDDEN
 enum lttng_domain_type lttng_event_rule_get_domain_type(
                const struct lttng_event_rule *rule);
 
-LTTNG_HIDDEN
 enum lttng_error_code lttng_event_rule_generate_filter_bytecode(
                struct lttng_event_rule *rule,
                const struct lttng_credentials *creds);
@@ -118,30 +118,25 @@ enum lttng_error_code lttng_event_rule_generate_filter_bytecode(
  * If not present/implemented returns NULL.
  * Caller DOES NOT own the returned object.
  */
-LTTNG_HIDDEN
 const char *lttng_event_rule_get_filter(const struct lttng_event_rule *rule);
 
 /*
  * If not present/implemented returns NULL.
  * Caller DOES NOT own the returned object.
  */
-LTTNG_HIDDEN
-const struct lttng_filter_bytecode *lttng_event_rule_get_filter_bytecode(
+const struct lttng_bytecode *lttng_event_rule_get_filter_bytecode(
                const struct lttng_event_rule *rule);
 
 /*
  * If not present/implemented return NULL.
  * Caller OWNS the returned object.
  */
-LTTNG_HIDDEN
 enum lttng_event_rule_generate_exclusions_status
 lttng_event_rule_generate_exclusions(const struct lttng_event_rule *rule,
                struct lttng_event_exclusion **exclusions);
 
-LTTNG_HIDDEN
 const char *lttng_event_rule_type_str(enum lttng_event_rule_type type);
 
-LTTNG_HIDDEN
 unsigned long lttng_event_rule_hash(const struct lttng_event_rule *rule);
 
 /*
@@ -153,12 +148,17 @@ unsigned long lttng_event_rule_hash(const struct lttng_event_rule *rule);
  *
  * The caller owns the returned object.
  */
-LTTNG_HIDDEN
 struct lttng_event *lttng_event_rule_generate_lttng_event(
                const struct lttng_event_rule *rule);
 
 /* Test if an event rule targets an agent domain. */
-LTTNG_HIDDEN
 bool lttng_event_rule_targets_agent_domain(const struct lttng_event_rule *rule);
 
+enum lttng_error_code lttng_event_rule_mi_serialize(
+               const struct lttng_event_rule *rule, struct mi_writer *writer);
+
+#if defined(__cplusplus)
+}
+#endif
+
 #endif /* LTTNG_EVENT_RULE_INTERNAL_H */
This page took 0.024858 seconds and 4 git commands to generate.