diff options
Diffstat (limited to 'src/d_bus_commands.h')
-rw-r--r-- | src/d_bus_commands.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/d_bus_commands.h b/src/d_bus_commands.h new file mode 100644 index 0000000..24e1c80 --- /dev/null +++ b/src/d_bus_commands.h @@ -0,0 +1,42 @@ +#ifndef D_BUS_COMMANDS_H +#define D_BUS_COMMANDS_H + + + +#include "d_bus.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define COMMAND_UNKNOWN -1 +typedef struct +{ + int command; + const string_quadruple_t * path; +}command_dbus_path_t; + +typedef struct +{ + int command; + const char* member; +}command_dbus_member_t; + +typedef struct +{ + const char* name; + int command; + const char* help; +}universal_command_t; + +int parse_command2enum(const char* command, const universal_command_t* cmds); +const string_quadruple_t* get_dbus_command_interface(int cmd, const command_dbus_path_t* pathes); +const char* get_dbus_command_member(int cmd, const command_dbus_member_t* values); +int com_dbus_property( char *arg, const universal_command_t* commands, const command_dbus_path_t* paths, const command_dbus_member_t* values); +void print_command_help(const universal_command_t* cmds); + +#ifdef __cplusplus +} +#endif + +#endif // D_BUS_COMMANDS_H |