xmlint.c File Reference

Hifidelio XML interface access. More...

#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <rfb/rfb.h>
#include "xmlint.h"

Include dependency graph for xmlint.c:


Defines

#define XML_INT_PORT   50000
#define XML_INT_KEYPRESS   "<KeyPress key=\"%i\" mod=\"%i\" state=\"%i\" />"

Functions

static int xmlint_open_socket ()
int xmlint_send_key_press (int keycode, int modifier, int down)
void xmlint_cleanup ()

Variables

static int fd_xml_sock = -1

Detailed Description

Creates a socket connection to the XML interface and sends commands there.

Define Documentation

#define XML_INT_PORT   50000

Local port of the XML interface.

#define XML_INT_KEYPRESS   "<KeyPress key=\"%i\" mod=\"%i\" state=\"%i\" />"

XML command that simulates a key press.


Function Documentation

static int xmlint_open_socket (  )  [static]

Opens a connection to the XML interface (Port 50000, localhost).

Returns:
a valid file descriptor or -1 if an error occured.

int xmlint_send_key_press ( int  keycode,
int  modifier,
int  down 
)

Prepares and sends a <KeyPress> event with the given arguments.

Parameters:
keycode keyboard scancode
modifier keyboard modifier
down key state flag; 1 : pressed, 0 : released
Returns:
0 on success or -1 if an error occured

void xmlint_cleanup (  ) 

XML interface cleanup.

Module functions.

Closes an open socket to the XML interface.


Variable Documentation

int fd_xml_sock = -1 [static]

File descriptor of the socket connection to the XML interface.


Generated on Mon Mar 29 01:39:34 2010 for Veronica by  doxygen 1.5.8