#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libxml/xmlreader.h>
#include <rfb/rfb.h>
#include "veronica.h"
#include "xmlutil.h"
#include "config.h"
<config> <common refresh="200" key_repeat_delay="65" auth_file="/etc/veronica.auth" /> <screen theme_dir="/opt/veronica/themes/black_coverart" show_cursor="1" vnc_port="5900" http_port="5800" name="default" /> <screen theme_dir="/opt/veronica/themes/pda_240_300" show_cursor="0" mouse_control="0" vnc_port="5901" name="pda" /> </config>
#define CONFIG_DEFAULT_FILE "/etc/veronica_conf.xml" |
Default configuration file.
#define CONFIG_DEFAULT_REFRESH 200 |
Default display refresh time (milliseconds).
#define CONFIG_DEFAULT_KEY_DELAY 65 |
Default delay between key presses in key repeat mode (milliseconds).
#define CONFIG_DEFAULT_PORT 5900 |
Default VNC port.
#define CONFIG_DEFAULT_SHOW_CURSOR 0 |
Default setting for displaying a mouse cursor on server side.
1 = show mouse cursor, 0 = no mouse cursor
#define CONFIG_DEFAULT_MOUSE_CONTROL 1 |
Default setting for mouse control within display area.
1 = mouse control, 0 = no mouse control
#define CONFIG_DEFAULT_SCREEN_NAME "Veronica" |
Default screen name.
#define CONFIG_ATTR_REFRESH "refresh" |
XML attribute for display refresh time.
#define CONFIG_ATTR_KEY_REPEAT_DELAY "key_repeat_delay" |
XML attribute for key repeat delay.
#define CONFIG_ATTR_AUTH_FILE "auth_file" |
XML attribute for authentication file.
#define CONFIG_ATTR_THEME_DIR "theme_dir" |
XML attribute for theme directroy.
#define CONFIG_ATTR_SHOW_CURSOR "show_cursor" |
XML attribute for displaying a mouse cursor on server side.
#define CONFIG_ATTR_MOUSE_CONTROL "mouse_control" |
XML attribute for mouse control within display area.
#define CONFIG_ATTR_VNC_PORT "vnc_port" |
XML attribute for vnc port (Remote Framebuffer Protocol).
#define CONFIG_ATTR_HTTP_PORT "http_port" |
XML attribute for http port (Java viewer applet).
#define CONFIG_ATTR_SCREEN_NAME "name" |
XML attribute for VNC screen name (displayed in the title bar).
#define CONFIG_ELEM_COMMON "common" |
XML element for the 'common' part of a configuration file.
#define CONFIG_ELEM_SERVER "screen" |
XML element for the 'screen' parts of a configuration file.
#define CONFIG_MIN_PORT 0 |
Minimum port number of listener port.
#define CONFIG_MAX_PORT 65535 |
Maximum port number of listener port.
static char* config_get_screen_name | ( | ) | [static] |
Provides the default name for a VNC screen (displayed in the title bar of VNC viewers.
)
static int config_xml_process_common | ( | xmlTextReaderPtr | reader, | |
struct config * | config | |||
) | [static] |
Processes the common node in a configuration XML document.
reader | the XML reader | |
config | configuration data |
static int config_xml_process_screen | ( | xmlTextReaderPtr | reader, | |
struct config * | config | |||
) | [static] |
Processes a screen node in a configuration XML document.
reader | the XML reader | |
config | configuration data |
static int config_xml_process_node | ( | xmlTextReaderPtr | reader, | |
struct config * | config | |||
) | [static] |
Processes a node in a configuration XML document.
reader | the XML reader | |
config | configuration data |
static int config_set_defaults | ( | struct config * | config | ) | [static] |
Sets the default configuration values.
config | configuration data |
static int config_check | ( | struct config * | config | ) | [static] |
Checks correctness of the configuration data.
config | configuration data |
struct config* config_load | ( | char * | config_file | ) | [read] |
Parses the data of an XML configuration file.
config_file | configuration file path |
void config_cleanup | ( | struct config * | config | ) |