25 #ifndef BRLAPI_INCLUDED
26 #define BRLAPI_INCLUDED
38 #define BRLAPI_RELEASE "0.6.4"
41 #define BRLAPI_MAJOR 0
44 #define BRLAPI_MINOR 6
47 #define BRLAPI_REVISION 4
52 #include <sys/types.h>
56 #define BRLAPI_STDCALL __stdcall
58 #define BRLAPI_STDCALL
62 typedef __int64 uint64_t;
63 typedef __int32 uint32_t;
64 #define UINT64_C(x) (x ## Ui64)
66 typedef signed int ssize_t;
120 #define BRLAPI_SOCKETPORTNUM 4101
121 #define BRLAPI_SOCKETPORT "4101"
124 #define BRLAPI_SOCKETPATH "/var/lib/BrlAPI"
130 #define BRLAPI_ETCDIR "/etc"
135 #define BRLAPI_AUTHKEYFILE "brlapi.key"
140 #define BRLAPI_DEFAUTH "none"
142 #define BRLAPI_DEFAUTH BRLAPI_ETCDIR "/" BRLAPI_AUTHKEYFILE
205 #define BRLAPI_SETTINGS_INITIALIZER { NULL, NULL }
252 #ifndef BRLAPI_NO_SINGLE_SESSION
264 #ifndef BRLAPI_NO_SINGLE_SESSION
284 #define BRLAPI_MAXNAMELENGTH 31
298 #ifndef BRLAPI_NO_SINGLE_SESSION
305 #ifndef BRLAPI_NO_SINGLE_SESSION
353 #ifndef BRLAPI_NO_SINGLE_SESSION
367 #define BRLAPI_TTY_DEFAULT -1
381 #ifndef BRLAPI_NO_SINGLE_SESSION
393 #ifndef BRLAPI_NO_SINGLE_SESSION
409 #ifndef BRLAPI_NO_SINGLE_SESSION
458 #ifndef BRLAPI_NO_SINGLE_SESSION
476 #ifndef BRLAPI_NO_SINGLE_SESSION
489 #ifndef BRLAPI_NO_SINGLE_SESSION
498 unsigned int regionBegin ;
499 unsigned int regionSize ;
502 unsigned char *andMask ;
503 unsigned char *orMask ;
512 #define BRLAPI_DISPLAY_DEFAULT -1
518 #define BRLAPI_CURSOR_LEAVE -1
524 #define BRLAPI_CURSOR_OFF 0
536 #define BRLAPI_WRITEARGUMENTS_INITIALIZER { \
537 .displayNumber = BRLAPI_DISPLAY_DEFAULT, \
544 .cursor = BRLAPI_CURSOR_LEAVE, \
584 #ifndef BRLAPI_NO_SINGLE_SESSION
610 unsigned int command ;
611 unsigned int argument ;
629 const char *command ;
630 unsigned int argument ;
647 #define BRLAPI_UC_ROW 0x2800UL
716 #ifndef BRLAPI_NO_SINGLE_SESSION
743 #ifndef BRLAPI_NO_SINGLE_SESSION
761 #ifndef BRLAPI_NO_SINGLE_SESSION
772 #ifndef BRLAPI_NO_SINGLE_SESSION
774 #define brlapi_ignoreAllKeys() brlapi_ignoreKeys(brlapi_rangeType_all, NULL, 0)
777 #define brlapi__ignoreAllKeys(handle) brlapi__ignoreKeys(handle, brlapi_rangeType_all, NULL, 0)
788 #ifndef BRLAPI_NO_SINGLE_SESSION
790 #define brlapi_acceptAllKeys() brlapi_acceptKeys(brlapi_rangeType_all, NULL, 0)
793 #define brlapi__acceptAllKeys(handle) brlapi__acceptKeys(handle, brlapi_rangeType_all, NULL, 0)
815 #ifndef BRLAPI_NO_SINGLE_SESSION
831 #ifndef BRLAPI_NO_SINGLE_SESSION
865 #ifndef BRLAPI_NO_SINGLE_SESSION
873 #ifndef BRLAPI_NO_SINGLE_SESSION
884 #ifndef BRLAPI_NO_SINGLE_SESSION
896 #ifndef BRLAPI_NO_SINGLE_SESSION
906 #ifndef BRLAPI_NO_SINGLE_SESSION
915 #ifndef BRLAPI_NO_SINGLE_SESSION
943 #define BRLAPI_ERROR_SUCCESS 0
944 #define BRLAPI_ERROR_NOMEM 1
945 #define BRLAPI_ERROR_TTYBUSY 2
946 #define BRLAPI_ERROR_DEVICEBUSY 3
947 #define BRLAPI_ERROR_UNKNOWN_INSTRUCTION 4
948 #define BRLAPI_ERROR_ILLEGAL_INSTRUCTION 5
949 #define BRLAPI_ERROR_INVALID_PARAMETER 6
950 #define BRLAPI_ERROR_INVALID_PACKET 7
951 #define BRLAPI_ERROR_CONNREFUSED 8
952 #define BRLAPI_ERROR_OPNOTSUPP 9
953 #define BRLAPI_ERROR_GAIERR 10
954 #define BRLAPI_ERROR_LIBCERR 11
955 #define BRLAPI_ERROR_UNKNOWNTTY 12
956 #define BRLAPI_ERROR_PROTOCOL_VERSION 13
957 #define BRLAPI_ERROR_EOF 14
958 #define BRLAPI_ERROR_EMPTYKEY 15
959 #define BRLAPI_ERROR_DRIVERERROR 16
960 #define BRLAPI_ERROR_AUTHENTICATION 17
1019 #define brlapi_error (*brlapi_error_location())
1021 #define brlapi_errno (brlapi_error.brlerrno)
1023 #define brlapi_libcerrno (brlapi_error.libcerrno)
1025 #define brlapi_gaierrno (brlapi_error.gaierrno)
1027 #define brlapi_errfun (brlapi_error.errfun)
1060 #ifndef BRLAPI_NO_SINGLE_SESSION
1075 #ifndef BRLAPI_NO_SINGLE_SESSION
1089 #ifndef BRLAPI_NO_SINGLE_SESSION
1094 #ifndef BRLAPI_NO_SINGLE_SESSION
1103 #ifndef BRLAPI_NO_SINGLE_SESSION
1104 int BRLAPI_STDCALL brlapi_writeTextWin(
int cursor,
const void *str,
int wide);
1108 #ifndef BRLAPI_NO_SINGLE_SESSION
1114 #ifndef BRLAPI_NO_SINGLE_SESSION
1115 #define brlapi_writeText(cursor, str) brlapi_writeTextWin(cursor, str, 1)
1117 #define brlapi__writeText(handle, cursor, str) brlapi__writeTextWin(handle, cursor, str, 1)
1119 #ifndef BRLAPI_NO_SINGLE_SESSION
1120 #define brlapi_write(s) brlapi_writeWin(s, 1)
1122 #define brlapi__write(handle, s) brlapi__writeWin(handle, s, 1)
1126 #ifndef BRLAPI_NO_SINGLE_SESSION
1127 #define brlapi_writeText(cursor, str) brlapi_writeTextWin(cursor, str, 0)
1129 #define brlapi__writeText(handle, cursor, str) brlapi__writeTextWin(handle, cursor, str, 0)
1131 #ifndef BRLAPI_NO_SINGLE_SESSION
1132 #define brlapi_write(s) brlapi_writeWin(s, 0)
1134 #define brlapi__write(handle, s) brlapi__writeWin(handle, s, 0)
1139 #ifndef BRLAPI_NO_DEPRECATED
1152 #define brlapi_settings_t brlapi_connectionSettings_t
1166 #define BRLAPI_WRITESTRUCT_INITIALIZER BRLAPI_WRITEARGUMENTS_INITIALIZER
1168 #define brl_keycode_t brlapi_keyCode_t
1169 #define brl_type_t brlapi_packetType_t
1171 #define BRLCOMMANDS NULL
1172 #define BRL_KEYCODE_MAX BRLAPI_KEY_MAX
1174 #ifndef BRLAPI_NO_SINGLE_SESSION
1175 #define brlapi_initializeConnection brlapi_openConnection
1176 #define brlapi_getTty brlapi_enterTtyMode
1177 #define brlapi_getTtyPath brlapi_enterTtyModeWithPath
1178 #define brlapi_leaveTty brlapi_leaveTtyMode
1179 #define brlapi_unignoreKeyRange brlapi_acceptKeyRange
1180 #define brlapi_unignoreKeySet brlapi_acceptKeySet
1181 #define brlapi_getRaw brlapi_enterRawMode
1182 #define brlapi_leaveRaw brlapi_leaveRawMode
1183 #define brlapi_suspend brlapi_suspendDriver
1184 #define brlapi_resume brlapi_resumeDriver
1187 #define BRLERR_SUCCESS BRLAPI_ERROR_SUCCESS
1188 #define BRLERR_NOMEM BRLAPI_ERROR_NOMEM
1189 #define BRLERR_TTYBUSY BRLAPI_ERROR_TTYBUSY
1190 #define BRLERR_DEVICEBUSY BRLAPI_ERROR_DEVICEBUSY
1191 #define BRLERR_UNKNOWN_INSTRUCTION BRLAPI_ERROR_UNKNOWN_INSTRUCTION
1192 #define BRLERR_ILLEGAL_INSTRUCTION BRLAPI_ERROR_ILLEGAL_INSTRUCTION
1193 #define BRLERR_INVALID_PARAMETER BRLAPI_ERROR_INVALID_PARAMETER
1194 #define BRLERR_INVALID_PACKET BRLAPI_ERROR_INVALID_PACKET
1195 #define BRLERR_CONNREFUSED BRLAPI_ERROR_CONNREFUSED
1196 #define BRLERR_OPNOTSUPP BRLAPI_ERROR_OPNOTSUPP
1197 #define BRLERR_GAIERR BRLAPI_ERROR_GAIERR
1198 #define BRLERR_LIBCERR BRLAPI_ERROR_LIBCERR
1199 #define BRLERR_UNKNOWNTTY BRLAPI_ERROR_UNKNOWNTTY
1200 #define BRLERR_PROTOCOL_VERSION BRLAPI_ERROR_PROTOCOL_VERSION
1201 #define BRLERR_EOF BRLAPI_ERROR_EOF
1202 #define BRLERR_EMPTYKEY BRLAPI_ERROR_EMPTYKEY
1203 #define BRLERR_DRIVERERROR BRLAPI_ERROR_DRIVERERROR