navit 0.5.3-trunk
Loading...
Searching...
No Matches
command.h
Go to the documentation of this file.
1
20#ifndef NAVIT_COMMAND_H
21#define NAVIT_COMMAND_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include "attr.h"
28
30 const char *command;
31 int (*func)(void *data, char *cmd, struct attr **in, struct attr ***out);
32};
33
34#define command_cast(x) (int (*)(void *, char *, struct attr **, struct attr ***))(x)
35
36/* prototypes */
37enum attr_type;
38struct attr;
39struct callback;
40struct callback_list;
41struct command_saved;
42struct command_table;
43struct navit;
44char *command_error_to_text(int err);
45enum attr_type command_evaluate_to_attr(struct attr *attr, char *expr, int *error, struct attr *ret);
46void command_evaluate_to_void(struct attr *attr, char *expr, int *error);
47char *command_evaluate_to_string(struct attr *attr, char *expr, int *error);
48int command_evaluate_to_int(struct attr *attr, char *expr, int *error);
49int command_evaluate_to_boolean(struct attr *attr, const char *expr, int *error);
50int command_evaluate_to_length(const char *expr, int *error);
51void command_evaluate(struct attr *attr, const char *expr);
52void command_add_table_attr(struct command_table *table, int count, void *data, struct attr *attr);
53void command_add_table(struct callback_list *cbl, struct command_table *table, int count, void *data);
54void command_saved_set_cb(struct command_saved *cs, struct callback *cb);
57struct command_saved *command_saved_attr_new(char *command, struct attr *context, struct callback *cb, int async);
58struct command_saved *command_saved_new(char *command, struct navit *navit, struct callback *cb, int async);
60/* end of prototypes */
61#ifdef __cplusplus
62}
63#endif
64
65#endif /* NAVIT_COMMAND_H */
attr_type
Definition attr_type_def.h:11
error
Definition command.c:93
void command_add_table_attr(struct command_table *table, int count, void *data, struct attr *attr)
Definition command.c:1639
void command_saved_set_cb(struct command_saved *cs, struct callback *cb)
Definition command.c:1650
char * command_evaluate_to_string(struct attr *attr, char *expr, int *error)
Definition command.c:1348
void command_saved_destroy(struct command_saved *cs)
Definition command.c:1899
int command_evaluate_to_length(const char *expr, int *error)
Definition command.c:1427
int command_evaluate_to_boolean(struct attr *attr, const char *expr, int *error)
Definition command.c:1396
void command_evaluate_to_void(struct attr *attr, char *expr, int *error)
Definition command.c:1334
int command_saved_error(struct command_saved *cs)
Definition command.c:1664
void command_evaluate(struct attr *attr, const char *expr)
Definition command.c:1583
int command_evaluate_to_int(struct attr *attr, char *expr, int *error)
Definition command.c:1372
struct command_saved * command_saved_new(char *command, struct navit *navit, struct callback *cb, int async)
Definition command.c:1894
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:1873
enum attr_type command_evaluate_to_attr(struct attr *attr, char *expr, int *error, struct attr *ret)
Definition command.c:1319
int command_saved_get_int(struct command_saved *cs)
Returns an integer representation of the evaluation result of a saved command.
Definition command.c:1660
void command_add_table(struct callback_list *cbl, struct command_table *table, int count, void *data)
Definition command.c:1644
char * command_error_to_text(int err)
Converts an error to human-readable text.
Definition command.c:135
char data
Definition garmin_img.c:2
struct callback_list * cbl
Definition main.c:63
Definition attr.h:138
Definition callback.c:37
Definition callback.c:27
Definition command.c:75
struct callback * cb
Definition command.c:88
int async
Definition command.c:90
char * command
Definition command.c:78
Definition command.h:29
const char * command
Definition command.h:30
int(* func)(void *data, char *cmd, struct attr **in, struct attr ***out)
Definition command.h:31
Definition command.c:56
Definition navit.c:111
void err(char *fmt,...)
Definition tell_navit.c:42