#include <lttng/trigger/trigger-internal.h>
#include <lttng/condition/condition-internal.h>
#include <lttng/action/action-internal.h>
-#include <common/sessiond-comm/payload.h>
-#include <common/sessiond-comm/payload-view.h>
+#include <common/credentials.h>
+#include <common/payload.h>
+#include <common/payload-view.h>
#include <common/error.h>
+#include <common/optional.h>
#include <assert.h>
LTTNG_HIDDEN
trigger->condition = condition;
trigger->action = action;
+
end:
return trigger;
}
end:
return ret;
}
+
+LTTNG_HIDDEN
+const struct lttng_credentials *lttng_trigger_get_credentials(
+ const struct lttng_trigger *trigger)
+{
+ return LTTNG_OPTIONAL_GET_PTR(trigger->creds);
+}
+
+LTTNG_HIDDEN
+void lttng_trigger_set_credentials(
+ struct lttng_trigger *trigger,
+ const struct lttng_credentials *creds)
+{
+ assert(creds);
+ LTTNG_OPTIONAL_SET(&trigger->creds, *creds);
+}