---
name: "brlapi.h"
section: "3"
platform: "linux"
package: "libbrlapi-dev"
version: "3.4.1-4"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/brlapi.h"
---

# brlapi.h(3)

types, defines and functions prototypes for BrlAPI

brlapi.h File Reference.TH "brlapi.h" 3 "28 Oct 2004" "Version 1.0" "BrlAPI"

## NAME

brlapi.h - types, defines and functions prototypes for *BrlAPI*

## SYNOPSIS

`#include <inttypes.h>`\
 `#include <unistd.h>`\
 `#include <pthread.h>`\

### Data Structures

struct **brlapi\_settings\_t**\
 *Settings structure for BrlAPI connection.*  struct **brlapi\_keybinding\_t**\
 *Key binding structure.*

### Defines

\#define **BRLAPI\_SOCKETPORT**   '35751'\
 \#define **BRLAPI\_ETCDIR**   '/etc'\
 \#define **BRLAPI\_AUTHFILE**   'brlapi.key'\
 \#define **BRLAPI\_AUTHNAME**   BRLAPI\_ETCDIR '/' BRLAPI\_AUTHFILE\
 \#define **BRLKEYCODES**   ((uint32\_t) 1)\
 \#define **BRLCOMMANDS**   ((uint32\_t) 2)\
 \#define **BRL\_KEYBUF\_SIZE**   256\
 \#define **BRL\_KEYCODE\_MAX**   ((**brl\_keycode\_t**) (UINT32\_MAX))\
 \#define **BRLAPI\_HOMEKEYDIR**   '.brlkeys'\
 \#define **BRLAPI\_HOMEKEYEXT**   '.kbd'\
 \#define **BRLAPI\_ETCKEYFILE**   'brlkeys'\
 \#define **BRLERR\_SUCCESS**   0\
 \#define **BRLERR\_NOMEM**   1\
 \#define **BRLERR\_TTYBUSY**   2\
 \#define **BRLERR\_UNKNOWN\_INSTRUCTION**   3\
 \#define **BRLERR\_ILLEGAL\_INSTRUCTION**   4\
 \#define **BRLERR\_INVALID\_PARAMETER**   5\
 \#define **BRLERR\_INVALID\_PACKET**   6\
 \#define **BRLERR\_RAWNOTSUPP**   7\
 \#define **BRLERR\_KEYSNOTSUPP**   8\
 \#define **BRLERR\_CONNREFUSED**   9\
 \#define **BRLERR\_OPNOTSUPP**   10\
 \#define **BRLERR\_GAIERR**   11\
 \#define **BRLERR\_LIBCERR**   12\
 \#define **BRLERR\_UNKNOWNTTY**   13\
 \#define **brlapi\_errno**   (\*brlapi\_errno\_location ())\
 \#define **BRLAPI\_MAXPACKETSIZE**   512\
 \#define **BRLPACKET\_AUTHKEY**   'K'\
 \#define **BRLPACKET\_BYE**   'B'\
 \#define **BRLPACKET\_GETDRIVERID**   'd'\
 \#define **BRLPACKET\_GETDRIVERNAME**   'n'\
 \#define **BRLPACKET\_GETDISPLAYSIZE**   's'\
 \#define **BRLPACKET\_GETTTY**   't'\
 \#define **BRLPACKET\_LEAVETTY**   'L'\
 \#define **BRLPACKET\_KEY**   'k'\
 \#define **BRLPACKET\_COMMAND**   'c'\
 \#define **BRLPACKET\_MASKKEYS**   'm'\
 \#define **BRLPACKET\_UNMASKKEYS**   'u'\
 \#define **BRLPACKET\_WRITE**   'W'\
 \#define **BRLPACKET\_WRITEDOTS**   'D'\
 \#define **BRLPACKET\_STATWRITE**   'S'\
 \#define **BRLPACKET\_GETRAW**   '\*'\
 \#define **BRLPACKET\_LEAVERAW**   '#'\
 \#define **BRLPACKET\_PACKET**   'p'\
 \#define **BRLPACKET\_ACK**   'A'\
 \#define **BRLPACKET\_ERROR**   'E'\
 \#define **BRLRAW\_MAGIC**   (0xdeadbeefL)\

### Typedefs

typedef uint32\_t **brl\_keycode\_t**\
 typedef uint32\_t **brl\_type\_t**\

### 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)\
 char \* **brlapi\_getDriverId** (void)\
 char \* **brlapi\_getDriverName** (void)\
 int **brlapi\_getDisplaySize** (unsigned int \*x, unsigned int \*y)\
 int **brlapi\_getTty** (uint32\_t tty, uint32\_t how, **brlapi\_keybinding\_t** \*keybinding)\
 int **brlapi\_leaveTty** (void)\
 int **brlapi\_writeBrl** (uint32\_t cursor, const char \*str)\
 int **brlapi\_writeBrlDots** (const char \*dots)\
 int **brlapi\_readKey** (int block, **brl\_keycode\_t** \*code)\
 int **brlapi\_readCommand** (int block, **brl\_keycode\_t** \*code)\
 int **brlapi\_readBinding** (int block, const char \*\*code)\
 int **brlapi\_ignoreKeys** (**brl\_keycode\_t** x, **brl\_keycode\_t** y)\
 int **brlapi\_unignoreKeys** (**brl\_keycode\_t** x, **brl\_keycode\_t** y)\
 int **brlapi\_getRaw** (void)\
 int **brlapi\_leaveRaw** (void)\
 int **brlapi\_sendRaw** (const unsigned char \*buf, size\_t size)\
 int **brlapi\_recvRaw** (unsigned char \*buf, size\_t size)\
 void **brlapi\_perror** (const char \*s)\
 int \* **brlapi\_errno\_location** (void)\
 int **brlapi\_writePacket** (int fd, **brl\_type\_t** type, const void \*buf, size\_t size)\
 int **brlapi\_readPacket** (int fd, **brl\_type\_t** \*type, void \*buf, size\_t size)\

### Variables

const char \* **brlapi\_errlist** \[\]\
 const int **brlapi\_nerr**\
 int **brlapi\_errno**\
 pthread\_mutex\_t **brlapi\_fd\_mutex**\

## Detailed Description

## Author

Generated automatically by Doxygen for BrlAPI from the source code.
