X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Faction%2Fsnapshot-session.h;h=8590862007f9dc4fe7d3861dfac444f079340c91;hb=b66cbf1731486ab4dc7e0b2e1c3fa05cc5360c19;hp=f8d7ee3665a0c61f42e713973418f34f591f4fad;hpb=757c48a28258e64fe251b6803ccdba7898590d70;p=lttng-tools.git diff --git a/include/lttng/action/snapshot-session.h b/include/lttng/action/snapshot-session.h index f8d7ee366..859086200 100644 --- a/include/lttng/action/snapshot-session.h +++ b/include/lttng/action/snapshot-session.h @@ -8,12 +8,15 @@ #ifndef LTTNG_ACTION_SNAPSHOT_SESSION_H #define LTTNG_ACTION_SNAPSHOT_SESSION_H +#include + #ifdef __cplusplus extern "C" { #endif struct lttng_action; struct lttng_snapshot_output; +struct lttng_rate_policy; /* * Create a newly allocated snapshot-session action object. @@ -25,20 +28,20 @@ struct lttng_snapshot_output; * Returns a new action on success, NULL on failure. This action must be * destroyed using lttng_action_destroy(). */ -extern struct lttng_action *lttng_action_snapshot_session_create(void); +LTTNG_EXPORT extern struct lttng_action *lttng_action_snapshot_session_create(void); /* * Set the session name of an lttng_action object of type * LTTNG_ACTION_TYPE_SNAPSHOT_SESSION. */ -extern enum lttng_action_status lttng_action_snapshot_session_set_session_name( +LTTNG_EXPORT extern enum lttng_action_status lttng_action_snapshot_session_set_session_name( struct lttng_action *action, const char *session_name); /* * Get the session name of an lttng_action object of type * LTTNG_ACTION_TYPE_SNAPSHOT_SESSION. */ -extern enum lttng_action_status lttng_action_snapshot_session_get_session_name( +LTTNG_EXPORT extern enum lttng_action_status lttng_action_snapshot_session_get_session_name( const struct lttng_action *action, const char **session_name); /* @@ -49,17 +52,38 @@ extern enum lttng_action_status lttng_action_snapshot_session_get_session_name( * * This function takes ownership of the given snapshot output. */ -extern enum lttng_action_status lttng_action_snapshot_session_set_output( +LTTNG_EXPORT extern enum lttng_action_status lttng_action_snapshot_session_set_output( struct lttng_action *action, struct lttng_snapshot_output *output); /* * Get the explicit snapshot output for this snapshot session action. */ -extern enum lttng_action_status lttng_action_snapshot_session_get_output( +LTTNG_EXPORT extern enum lttng_action_status lttng_action_snapshot_session_get_output( const struct lttng_action *action, const struct lttng_snapshot_output **output); +/* + * Set the rate policy of a snapshot session action. + * + * Returns LTTNG_ACTION_STATUS_OK on success, + * LTTNG_ACTION_STATUS_ERROR on internal error, + * LTTNG_ACTION_STATUS_INVALID if invalid parameters are passed. + */ +LTTNG_EXPORT extern enum lttng_action_status lttng_action_snapshot_session_set_rate_policy( + struct lttng_action *action, + const struct lttng_rate_policy *policy); + +/* + * Get the rate policy of a snapshot session action. + * + * Returns LTTNG_ACTION_STATUS_OK on success, + * LTTNG_ACTION_STATUS_INVALID if invalid parameters are passed. + */ +LTTNG_EXPORT extern enum lttng_action_status lttng_action_snapshot_session_get_rate_policy( + const struct lttng_action *action, + const struct lttng_rate_policy **policy); + #ifdef __cplusplus } #endif