Update comments for server commands to doxygen style
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/* \file server/commands/client_commands.c
|
/** \file server/commands/client_commands.c
|
||||||
* Defines handlers for general client commands.
|
* Implements handlers for general client commands.
|
||||||
*
|
*
|
||||||
* This contains definitions for all the functions which clients can run.
|
* This contains definitions for all the functions which clients can run.
|
||||||
* The functions here are to be called only from parse.c's interpreter.
|
* The functions here are to be called only from parse.c's interpreter.
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************
|
/**
|
||||||
* Debugging only.. prints out a list of arguments it receives
|
* Debugging only.. prints out a list of arguments it receives
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
@@ -48,18 +48,18 @@ test_func_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************
|
/**
|
||||||
* The client must say "hello" before doing anything else.
|
* The client must say "hello" before doing anything else.
|
||||||
*
|
*
|
||||||
* It returns a string of info about the server to the client
|
* It sends back a string of info about the server to the client.
|
||||||
*
|
*
|
||||||
* Usage: hello
|
* Usage: hello
|
||||||
|
*
|
||||||
|
* \todo Give \em real info about the server/lcd
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
hello_func(Client *c, int argc, char **argv)
|
hello_func(Client *c, int argc, char **argv)
|
||||||
{
|
{
|
||||||
/* TODO: Give *real* info about the server/lcd...*/
|
|
||||||
|
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
sock_send_error(c->sock, "extra parameters ignored\n");
|
sock_send_error(c->sock, "extra parameters ignored\n");
|
||||||
}
|
}
|
||||||
@@ -77,10 +77,10 @@ hello_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/**
|
||||||
* The client should say "bye" before disconnecting
|
* The client should say "bye" before disconnecting
|
||||||
*
|
*
|
||||||
* The function does not respond to the client: it simply cuts connection
|
* The function does not respond to the client: it simply cuts connection.
|
||||||
*
|
*
|
||||||
* Usage: bye
|
* Usage: bye
|
||||||
*/
|
*/
|
||||||
@@ -96,10 +96,10 @@ bye_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************
|
/**
|
||||||
* sets info about the client, such as its name
|
* Sets info about the client, such as its name
|
||||||
*
|
*
|
||||||
* Usage: client_set -name <id>
|
* Usage: client_set -name \<id\>
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
client_set_func(Client *c, int argc, char **argv)
|
client_set_func(Client *c, int argc, char **argv)
|
||||||
@@ -152,11 +152,11 @@ client_set_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************
|
/**
|
||||||
* Tells the server the client would like to accept keypresses
|
* Tells the server the client would like to accept keypresses
|
||||||
* of a particular type
|
* of a particular type
|
||||||
*
|
*
|
||||||
* Usage: client_add_key [-exclusively|-shared] {<key>}+
|
* Usage: client_add_key [-exclusively|-shared] {\<key\>}+
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
client_add_key_func(Client *c, int argc, char **argv)
|
client_add_key_func(Client *c, int argc, char **argv)
|
||||||
@@ -195,11 +195,11 @@ client_add_key_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/**
|
||||||
* Tells the server the client would NOT like to accept keypresses
|
* Tells the server the client would NOT like to accept keypresses
|
||||||
* of a particular type
|
* of a particular type
|
||||||
*
|
*
|
||||||
* Usage: client_del_key {<key>}+
|
* Usage: client_del_key {\<key\>}+
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
client_del_key_func(Client *c, int argc, char **argv)
|
client_del_key_func(Client *c, int argc, char **argv)
|
||||||
@@ -222,7 +222,7 @@ client_del_key_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/**
|
||||||
* Toggles the backlight, if enabled.
|
* Toggles the backlight, if enabled.
|
||||||
*
|
*
|
||||||
* Usage: backlight {on|off|toggle|blink|flash}
|
* Usage: backlight {on|off|toggle|blink|flash}
|
||||||
@@ -268,8 +268,8 @@ backlight_func(Client *c, int argc, char **argv)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/**
|
||||||
* info_func
|
* Sends back information about the loaded drivers.
|
||||||
*
|
*
|
||||||
* Usage: info
|
* Usage: info
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
/* \file server/commands/client_commands.h
|
/** \file server/commands/client_commands.h */
|
||||||
* Declares handlers for general client commands.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* This file is part of LCDd, the lcdproc server.
|
/* This file is part of LCDd, the lcdproc server.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
/* \file server/commands/command_list.c
|
/** \file server/commands/command_list.c
|
||||||
* Defines the dispatcher for handlers dealing with the client commands.
|
* Implements the dispatcher for handlers dealing with the client commands.
|
||||||
*
|
*
|
||||||
* This contains definitions for all the functions which clients can run.
|
* This contains definitions for all the functions which clients can run.
|
||||||
* The functions here are to be called only from parse.c's interpreter.
|
* The functions here are to be called only from parse.c's interpreter.
|
||||||
*
|
|
||||||
* The client's available function set is defined here, as is the syntax
|
|
||||||
* for each command. <-- TODO !
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* This file is part of LCDd, the lcdproc server.
|
/* This file is part of LCDd, the lcdproc server.
|
||||||
@@ -56,7 +53,11 @@ static client_function commands[] = {
|
|||||||
{ NULL, NULL},
|
{ NULL, NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Looks up a function for a command sent by the client.
|
||||||
|
* \param cmd Command to look up as string.
|
||||||
|
* \return Pointer to the implementing function.
|
||||||
|
*/
|
||||||
CommandFunc get_command_function(char *cmd)
|
CommandFunc get_command_function(char *cmd)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* \file server/commands/command_list.h
|
/** \file server/commands/command_list.h
|
||||||
* Declares client command dispatcher function.
|
* Declares client command dispatcher function.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -15,16 +15,16 @@
|
|||||||
|
|
||||||
#include "../client.h"
|
#include "../client.h"
|
||||||
|
|
||||||
/*
|
/**
|
||||||
The function list for clients is stored in a table, and the items each
|
* The function list for clients is stored in a table, and the items each
|
||||||
point to a function to call, defined below.
|
* point to a function to call, defined below.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef int (*CommandFunc) (Client *c, int argc, char **argv);
|
typedef int (*CommandFunc) (Client *c, int argc, char **argv);
|
||||||
|
|
||||||
|
/** Defines an entry in the command table */
|
||||||
typedef struct client_function {
|
typedef struct client_function {
|
||||||
char *keyword;
|
char *keyword; /**< Command string in the protocol */
|
||||||
CommandFunc function;
|
CommandFunc function; /**< Pointer to the associated function */
|
||||||
} client_function;
|
} client_function;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* \file server/commands/menu_commands.c
|
/** \file server/commands/menu_commands.c
|
||||||
* Defines handlers for client commands concerning menus.
|
* Implements handlers for client commands concerning menus.
|
||||||
*
|
*
|
||||||
* This contains definitions for all the functions which clients can run.
|
* This contains definitions for all the functions which clients can run.
|
||||||
* The functions here are to be called only from parse.c's interpreter.
|
* The functions here are to be called only from parse.c's interpreter.
|
||||||
@@ -63,14 +63,14 @@ static char *argv2string(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/**
|
||||||
* menu_add_item_func
|
* Adds an item to a menu.
|
||||||
*
|
*
|
||||||
* Adds an item to a menu
|
* Usage: menu_add_item \<menuid\> \<newitemid\> \<type\> [\<text\>]
|
||||||
*
|
*
|
||||||
* Usage: menu_add_item <menuid> <newitemid> <type> [<text>]
|
|
||||||
* You should use "" as id for the client's main menu. This menu will be
|
* You should use "" as id for the client's main menu. This menu will be
|
||||||
* created automatically when you add an item to it the first time.
|
* created automatically when you add an item to it the first time.
|
||||||
|
*
|
||||||
* You (currently?) cannot create a menu in the main level yourself.
|
* You (currently?) cannot create a menu in the main level yourself.
|
||||||
* The names you use for items should be unique for your client.
|
* The names you use for items should be unique for your client.
|
||||||
* The text is the visible text for the item.
|
* The text is the visible text for the item.
|
||||||
@@ -220,12 +220,11 @@ menu_add_item_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/**
|
||||||
* menu_del_item_func
|
|
||||||
*
|
|
||||||
* Deletes an item from a menu
|
* Deletes an item from a menu
|
||||||
*
|
*
|
||||||
* Usage: menu_del_item <menuid> <itemid>
|
* Usage: menu_del_item \<menuid\> \<itemid\>
|
||||||
|
*
|
||||||
* The given item in the given menu will be deleted. If you have deleted all
|
* The given item in the given menu will be deleted. If you have deleted all
|
||||||
* the items from your client menu, that menu will automatically be removed.
|
* the items from your client menu, that menu will automatically be removed.
|
||||||
*/
|
*/
|
||||||
@@ -285,89 +284,89 @@ menu_del_item_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**
|
||||||
* menu_set_item_func
|
* Sets the info about a menu item.
|
||||||
* Sets the info about a menu item
|
|
||||||
*
|
*
|
||||||
* For example, text displayed, value, etc...
|
* For example, text displayed, value, etc...
|
||||||
*
|
*
|
||||||
* Usage: menu_set_item <menuid> <itemid> {<option>}+
|
* Usage: menu_set_item \<menuid\> \<itemid\> {\<option\>}+
|
||||||
|
*
|
||||||
* The following parameters can be set per item:
|
* The following parameters can be set per item:
|
||||||
* (you should include the - in the option)
|
* (you should include the - in the option)
|
||||||
*
|
*
|
||||||
* For all types:
|
* For all types:
|
||||||
* -text "text" ("")
|
* \li -text "text" ("")
|
||||||
* Sets the visible text.
|
* Sets the visible text.
|
||||||
* -is_hidden false|true (false)
|
* \li -is_hidden false|true (false)
|
||||||
* If the item currently should not appear in a menu.
|
* If the item currently should not appear in a menu.
|
||||||
* -prev id ()
|
* \li -prev id ()
|
||||||
* Sets the predecessor of this item (what happens after "Escape")
|
* Sets the predecessor of this item (what happens after "Escape")
|
||||||
*
|
*
|
||||||
* For all except menus:
|
* For all except menus:
|
||||||
* -next id ()
|
* \li -next id ()
|
||||||
* Sets the successor of this item (what happens after "Enter")
|
* Sets the successor of this item (what happens after "Enter")
|
||||||
*
|
*
|
||||||
* action:
|
* action:
|
||||||
* -menu_result none|close|quit (none)
|
* \li -menu_result none|close|quit (none)
|
||||||
* Sets what to do with the menu when this action is selected:
|
* Sets what to do with the menu when this action is selected:
|
||||||
* - none: the menu stays as it is.
|
* - none: the menu stays as it is.
|
||||||
* - close: the menu closes and returns to a higher level.
|
* - close: the menu closes and returns to a higher level.
|
||||||
* - quit: quits the menu completely so you can foreground your app.
|
* - quit: quits the menu completely so you can foreground your app.
|
||||||
*
|
*
|
||||||
* checkbox:
|
* checkbox:
|
||||||
* -value off|on|gray (off)
|
* \li -value off|on|gray (off)
|
||||||
* Sets its current value.
|
* Sets its current value.
|
||||||
* -allow_gray false|true (false)
|
* \li -allow_gray false|true (false)
|
||||||
* Sets if a grayed checkbox is allowed.
|
* Sets if a grayed checkbox is allowed.
|
||||||
*
|
*
|
||||||
* ring:
|
* ring:
|
||||||
* -value <int> (0)
|
* \li -value \<int\> (0)
|
||||||
* Sets the index in the stringlist that is currently selected.
|
* Sets the index in the stringlist that is currently selected.
|
||||||
* -strings <string> (empty)
|
* \li -strings \<string\> (empty)
|
||||||
* The subsequent strings that can be selected. They should be
|
* The subsequent strings that can be selected. They should be
|
||||||
* tab-separated in ONE string.
|
* tab-separated in ONE string.
|
||||||
*
|
*
|
||||||
* slider:
|
* slider:
|
||||||
* -value <int> (0)
|
* \li -value \<int\> (0)
|
||||||
* Sets its current value.
|
* Sets its current value.
|
||||||
* -mintext <string> ("")
|
* \li -mintext \<string\> ("")
|
||||||
* -maxtex <string> ("")
|
* \li -maxtex \<string\> ("")
|
||||||
* Text at the minimal and maximal side. On small displays these might
|
* Text at the minimal and maximal side. On small displays these might
|
||||||
* not be displayed.
|
* not be displayed.
|
||||||
* -minvalue <int> (0)
|
* \li -minvalue \<int\> (0)
|
||||||
* -maxvalue <int> (100)
|
* \li -maxvalue \<int\> (100)
|
||||||
* The minimum and maximum value of the slider.
|
* The minimum and maximum value of the slider.
|
||||||
* -stepsize <int> (1)
|
* \li -stepsize \<int\> (1)
|
||||||
* The stepsize of the slider. If you use 0, you can control it yourself
|
* The stepsize of the slider. If you use 0, you can control it yourself
|
||||||
* completely.
|
* completely.
|
||||||
*
|
*
|
||||||
* numeric:
|
* numeric:
|
||||||
* -value <int> (0)
|
* \li -value \<int\> (0)
|
||||||
* Sets its current value.
|
* Sets its current value.
|
||||||
* -minvalue <int> (0)
|
* \li -minvalue \<int\> (0)
|
||||||
* -maxvalue <int> (100)
|
* \li -maxvalue \<int\> (100)
|
||||||
* The minimum and maximum value that are allowed. If you make one of
|
* The minimum and maximum value that are allowed. If you make one of
|
||||||
* them negative, the user will be able to enter negative numbers too.
|
* them negative, the user will be able to enter negative numbers too.
|
||||||
* Maybe floats will work too in the future.
|
* Maybe floats will work too in the future.
|
||||||
*
|
*
|
||||||
* alpha:
|
* alpha:
|
||||||
* -value <string>
|
* \li -value \<string\>
|
||||||
* Sets its current value. ("")
|
* Sets its current value. ("")
|
||||||
* -password_char <char> (none)
|
* \li -password_char \<char\> (none)
|
||||||
* -minlength <int> (0)
|
* \li -minlength \<int\> (0)
|
||||||
* -maxlength <int> (10)
|
* \li -maxlength \<int\> (10)
|
||||||
* Set the minimum and maximum allowed length.
|
* Set the minimum and maximum allowed length.
|
||||||
* -allow_caps false|true (true)
|
* \li -allow_caps false|true (true)
|
||||||
* -allow_noncaps false|true (false)
|
* \li -allow_noncaps false|true (false)
|
||||||
* -allow_numbers false|true (true)
|
* \li -allow_numbers false|true (true)
|
||||||
* Allows these groups of characters.
|
* Allows these groups of characters.
|
||||||
* -allowed_extra <string> ("")
|
* \li -allowed_extra \<string\> ("")
|
||||||
* The chars in this string are also allowed.
|
* The chars in this string are also allowed.
|
||||||
*
|
*
|
||||||
* ip:
|
* ip:
|
||||||
* -value <string>
|
* \li -value \<string\>
|
||||||
* Sets its current value. ("")
|
* Sets its current value. ("")
|
||||||
* -v6 false|true
|
* \li -v6 false|true
|
||||||
*
|
*
|
||||||
* Hmm, this is getting very big. We might need a some real parser after all.
|
* Hmm, this is getting very big. We might need a some real parser after all.
|
||||||
*/
|
*/
|
||||||
@@ -714,13 +713,15 @@ menu_set_item_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************
|
/**
|
||||||
* Requests the menu system to display the given menu screen. Depending on
|
* Requests the menu system to display the given menu screen.
|
||||||
|
*
|
||||||
|
* Depending on
|
||||||
* the setting of the LCDPROC_PERMISSIVE_MENU_GOTO it is impossible
|
* the setting of the LCDPROC_PERMISSIVE_MENU_GOTO it is impossible
|
||||||
* to go to a menu of another client (or the server menus). Same
|
* to go to a menu of another client (or the server menus). Same
|
||||||
* restriction applies to the optional predecessor_id
|
* restriction applies to the optional predecessor_id
|
||||||
*
|
*
|
||||||
* Usage: menu_goto <id> [<predecessor_id>]
|
* Usage: menu_goto \<id\> [\<predecessor_id\>]
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
menu_goto_func(Client * c, int argc, char **argv)
|
menu_goto_func(Client * c, int argc, char **argv)
|
||||||
@@ -759,10 +760,10 @@ menu_goto_func(Client * c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the predecessor of a Menuitem item to itemid (for wizzards)
|
/** Sets the predecessor of a Menuitem item to itemid (for wizzards).
|
||||||
* i.e. the menuitem to go to after hitting "Enter" on item.
|
* For example the menuitem to go to after hitting "Enter" on item.
|
||||||
*
|
*
|
||||||
* @return 0 on success and -1 otherwise
|
* \return 0 on success and -1 otherwise
|
||||||
*/
|
*/
|
||||||
int set_predecessor(MenuItem *item, char *itemid, Client *c)
|
int set_predecessor(MenuItem *item, char *itemid, Client *c)
|
||||||
{
|
{
|
||||||
@@ -793,13 +794,13 @@ int set_predecessor(MenuItem *item, char *itemid, Client *c)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the successor of a Menuitem item to itemid (for wizzards) i.e. the
|
/** Sets the successor of a Menuitem item to itemid (for wizzards). For example the
|
||||||
* menuitem to go to after hitting "Enter" on item. Checks that a matching
|
* menuitem to go to after hitting "Enter" on item. Checks that a matching
|
||||||
* menu item can be found. Checks if item is not a menu. (If you would
|
* menu item can be found. Checks if item is not a menu. (If you would
|
||||||
* redefine the meaning of "Enter" for a menu it would not be useful
|
* redefine the meaning of "Enter" for a menu it would not be useful
|
||||||
* anymore.)
|
* anymore.)
|
||||||
*
|
*
|
||||||
* @return 0 on success and -1 otherwise
|
* \return 0 on success and -1 otherwise
|
||||||
*/
|
*/
|
||||||
int set_successor(MenuItem *item, char *itemid, Client *c)
|
int set_successor(MenuItem *item, char *itemid, Client *c)
|
||||||
{
|
{
|
||||||
@@ -836,10 +837,10 @@ int set_successor(MenuItem *item, char *itemid, Client *c)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************
|
/**
|
||||||
* Requests the menu system to set the entry point into the menu system.
|
* Requests the menu system to set the entry point into the menu system.
|
||||||
*
|
*
|
||||||
* Usage: menu_set_main <id>
|
* Usage: menu_set_main \<id\>
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
menu_set_main_func(Client *c, int argc, char **argv)
|
menu_set_main_func(Client *c, int argc, char **argv)
|
||||||
@@ -882,7 +883,7 @@ menu_set_main_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************
|
/**
|
||||||
* This function catches the event for the menus that have been
|
* This function catches the event for the menus that have been
|
||||||
* created on behalf of the clients. It informs the client with
|
* created on behalf of the clients. It informs the client with
|
||||||
* an event message.
|
* an event message.
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
/* \file server/commands/menu_commands.h
|
/** \file server/commands/menu_commands.h */
|
||||||
* Declares handlers for client menu commands.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* This file is part of LCDd, the lcdproc server.
|
/* This file is part of LCDd, the lcdproc server.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* \file server/commands/screens_commands.c
|
/** \file server/commands/screen_commands.c
|
||||||
* Defines handlers for the client commands concerning screens.
|
* Implements handlers for the client commands concerning screens.
|
||||||
*
|
*
|
||||||
* This contains definitions for all the functions which clients can run.
|
* This contains definitions for all the functions which clients can run.
|
||||||
* The functions here are to be called only from parse.c's interpreter.
|
* The functions here are to be called only from parse.c's interpreter.
|
||||||
@@ -31,10 +31,10 @@
|
|||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
|
||||||
/***************************************************************
|
/**
|
||||||
* Tells the server the client has another screen to offer
|
* Tells the server the client has another screen to offer
|
||||||
*
|
*
|
||||||
* Usage: screen_add <id>
|
* Usage: screen_add \<id\>
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
screen_add_func(Client *c, int argc, char **argv)
|
screen_add_func(Client *c, int argc, char **argv)
|
||||||
@@ -75,10 +75,10 @@ screen_add_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************
|
/**
|
||||||
* Client requests that the server forget about a screen
|
* The client requests that the server forget about a screen
|
||||||
*
|
*
|
||||||
* Usage: screen_del <screenid>
|
* Usage: screen_del \<screenid\>
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
screen_del_func(Client *c, int argc, char **argv)
|
screen_del_func(Client *c, int argc, char **argv)
|
||||||
@@ -119,14 +119,14 @@ screen_del_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************
|
/**
|
||||||
* Configures info about a particular screen, such as its
|
* Configures info about a particular screen, such as its
|
||||||
* name, priority, or duration
|
* name, priority, or duration
|
||||||
*
|
*
|
||||||
* Usage: screen_set <id> [-name <name>] [-wid <width>] [-hgt <height>]
|
* Usage: screen_set \<id\> [-name \<name\>] [-wid \<width\>] [-hgt \<height\>]
|
||||||
* [-priority <prio>] [-duration <int>] [-timeout <int>]
|
* [-priority \<prio\>] [-duration \<int\>] [-timeout \<int\>]
|
||||||
* [-heartbeat <type>] [-backlight <type>]
|
* [-heartbeat \<type\>] [-backlight \<type\>]
|
||||||
* [-cursor <type>] [-cursor_x <xpos>] [-cursor_y <ypos>]
|
* [-cursor \<type\>] [-cursor_x \<xpos\>] [-cursor_y \<ypos\>]
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
screen_set_func(Client *c, int argc, char **argv)
|
screen_set_func(Client *c, int argc, char **argv)
|
||||||
@@ -409,11 +409,11 @@ screen_set_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**
|
||||||
* Tells the server the client would like to accept keypresses
|
* Tells the server the client would like to accept keypresses
|
||||||
* of a particular type when the given screen is active on the display
|
* of a particular type when the given screen is active on the display
|
||||||
*
|
*
|
||||||
* Usage: screen_add_key <screenid> <keylist>
|
* Usage: screen_add_key \<screenid\> \<keylist\>
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
screen_add_key_func(Client *c, int argc, char **argv)
|
screen_add_key_func(Client *c, int argc, char **argv)
|
||||||
@@ -485,11 +485,11 @@ screen_add_key_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/**
|
||||||
* Tells the server the client would NOT like to accept keypresses
|
* Tells the server the client would NOT like to accept keypresses
|
||||||
* of a particular type when the given screen is active on the display
|
* of a particular type when the given screen is active on the display
|
||||||
*
|
*
|
||||||
* Usage: screen_del_key <screenid> <keylist>
|
* Usage: screen_del_key \<screenid\> \<keylist\>
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
screen_del_key_func(Client *c, int argc, char **argv)
|
screen_del_key_func(Client *c, int argc, char **argv)
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
/* \file server/commands/screen_commands.h
|
/** \file server/commands/screen_commands.h */
|
||||||
* Declares handlers for client screen commands.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* This file is part of LCDd, the lcdproc server.
|
/* This file is part of LCDd, the lcdproc server.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* \file server/commands/server_commands.c
|
/** \file server/commands/server_commands.c
|
||||||
* Defines handlers for client commands concerning the server settings.
|
* Implements handlers for client commands concerning the server settings.
|
||||||
*
|
*
|
||||||
* This contains definitions for all the functions which clients can run.
|
* This contains definitions for all the functions which clients can run.
|
||||||
* The functions here are to be called only from parse.c's interpreter.
|
* The functions here are to be called only from parse.c's interpreter.
|
||||||
@@ -30,14 +30,14 @@
|
|||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Sets the state of the output port (such as on MtxOrb LCDs)
|
|
||||||
*
|
|
||||||
* Usage: output <on|off|int>
|
|
||||||
*/
|
|
||||||
#define ALL_OUTPUTS_ON -1
|
#define ALL_OUTPUTS_ON -1
|
||||||
#define ALL_OUTPUTS_OFF 0
|
#define ALL_OUTPUTS_OFF 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the state of the output port (such as on MtxOrb LCDs)
|
||||||
|
*
|
||||||
|
* Usage: output \<on|off|int\>
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
output_func(Client *c, int argc, char **argv)
|
output_func(Client *c, int argc, char **argv)
|
||||||
{
|
{
|
||||||
@@ -93,10 +93,12 @@ output_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/**
|
||||||
* sleep_func
|
* The sleep_func was intended to make the server sleep for some seconds.
|
||||||
|
* This function is currently ignored as making the server sleep actually
|
||||||
|
* stalls it and disrupts other clients.
|
||||||
*
|
*
|
||||||
* Usage: sleep <seconds>
|
* Usage: sleep \<seconds\>
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
sleep_func(Client *c, int argc, char **argv)
|
sleep_func(Client *c, int argc, char **argv)
|
||||||
@@ -158,8 +160,8 @@ sleep_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/**
|
||||||
* Does nothing, returns "noop complete" message
|
* Does nothing, returns "noop complete" message.
|
||||||
*
|
*
|
||||||
* This is useful for shell scripts or programs that want to talk
|
* This is useful for shell scripts or programs that want to talk
|
||||||
* with LCDproc and not get deadlocked. Send a noop after each
|
* with LCDproc and not get deadlocked. Send a noop after each
|
||||||
@@ -174,4 +176,3 @@ noop_func(Client *c, int argc, char **argv)
|
|||||||
sock_send_string(c->sock, "noop complete\n");
|
sock_send_string(c->sock, "noop complete\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
/* \file server/commands/server_commands.h
|
/** \file server/commands/server_commands.h */
|
||||||
* Declares handlers for client commands dealing with server properties.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* This file is part of LCDd, the lcdproc server.
|
/* This file is part of LCDd, the lcdproc server.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* \file server/commands/widget_commands.c
|
/** \file server/commands/widget_commands.c
|
||||||
* Defines handlers for client commands concerning widgets.
|
* Implements handlers for client commands concerning widgets.
|
||||||
*
|
*
|
||||||
* This contains definitions for all the functions which clients can run.
|
* This contains definitions for all the functions which clients can run.
|
||||||
* The functions here are to be called only from parse.c's interpreter.
|
* The functions here are to be called only from parse.c's interpreter.
|
||||||
@@ -34,10 +34,10 @@
|
|||||||
#include "drivers.h"
|
#include "drivers.h"
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/**
|
||||||
* Adds a widget to a screen, but doesn't give it a value
|
* Adds a widget to a screen, but doesn't give it a value
|
||||||
*
|
*
|
||||||
* Usage: widget_add <screenid> <widgetid> <widgettype> [-in <id>]
|
* Usage: widget_add \<screenid\> \<widgetid\> \<widgettype\> [-in \<id\>]
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
widget_add_func(Client *c, int argc, char **argv)
|
widget_add_func(Client *c, int argc, char **argv)
|
||||||
@@ -120,10 +120,10 @@ widget_add_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************
|
/**
|
||||||
* Removes a widget from a screen, and forgets about it
|
* Removes a widget from a screen, and forgets about it
|
||||||
*
|
*
|
||||||
* Usage: widget_del <screenid> <widgetid>
|
* Usage: widget_del \<screenid\> \<widgetid\>
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
widget_del_func(Client *c, int argc, char **argv)
|
widget_del_func(Client *c, int argc, char **argv)
|
||||||
@@ -169,13 +169,11 @@ widget_del_func(Client *c, int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************
|
/**
|
||||||
* Configures information about a widget, such as its size, shape,
|
* Configures information about a widget, such as its size, shape,
|
||||||
* contents, position, speed, etc...
|
* contents, position, speed, etc.
|
||||||
*
|
*
|
||||||
* Ack! This is long!
|
* widget_set \<screenid\> \<widgetid\> \<widget-SPECIFIC-data\>
|
||||||
*
|
|
||||||
* widget_set <screenid> <widgetid> <widget-SPECIFIC-data>
|
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
widget_set_func(Client *c, int argc, char **argv)
|
widget_set_func(Client *c, int argc, char **argv)
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
/* \file server/commands/widget_commands.h
|
/** \file server/commands/widget_commands.h */
|
||||||
* Declares handlers for client widget commands.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* This file is part of LCDd, the lcdproc server.
|
/* This file is part of LCDd, the lcdproc server.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user