as argument introducers. in 0.4-pre10, these were changed
from foo to -foo and this broke many clients. This change
should fix that and be backward/forward compatible.
+ Added a noop function to the protocol. This is useful for writing
shell script clients of LCDproc.
+ Changed the shared sock_send_string function to NOT send the
ending NUL ('\0') byte with the string. This was confusing
in Perl clients which saw NUL's as the first character of
each reply. WARNING: The LCDPROC client depended on this
behavior, your client may too. Use the newline instead.
See the code in clients/lcdproc/main.c (look for "switch(buf[i])")
to see one way to handle this. This should allow new clients
to connect to old servers and vice-versa.
+ Messed with include structure in .c files. It should no longer
be necessary to specify ../.. to get to shared code headers.
Also, since we are using automake, the global config.h can be
found with just #include "config.h" as it's location is included
in a -I to the compilers. As a result "make distcheck" now works.
41 lines
1.6 KiB
C
41 lines
1.6 KiB
C
#ifndef CLIENT_FUNCTION_H
|
|
#define CLIENT_FUNCTION_H
|
|
|
|
/*
|
|
The function list for clients is stored in a table, and the items each
|
|
point to a function to call, defined below.
|
|
*/
|
|
|
|
typedef struct client_function {
|
|
char *keyword;
|
|
int (*function) (client * c, int argc, char **argv);
|
|
} client_function;
|
|
|
|
// FIXME? Do these really need to be visible from other sources?
|
|
int test_func_func (client * c, int argc, char **argv);
|
|
int hello_func (client * c, int argc, char **argv);
|
|
int client_set_func (client * c, int argc, char **argv);
|
|
int client_add_key_func (client * c, int argc, char **argv);
|
|
int client_del_key_func (client * c, int argc, char **argv);
|
|
int screen_add_key_func (client * c, int argc, char **argv);
|
|
int screen_del_key_func (client * c, int argc, char **argv);
|
|
int screen_add_func (client * c, int argc, char **argv);
|
|
int screen_del_func (client * c, int argc, char **argv);
|
|
int screen_set_func (client * c, int argc, char **argv);
|
|
int widget_add_func (client * c, int argc, char **argv);
|
|
int widget_del_func (client * c, int argc, char **argv);
|
|
int widget_set_func (client * c, int argc, char **argv);
|
|
int menu_add_func (client * c, int argc, char **argv);
|
|
int menu_del_func (client * c, int argc, char **argv);
|
|
int menu_set_func (client * c, int argc, char **argv);
|
|
int menu_add_item_func (client * c, int argc, char **argv);
|
|
int menu_del_item_func (client * c, int argc, char **argv);
|
|
int menu_set_item_func (client * c, int argc, char **argv);
|
|
int backlight_func (client * c, int argc, char **argv);
|
|
int output_func (client * c, int argc, char **argv);
|
|
int noop_func (client * c, int argc, char **argv);
|
|
|
|
extern client_function commands[];
|
|
|
|
#endif
|