navit  0.5.1-trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups
command.h
Go to the documentation of this file.
1 
20 #ifndef NAVIT_COMMAND_H
21 #define NAVIT_COMMAND_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 struct command_table {
28  const char *command;
29  int (*func)(void *data, char *cmd, struct attr **in, struct attr ***out);
30 };
31 
32 #define command_cast(x) (int (*)(void *, char *, struct attr **, struct attr ***))(x)
33 
34 /* prototypes */
35 enum attr_type;
36 struct attr;
37 struct callback;
38 struct callback_list;
39 struct command_saved;
40 struct command_table;
41 struct navit;
42 char *command_error_to_text(int err);
43 enum attr_type command_evaluate_to_attr(struct attr *attr, char *expr, int *error, struct attr *ret);
44 void command_evaluate_to_void(struct attr *attr, char *expr, int *error);
45 char *command_evaluate_to_string(struct attr *attr, char *expr, int *error);
46 int command_evaluate_to_int(struct attr *attr, char *expr, int *error);
47 int command_evaluate_to_boolean(struct attr *attr, const char *expr, int *error);
48 int command_evaluate_to_length(const char *expr, int *error);
49 void command_evaluate(struct attr *attr, const char *expr);
50 void command_add_table_attr(struct command_table *table, int count, void *data, struct attr *attr);
51 void command_add_table(struct callback_list *cbl, struct command_table *table, int count, void *data);
52 void command_saved_set_cb(struct command_saved *cs, struct callback *cb);
53 int command_saved_get_int(struct command_saved *cs);
54 int command_saved_error(struct command_saved *cs);
55 struct command_saved *command_saved_attr_new(char *command, struct attr *context, struct callback *cb, int async);
56 struct command_saved *command_saved_new(char *command, struct navit *navit, struct callback *cb, int async);
57 void command_saved_destroy(struct command_saved *cs);
58 /* end of prototypes */
59 #ifdef __cplusplus
60 }
61 #endif
62 
63  #endif /* NAVIT_COMMAND_H */
attr_type
Definition: attr.h:34
Definition: command.c:57
int command_evaluate_to_length(const char *expr, int *error)
Definition: command.c:1405
struct callback_list * cbl
Definition: main.c:64
int(* func)(void *data, char *cmd, struct attr **in, struct attr ***out)
Definition: command.h:29
void command_evaluate_to_void(struct attr *attr, char *expr, int *error)
Definition: command.c:1315
void command_saved_set_cb(struct command_saved *cs, struct callback *cb)
Definition: command.c:1627
void command_evaluate(struct attr *attr, const char *expr)
Definition: command.c:1553
struct command_saved * command_saved_new(char *command, struct navit *navit, struct callback *cb, int async)
Definition: command.c:1881
int command_saved_get_int(struct command_saved *cs)
Returns an integer representation of the evaluation result of a saved command.
Definition: command.c:1639
char * command_evaluate_to_string(struct attr *attr, char *expr, int *error)
Definition: command.c:1329
Definition: callback.c:36
int command_evaluate_to_int(struct attr *attr, char *expr, int *error)
Definition: command.c:1352
char data
Definition: garmin_img.c:354
Definition: attr.h:156
int command_evaluate_to_boolean(struct attr *attr, const char *expr, int *error)
Definition: command.c:1375
Definition: callback.c:26
const char * command
Definition: command.h:28
void command_saved_destroy(struct command_saved *cs)
Definition: command.c:1888
void err(char *fmt,...)
Definition: tell_navit.c:43
char * command_error_to_text(int err)
Converts an error to human-readable text.
Definition: command.c:119
void command_add_table_attr(struct command_table *table, int count, void *data, struct attr *attr)
Definition: command.c:1612
int async
Definition: command.c:91
struct callback * cb
Definition: command.c:89
typedef int(WINAPI *FP_SetStretchBltMode)(HDC dc
Definition: navit.c:111
Definition: command.h:27
int command_saved_error(struct command_saved *cs)
Definition: command.c:1645
Definition: command.c:76
void command(struct attr *attr, char *expr)
Definition: command.c:1269
enum attr_type command_evaluate_to_attr(struct attr *attr, char *expr, int *error, struct attr *ret)
Definition: command.c:1301
struct command_saved * command_saved_attr_new(char *command, struct attr *context, struct callback *cb, int async)
Creates a new saved command.
Definition: command.c:1858
void command_add_table(struct callback_list *cbl, struct command_table *table, int count, void *data)
Definition: command.c:1619
error
Definition: command.c:94