BrlAPI: brlapi.h File Reference

BrlAPI 1.0

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
brlapi.h File Reference

Types, defines and functions prototypes for BrlAPI's library. More...

`#include <sys/types.h>`
`#include <stdint.h>`
`#include <unistd.h>`
`#include <inttypes.h>`
`#include <wchar.h>`
`#include "brlapi_keycodes.h"`

Go to the source code of this file.

## Data Structures
struct | brlapi_connectionSettings_t
| Settings structure for BrlAPI connection. More...
struct | brlapi_writeArguments_t
struct | brlapi_expandedKeyCode_t
struct | brlapi_describedKeyCode_t
struct | brlapi_range_t
struct | brlapi_error_t
struct | brlapi_writeStruct

## Macros
#define | BRLAPI_RELEASE "0.6.4"
#define | BRLAPI_MAJOR 0
#define | BRLAPI_MINOR 6
#define | BRLAPI_REVISION 4
#define | BRLAPI_STDCALL
#define | BRLAPI_SOCKETPORTNUM 4101
#define | BRLAPI_SOCKETPORT "4101"
#define | BRLAPI_SOCKETPATH "/var/lib/BrlAPI"
#define | BRLAPI_ETCDIR "/etc"
#define | BRLAPI_AUTHKEYFILE "brlapi.key"
#define | BRLAPI_DEFAUTH BRLAPI_ETCDIR "/" BRLAPI_AUTHKEYFILE
#define | BRLAPI_SETTINGS_INITIALIZER { NULL, NULL }
#define | BRLAPI_MAXNAMELENGTH 31
#define | BRLAPI_TTY_DEFAULT -1
#define | BRLAPI_DISPLAY_DEFAULT -1
#define | BRLAPI_CURSOR_LEAVE -1
#define | BRLAPI_CURSOR_OFF 0
#define | BRLAPI_WRITEARGUMENTS_INITIALIZER
#define | BRLAPI_UC_ROW 0x2800UL
#define | brlapi_ignoreAllKeys() brlapi_ignoreKeys(brlapi_rangeType_all, NULL, 0)
#define | brlapi__ignoreAllKeys(handle) brlapi__ignoreKeys(handle, brlapi_rangeType_all, NULL, 0)
#define | brlapi_acceptAllKeys() brlapi_acceptKeys(brlapi_rangeType_all, NULL, 0)
#define | brlapi__acceptAllKeys(handle) brlapi__acceptKeys(handle, brlapi_rangeType_all, NULL, 0)
#define | BRLAPI_ERROR_SUCCESS 0
#define | BRLAPI_ERROR_NOMEM 1
#define | BRLAPI_ERROR_TTYBUSY 2
#define | BRLAPI_ERROR_DEVICEBUSY 3
#define | BRLAPI_ERROR_UNKNOWN_INSTRUCTION 4
#define | BRLAPI_ERROR_ILLEGAL_INSTRUCTION 5
#define | BRLAPI_ERROR_INVALID_PARAMETER 6
#define | BRLAPI_ERROR_INVALID_PACKET 7
#define | BRLAPI_ERROR_CONNREFUSED 8
#define | BRLAPI_ERROR_OPNOTSUPP 9
#define | BRLAPI_ERROR_GAIERR 10
#define | BRLAPI_ERROR_LIBCERR 11
#define | BRLAPI_ERROR_UNKNOWNTTY 12
#define | BRLAPI_ERROR_PROTOCOL_VERSION 13
#define | BRLAPI_ERROR_EOF 14
#define | BRLAPI_ERROR_EMPTYKEY 15
#define | BRLAPI_ERROR_DRIVERERROR 16
#define | BRLAPI_ERROR_AUTHENTICATION 17
#define | brlapi_error (*brlapi_error_location())
#define | brlapi_errno (brlapi_error.brlerrno)
#define | brlapi_libcerrno (brlapi_error.libcerrno)
#define | brlapi_gaierrno (brlapi_error.gaierrno)
#define | brlapi_errfun (brlapi_error.errfun)
#define | brlapi_settings_t brlapi_connectionSettings_t
#define | BRLAPI_WRITESTRUCT_INITIALIZER BRLAPI_WRITEARGUMENTS_INITIALIZER
#define | brl_keycode_t brlapi_keyCode_t
#define | brl_type_t brlapi_packetType_t
#define | BRLCOMMANDS NULL
#define | BRL_KEYCODE_MAX BRLAPI_KEY_MAX
#define | brlapi_initializeConnection brlapi_openConnection
#define | brlapi_getTty brlapi_enterTtyMode
#define | brlapi_getTtyPath brlapi_enterTtyModeWithPath
#define | brlapi_leaveTty brlapi_leaveTtyMode
#define | brlapi_unignoreKeyRange brlapi_acceptKeyRange
#define | brlapi_unignoreKeySet brlapi_acceptKeySet
#define | brlapi_getRaw brlapi_enterRawMode
#define | brlapi_leaveRaw brlapi_leaveRawMode
#define | brlapi_suspend brlapi_suspendDriver
#define | brlapi_resume brlapi_resumeDriver
#define | BRLERR_SUCCESS BRLAPI_ERROR_SUCCESS
#define | BRLERR_NOMEM BRLAPI_ERROR_NOMEM
#define | BRLERR_TTYBUSY BRLAPI_ERROR_TTYBUSY
#define | BRLERR_DEVICEBUSY BRLAPI_ERROR_DEVICEBUSY
#define | BRLERR_UNKNOWN_INSTRUCTION BRLAPI_ERROR_UNKNOWN_INSTRUCTION
#define | BRLERR_ILLEGAL_INSTRUCTION BRLAPI_ERROR_ILLEGAL_INSTRUCTION
#define | BRLERR_INVALID_PARAMETER BRLAPI_ERROR_INVALID_PARAMETER
#define | BRLERR_INVALID_PACKET BRLAPI_ERROR_INVALID_PACKET
#define | BRLERR_CONNREFUSED BRLAPI_ERROR_CONNREFUSED
#define | BRLERR_OPNOTSUPP BRLAPI_ERROR_OPNOTSUPP
#define | BRLERR_GAIERR BRLAPI_ERROR_GAIERR
#define | BRLERR_LIBCERR BRLAPI_ERROR_LIBCERR
#define | BRLERR_UNKNOWNTTY BRLAPI_ERROR_UNKNOWNTTY
#define | BRLERR_PROTOCOL_VERSION BRLAPI_ERROR_PROTOCOL_VERSION
#define | BRLERR_EOF BRLAPI_ERROR_EOF
#define | BRLERR_EMPTYKEY BRLAPI_ERROR_EMPTYKEY
#define | BRLERR_DRIVERERROR BRLAPI_ERROR_DRIVERERROR

## Typedefs
typedef struct brlapi_handle_t | brlapi_handle_t
typedef int | brlapi_fileDescriptor
typedef uint32_t | brlapi_packetType_t
typedef void(BRLAPI_STDCALL * | brlapi_exceptionHandler_t )(int error, brlapi_packetType_t type, const void *packet, size_t size)
typedef void(BRLAPI_STDCALL * | brlapi__exceptionHandler_t )(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size)

## Enumerations
enum | brlapi_rangeType_t { brlapi_rangeType_all, brlapi_rangeType_type, brlapi_rangeType_command, brlapi_rangeType_key, brlapi_rangeType_code }

## Functions
size_t BRLAPI_STDCALL | brlapi_getHandleSize (void)
brlapi_fileDescriptor BRLAPI_STDCALL | brlapi_openConnection (const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings)
brlapi_fileDescriptor BRLAPI_STDCALL | brlapi__openConnection (brlapi_handle_t *handle, const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings)
void BRLAPI_STDCALL | brlapi_closeConnection (void)
void BRLAPI_STDCALL | brlapi__closeConnection (brlapi_handle_t *handle)
int BRLAPI_STDCALL | brlapi_getDriverName (char *buffer, size_t size)
int BRLAPI_STDCALL | brlapi__getDriverName (brlapi_handle_t *handle, char *buffer, size_t size)
int BRLAPI_STDCALL | brlapi_getDisplaySize (unsigned int *x, unsigned int *y)
int BRLAPI_STDCALL | brlapi__getDisplaySize (brlapi_handle_t *handle, unsigned int *x, unsigned int *y)
int BRLAPI_STDCALL | brlapi_enterTtyMode (int tty, const char *driver)
int BRLAPI_STDCALL | brlapi__enterTtyMode (brlapi_handle_t *handle, int tty, const char *driver)
int BRLAPI_STDCALL | brlapi_enterTtyModeWithPath (int *ttys, int count, const char *driver)
int BRLAPI_STDCALL | brlapi__enterTtyModeWithPath (brlapi_handle_t *handle, int *ttys, int count, const char *driver)
int BRLAPI_STDCALL | brlapi_leaveTtyMode (void)
int BRLAPI_STDCALL | brlapi__leaveTtyMode (brlapi_handle_t *handle)
int BRLAPI_STDCALL | brlapi_setFocus (int tty)
int BRLAPI_STDCALL | brlapi__setFocus (brlapi_handle_t *handle, int tty)
int BRLAPI_STDCALL | brlapi_writeText (int cursor, const char *text)
int BRLAPI_STDCALL | brlapi__writeText (brlapi_handle_t *handle, int cursor, const char *text)
int BRLAPI_STDCALL | brlapi_writeWText (int cursor, const wchar_t *text)
int BRLAPI_STDCALL | brlapi__writeWText (brlapi_handle_t *handle, int cursor, const wchar_t *text)
int BRLAPI_STDCALL | brlapi_writeDots (const unsigned char *dots)
int BRLAPI_STDCALL | brlapi__writeDots (brlapi_handle_t *handle, const unsigned char *dots)
int BRLAPI_STDCALL | brlapi_write (const brlapi_writeArguments_t *arguments)
int BRLAPI_STDCALL | brlapi__write (brlapi_handle_t *handle, const brlapi_writeArguments_t *arguments)
int BRLAPI_STDCALL | brlapi_expandKeyCode (brlapi_keyCode_t code, brlapi_expandedKeyCode_t *expansion)
int BRLAPI_STDCALL | brlapi_describeKeyCode (brlapi_keyCode_t code, brlapi_describedKeyCode_t *description)
int BRLAPI_STDCALL | brlapi_readKey (int wait, brlapi_keyCode_t *code)
int BRLAPI_STDCALL | brlapi__readKey (brlapi_handle_t *handle, int wait, brlapi_keyCode_t *code)
int BRLAPI_STDCALL | brlapi_ignoreKeys (brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)
int BRLAPI_STDCALL | brlapi__ignoreKeys (brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)
int BRLAPI_STDCALL | brlapi_acceptKeys (brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)
int BRLAPI_STDCALL | brlapi__acceptKeys (brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)
int BRLAPI_STDCALL | brlapi__ignoreAllKeys (brlapi_handle_t *handle)
int BRLAPI_STDCALL | brlapi__acceptAllKeys (brlapi_handle_t *handle)
int BRLAPI_STDCALL | brlapi_ignoreKeyRanges (brlapi_range_t ranges[], unsigned int count)
int BRLAPI_STDCALL | brlapi__ignoreKeyRanges (brlapi_handle_t *handle, brlapi_range_t ranges[], unsigned int count)
int BRLAPI_STDCALL | brlapi_acceptKeyRanges (brlapi_range_t ranges[], unsigned int count)
int BRLAPI_STDCALL | brlapi__acceptKeyRanges (brlapi_handle_t *handle, brlapi_range_t ranges[], unsigned int count)
int BRLAPI_STDCALL | brlapi_enterRawMode (const char *driver)
int BRLAPI_STDCALL | brlapi__enterRawMode (brlapi_handle_t *handle, const char *driver)
int BRLAPI_STDCALL | brlapi_leaveRawMode (void)
int BRLAPI_STDCALL | brlapi__leaveRawMode (brlapi_handle_t *handle)
ssize_t BRLAPI_STDCALL | brlapi_sendRaw (const void *buffer, size_t size)
ssize_t BRLAPI_STDCALL | brlapi__sendRaw (brlapi_handle_t *handle, const void *buffer, size_t size)
ssize_t BRLAPI_STDCALL | brlapi_recvRaw (void *buffer, size_t size)
ssize_t BRLAPI_STDCALL | brlapi__recvRaw (brlapi_handle_t *handle, void *buffer, size_t size)
int BRLAPI_STDCALL | brlapi_suspendDriver (const char *driver)
int BRLAPI_STDCALL | brlapi__suspendDriver (brlapi_handle_t *handle, const char *driver)
int BRLAPI_STDCALL | brlapi_resumeDriver (void)
int BRLAPI_STDCALL | brlapi__resumeDriver (brlapi_handle_t *handle)
void BRLAPI_STDCALL | brlapi_perror (const char *s)
brlapi_error_t *BRLAPI_STDCALL | brlapi_error_location (void)
const char *BRLAPI_STDCALL | brlapi_strerror (const brlapi_error_t *error)
const char *BRLAPI_STDCALL | brlapi_getPacketTypeName (brlapi_packetType_t type)
int BRLAPI_STDCALL | brlapi_strexception (char *buffer, size_t bufferSize, int error, brlapi_packetType_t type, const void *packet, size_t packetSize)
int BRLAPI_STDCALL | brlapi__strexception (brlapi_handle_t *handle, char *buffer, size_t bufferSize, int error, brlapi_packetType_t type, const void *packet, size_t packetSize)
brlapi_exceptionHandler_t BRLAPI_STDCALL | brlapi_setExceptionHandler (brlapi_exceptionHandler_t handler)
brlapi__exceptionHandler_t BRLAPI_STDCALL | brlapi__setExceptionHandler (brlapi_handle_t *handle, brlapi__exceptionHandler_t handler)
void BRLAPI_STDCALL | brlapi_defaultExceptionHandler (int error, brlapi_packetType_t type, const void *packet, size_t size)
void BRLAPI_STDCALL | brlapi__defaultExceptionHandler (brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size)

## Variables
const char * | brlapi_errlist []
const int | brlapi_nerr
brlapi_error_t | brlapi_error
int | brlapi_errno
int | brlapi_libcerrno
int | brlapi_gaierrno
const char * | brlapi_errfun

## Macro Definition Documentation

#define BRLAPI_STDCALL