1 #ifndef COMMANDS_H 2 #define COMMANDS_H 3 4 #include <stdbool.h> 5 #include <stdint.h> 6 7 #define MAX_NUM_CMDS 256 8 9 struct Command { 10 char *cmd; 11 int cmd_length; 12 bool (*func)(void *object, char *arg, int arg_length); 13 }; 14 15 /** utox_run_command() 16 * 17 * takes data string and parses it for a command, if that command is supported, acts on that command, else it simply 18 * results the processed command and argv. 19 * 20 * Returns the remaining string length. 21 */ 22 uint16_t utox_run_command(char *string, uint16_t string_length, char **cmd, char **argument, int trusted); 23 24 extern bool g_select_add_friend_later; 25 void do_tox_url(uint8_t *url_string, int len); 26 27 #endif 28