Cleanup and documentation updates:

- Remove shared/str.h where not used.
- Remove shared/debug.h from all files as it has been completely replaced
  by shared/report.h (it will be removed later).
- Add more doxygen comments to shared/* and clients/lcdproc/*.
- Include static functions in doxygen output.
This commit is contained in:
mmdolze
2010-02-02 23:20:29 +00:00
parent e914ee3d72
commit 66023939a1
49 changed files with 929 additions and 590 deletions
+16 -66
View File
@@ -1,3 +1,7 @@
/** \file shared/sockets.h
* Socket functions available to server and clients.
*/
#ifndef SOCKETS_H
#define SOCKETS_H
@@ -15,81 +19,27 @@
# define SHUT_RDWR 2
#endif
/*
Socket functions available to server and clients...
(ignore the rest of the comments... I was babbling out random ideas)
This should have stuff to read/write sockets, open/close them, etc...
*/
// Client functions...
/** Connect to server on host, port */
int sock_connect (char *host, unsigned short int port);
/** Disconnect from server */
int sock_close (int fd);
// Send/receive lines of text
/** Send printf-like formatted output */
int sock_printf (int fd, const char *format, .../*args*/);
/** Send lines of text */
int sock_send_string (int fd, char *string);
// Recv gives only one line per call...
int sock_recv_string (int fd, char *dest, size_t maxlen);
// Send/receive raw data
/** Send raw data */
int sock_send (int fd, void *src, size_t size);
/** Receive a line of text */
int sock_recv_string (int fd, char *dest, size_t maxlen);
/** Receive raw data */
int sock_recv (int fd, void *dest, size_t maxlen);
/* Return error message string for the socket function */
/** Return the error message for the last error occured */
char *sock_geterror(void);
/** Send an already formatted error message to the client */
int sock_send_error(int fd, char* message);
/** Print printf-like formatted output to logfile and send it to the client */
int sock_printf_error(int fd, const char *format, .../*args*/);
// Er, ignore the rest of this file. I'll clean it up sometime...
/*****************************************************************
LCDproc command line interface?: (while running)
-command
Tells LCDproc to interpret stdin as raw commands to send through
the socket. Input must be formatted as above, in socket interface.
-function f
Runs LCDproc external function f, where f is one of the predefined
functions which can be assigned to keypad keys. (like NEXTMODE, etc)
-key x
Simulates keypad press of key 'x', where 'x' is (A-Z).
-print [time]
Prints stdin on LCD one line at a time, with no line-wrapping (raw),
with [time] frames between updates (lines).
-wrap [time]
Prints stdin as with "-print", but with line wrapping when possible.
-contrast xxx
Sets contrast to xxx (decimal)
-backlight [on/off]
Turns backlight [on/off/auto], or toggles it.
If [off], stays off.
If [on], stays on.
If [auto], LCDproc controls backlight based on load, etc...
-exit
-quit
Duh... :)
******************************************************************/
/*****************************************************************
LCDproc stuff supported in config file (loose approximation):
Grammar is tcl-style. I.e., "command arg1 arg2 ...".
Spaces are used as argument separators, *until* it thinks it has the final
argument. So, "function thing shell myprogram arg1 arg2 arg3" would be
split into "function", "thing", "shell", and "myprogram arg1 arg2 arg3".
User-definable functions (use built-in's to create new ones?):
Function mp3NextSong Shell /usr/local/bin/mp3player -next
Function MySequence Sequence cpu mem xload
Function OtherSequence Sequence time cd xload
Keypad keys can be bound to any _function_:
Key A mp3NextSong
Key B HaltSystem
Key C Menu
Key D Next/+
Key E OtherSequence
******************************************************************/
#endif