lttng: add status command
[lttng-tools.git] / src / bin / lttng / command.h
1 /*
2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License, version 2 only,
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 */
17
18 #ifndef _LTTNG_CMD_H
19 #define _LTTNG_CMD_H
20
21 #include <lttng/lttng.h>
22 #include <common/common.h>
23 #include <common/defaults.h>
24
25 #include "conf.h"
26 #include "utils.h"
27
28 #define DECL_COMMAND(_name) \
29 extern int cmd_##_name(int, const char **)
30
31 enum cmd_error_code {
32 CMD_SUCCESS = 0,
33 CMD_ERROR,
34 CMD_UNDEFINED,
35 CMD_FATAL,
36 CMD_WARNING,
37 CMD_UNSUPPORTED,
38 };
39
40 struct cmd_struct {
41 const char *name;
42 int (*func)(int argc, const char **argv);
43 };
44
45 DECL_COMMAND(list);
46 DECL_COMMAND(status);
47 DECL_COMMAND(create);
48 DECL_COMMAND(destroy);
49 DECL_COMMAND(start);
50 DECL_COMMAND(stop);
51 DECL_COMMAND(enable_events);
52 DECL_COMMAND(disable_events);
53 DECL_COMMAND(enable_channels);
54 DECL_COMMAND(disable_channels);
55 DECL_COMMAND(add_context);
56 DECL_COMMAND(set_session);
57 DECL_COMMAND(version);
58 DECL_COMMAND(calibrate);
59 DECL_COMMAND(view);
60 DECL_COMMAND(enable_consumer);
61 DECL_COMMAND(disable_consumer);
62 DECL_COMMAND(snapshot);
63 DECL_COMMAND(save);
64 DECL_COMMAND(load);
65 DECL_COMMAND(track);
66 DECL_COMMAND(untrack);
67
68 #endif /* _LTTNG_CMD_H */
This page took 0.030507 seconds and 5 git commands to generate.