Data Structures | |
struct | brlapi_settings_t |
Settings structure for BrlAPI connection. More... | |
Defines | |
#define | BRLAPI_SOCKETPORT "35751" |
#define | BRLAPI_ETCDIR "/etc" |
#define | BRLAPI_AUTHFILE "brlapi.key" |
#define | BRLAPI_AUTHNAME BRLAPI_ETCDIR "/" BRLAPI_AUTHFILE |
Functions | |
int | brlapi_initializeConnection (const brlapi_settings_t *clientSettings, brlapi_settings_t *usedSettings) |
void | brlapi_closeConnection (void) |
int | brlapi_loadAuthKey (const char *filename, int *authlength, void *auth) |
int | brlapi_getControllingTty (void) |
|
Default name of the file containing BrlAPI 's authentication key This name is relative to BRLAPI_ETCDIR |
|
Final path for default authentication key file |
|
brltty 's settings directory This is where authentication key and driver-dependent key names are found for instance. |
|
Default port number on which connections to BrlAPI can be established |
|
Cleanly close the socket This function locks until a closing acknowledgement is received from the server. The socket is then freed, so the file descriptor brlapi_initializeConnection() gave has no meaning any more |
|
Return the number of the caller's controlling terminal BrlAPI needs to know on which VT the application is connected. This function tries to find it out. It first looks for the CONTROLTTY environment variable, then tries to get it from /proc/self/stat Hence people has to modify their xinitrc & xsession so that CONTROLTTY is set to 7 for instance, if the X server is launched on VT 7. The value can be got by grepping "using VT number [0-9]*" from X's log. I personnaly have CONTROLVT="$(grep "using VT number" "/var/log/XFree86.$(echo "$DISPLAY" | sed -e "s/^.*::*\([0-9]*\).*$/\1/").log" | sed -e "s/^.*using VT number \([0-9]*\).*$/\1/")" export CONTROLVT in my .xsession People also have to set CONTROLTTY when working remotely (as well as BRLAPI_HOSTNAME)
|
|
open a socket and connect it to BrlAPI 's server This function first loads an authentication key as specified in settings. It then creates a TCP socket and connects it to the specified machine, on the specified port. It writes the authentication key on the socket and waits for acknowledgement.
|
|
Load an authentication key from the given file Calling this function shouldn't be needed if brlapi_initializeConnection is used.
|