4b031137c6473153fc005321bb4a226c4c51fb3f
2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_TRIGGER_INTERNAL_H
9 #define LTTNG_TRIGGER_INTERNAL_H
11 #include <lttng/trigger/trigger.h>
12 #include <common/credentials.h>
13 #include <common/macros.h>
14 #include <common/optional.h>
17 #include <sys/types.h>
21 struct lttng_payload_view
;
23 struct lttng_trigger
{
24 /* Reference counting is only exposed to internal users. */
27 struct lttng_condition
*condition
;
28 struct lttng_action
*action
;
29 LTTNG_OPTIONAL(struct lttng_credentials
) creds
;
32 struct lttng_trigger_comm
{
33 /* length excludes its own length. */
35 /* A condition and action object follow. */
40 ssize_t
lttng_trigger_create_from_payload(struct lttng_payload_view
*view
,
41 struct lttng_trigger
**trigger
);
44 int lttng_trigger_serialize(struct lttng_trigger
*trigger
,
45 struct lttng_payload
*payload
);
48 const struct lttng_condition
*lttng_trigger_get_const_condition(
49 const struct lttng_trigger
*trigger
);
52 const struct lttng_action
*lttng_trigger_get_const_action(
53 const struct lttng_trigger
*trigger
);
56 bool lttng_trigger_validate(struct lttng_trigger
*trigger
);
59 void lttng_trigger_get(struct lttng_trigger
*trigger
);
62 void lttng_trigger_put(struct lttng_trigger
*trigger
);
65 const struct lttng_credentials
*lttng_trigger_get_credentials(
66 const struct lttng_trigger
*trigger
);
69 void lttng_trigger_set_credentials(
70 struct lttng_trigger
*trigger
,
71 const struct lttng_credentials
*creds
);
73 #endif /* LTTNG_TRIGGER_INTERNAL_H */
This page took 0.036753 seconds and 3 git commands to generate.