Remove lttng_action_get_type_const as it is no longer needed.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I1525bc2c89eb37ab3e75d915c6ff50bd2a7f5d21
ssize_t lttng_action_create_from_payload(struct lttng_payload_view *view,
struct lttng_action **action);
-LTTNG_HIDDEN
-enum lttng_action_type lttng_action_get_type_const(
- const struct lttng_action *action);
-
LTTNG_HIDDEN
bool lttng_action_is_equal(const struct lttng_action *a,
const struct lttng_action *b);
* Returns the type of an action on success, LTTNG_ACTION_TYPE_UNKNOWN on error.
*/
extern enum lttng_action_type lttng_action_get_type(
- struct lttng_action *action);
+ const struct lttng_action *action);
/*
* Destroy (frees) an action object.
static const char *get_action_name(const struct lttng_action *action)
{
- return action_type_names[lttng_action_get_type_const(action)];
+ return action_type_names[lttng_action_get_type(action)];
}
/* Check if this trigger allowed to interect with a given session. */
work_item->trigger,
work_item->id);
- return action_executors[lttng_action_get_type_const(action)](
+ return action_executors[lttng_action_get_type(action)](
executor, work_item, action);
}
enum lttng_action_type action_type;
assert(action);
- action_type = lttng_action_get_type_const(action);
+ action_type = lttng_action_get_type(action);
if (action_type == LTTNG_ACTION_TYPE_NOTIFY) {
is_notify = true;
goto end;
lttng_action_group_get_at_index(
action, i);
- action_type = lttng_action_get_type_const(inner_action);
+ action_type = lttng_action_get_type(inner_action);
if (action_type == LTTNG_ACTION_TYPE_NOTIFY) {
is_notify = true;
goto end;
}
}
-enum lttng_action_type lttng_action_get_type(struct lttng_action *action)
+enum lttng_action_type lttng_action_get_type(const struct lttng_action *action)
{
return action ? action->type : LTTNG_ACTION_TYPE_UNKNOWN;
}
-LTTNG_HIDDEN
-enum lttng_action_type lttng_action_get_type_const(
- const struct lttng_action *action)
-{
- return action->type;
-}
-
LTTNG_HIDDEN
void lttng_action_init(
struct lttng_action *action,
#include <lttng/action/group.h>
#define IS_GROUP_ACTION(action) \
- (lttng_action_get_type_const(action) == LTTNG_ACTION_TYPE_GROUP)
+ (lttng_action_get_type(action) == LTTNG_ACTION_TYPE_GROUP)
struct lttng_action_group {
struct lttng_action parent;
#include <lttng/action/rotate-session.h>
#define IS_ROTATE_SESSION_ACTION(action) \
- (lttng_action_get_type_const(action) == LTTNG_ACTION_TYPE_ROTATE_SESSION)
+ (lttng_action_get_type(action) == LTTNG_ACTION_TYPE_ROTATE_SESSION)
struct lttng_action_rotate_session {
struct lttng_action parent;
#include <inttypes.h>
#define IS_SNAPSHOT_SESSION_ACTION(action) \
- (lttng_action_get_type_const(action) == LTTNG_ACTION_TYPE_SNAPSHOT_SESSION)
+ (lttng_action_get_type(action) == LTTNG_ACTION_TYPE_SNAPSHOT_SESSION)
struct lttng_action_snapshot_session {
struct lttng_action parent;
#include <lttng/action/start-session.h>
#define IS_START_SESSION_ACTION(action) \
- (lttng_action_get_type_const(action) == LTTNG_ACTION_TYPE_START_SESSION)
+ (lttng_action_get_type(action) == LTTNG_ACTION_TYPE_START_SESSION)
struct lttng_action_start_session {
struct lttng_action parent;
#include <lttng/action/stop-session.h>
#define IS_STOP_SESSION_ACTION(action) \
- (lttng_action_get_type_const(action) == LTTNG_ACTION_TYPE_STOP_SESSION)
+ (lttng_action_get_type(action) == LTTNG_ACTION_TYPE_STOP_SESSION)
struct lttng_action_stop_session {
struct lttng_action parent;