25 #ifndef BRLAPI_INCLUDED
26 #define BRLAPI_INCLUDED
38 #define BRLAPI_RELEASE "0.5.7"
41 #define BRLAPI_MAJOR 0
44 #define BRLAPI_MINOR 5
47 #define BRLAPI_REVISION 7
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;
118 #define BRLAPI_SOCKETPORTNUM 4101
119 #define BRLAPI_SOCKETPORT "4101"
122 #define BRLAPI_SOCKETPATH "/var/lib/BrlAPI"
128 #define BRLAPI_ETCDIR "/etc"
133 #define BRLAPI_AUTHKEYFILE "brlapi.key"
136 #define BRLAPI_DEFAUTH BRLAPI_ETCDIR "/" BRLAPI_AUTHKEYFILE
198 #define BRLAPI_SETTINGS_INITIALIZER { NULL, NULL }
245 #ifndef BRLAPI_NO_SINGLE_SESSION
257 #ifndef BRLAPI_NO_SINGLE_SESSION
277 #define BRLAPI_MAXNAMELENGTH 31
291 #ifndef BRLAPI_NO_SINGLE_SESSION
298 #ifndef BRLAPI_NO_SINGLE_SESSION
346 #ifndef BRLAPI_NO_SINGLE_SESSION
360 #define BRLAPI_TTY_DEFAULT -1
374 #ifndef BRLAPI_NO_SINGLE_SESSION
386 #ifndef BRLAPI_NO_SINGLE_SESSION
402 #ifndef BRLAPI_NO_SINGLE_SESSION
451 #ifndef BRLAPI_NO_SINGLE_SESSION
464 #ifndef BRLAPI_NO_SINGLE_SESSION
473 unsigned int regionBegin ;
474 unsigned int regionSize ;
477 unsigned char *andMask ;
478 unsigned char *orMask ;
487 #define BRLAPI_DISPLAY_DEFAULT -1
493 #define BRLAPI_CURSOR_LEAVE -1
499 #define BRLAPI_CURSOR_OFF 0
511 #define BRLAPI_WRITEARGUMENTS_INITIALIZER { BRLAPI_DISPLAY_DEFAULT, 0, 0, NULL, -1, NULL, NULL, BRLAPI_CURSOR_LEAVE, NULL }
549 #ifndef BRLAPI_NO_SINGLE_SESSION
575 unsigned int command ;
576 unsigned int argument ;
594 const char *command ;
595 unsigned int argument ;
612 #define BRLAPI_UC_ROW 0x2800UL
681 #ifndef BRLAPI_NO_SINGLE_SESSION
708 #ifndef BRLAPI_NO_SINGLE_SESSION
726 #ifndef BRLAPI_NO_SINGLE_SESSION
737 #ifndef BRLAPI_NO_SINGLE_SESSION
739 #define brlapi_ignoreAllKeys() brlapi_ignoreKeys(brlapi_rangeType_all, NULL, 0)
742 #define brlapi__ignoreAllKeys(handle) brlapi__ignoreKeys(handle, brlapi_rangeType_all, NULL, 0)
753 #ifndef BRLAPI_NO_SINGLE_SESSION
755 #define brlapi_acceptAllKeys() brlapi_acceptKeys(brlapi_rangeType_all, NULL, 0)
758 #define brlapi__acceptAllKeys(handle) brlapi__acceptKeys(handle, brlapi_rangeType_all, NULL, 0)
780 #ifndef BRLAPI_NO_SINGLE_SESSION
796 #ifndef BRLAPI_NO_SINGLE_SESSION
830 #ifndef BRLAPI_NO_SINGLE_SESSION
838 #ifndef BRLAPI_NO_SINGLE_SESSION
849 #ifndef BRLAPI_NO_SINGLE_SESSION
861 #ifndef BRLAPI_NO_SINGLE_SESSION
871 #ifndef BRLAPI_NO_SINGLE_SESSION
880 #ifndef BRLAPI_NO_SINGLE_SESSION
908 #define BRLAPI_ERROR_SUCCESS 0
909 #define BRLAPI_ERROR_NOMEM 1
910 #define BRLAPI_ERROR_TTYBUSY 2
911 #define BRLAPI_ERROR_DEVICEBUSY 3
912 #define BRLAPI_ERROR_UNKNOWN_INSTRUCTION 4
913 #define BRLAPI_ERROR_ILLEGAL_INSTRUCTION 5
914 #define BRLAPI_ERROR_INVALID_PARAMETER 6
915 #define BRLAPI_ERROR_INVALID_PACKET 7
916 #define BRLAPI_ERROR_CONNREFUSED 8
917 #define BRLAPI_ERROR_OPNOTSUPP 9
918 #define BRLAPI_ERROR_GAIERR 10
919 #define BRLAPI_ERROR_LIBCERR 11
920 #define BRLAPI_ERROR_UNKNOWNTTY 12
921 #define BRLAPI_ERROR_PROTOCOL_VERSION 13
922 #define BRLAPI_ERROR_EOF 14
923 #define BRLAPI_ERROR_EMPTYKEY 15
924 #define BRLAPI_ERROR_DRIVERERROR 16
925 #define BRLAPI_ERROR_AUTHENTICATION 17
984 #define brlapi_error (*brlapi_error_location())
986 #define brlapi_errno (brlapi_error.brlerrno)
988 #define brlapi_libcerrno (brlapi_error.libcerrno)
990 #define brlapi_gaierrno (brlapi_error.gaierrno)
992 #define brlapi_errfun (brlapi_error.errfun)
1025 #ifndef BRLAPI_NO_SINGLE_SESSION
1040 #ifndef BRLAPI_NO_SINGLE_SESSION
1054 #ifndef BRLAPI_NO_SINGLE_SESSION
1059 #ifndef BRLAPI_NO_SINGLE_SESSION
1068 #ifndef BRLAPI_NO_SINGLE_SESSION
1069 int BRLAPI_STDCALL brlapi_writeTextWin(
int cursor,
const void *str,
int wide);
1073 #ifndef BRLAPI_NO_SINGLE_SESSION
1079 #ifndef BRLAPI_NO_SINGLE_SESSION
1080 #define brlapi_writeText(cursor, str) brlapi_writeTextWin(cursor, str, 1)
1082 #define brlapi__writeText(handle, cursor, str) brlapi__writeTextWin(handle, cursor, str, 1)
1084 #ifndef BRLAPI_NO_SINGLE_SESSION
1085 #define brlapi_write(s) brlapi_writeWin(s, 1)
1087 #define brlapi__write(handle, s) brlapi__writeWin(handle, s, 1)
1091 #ifndef BRLAPI_NO_SINGLE_SESSION
1092 #define brlapi_writeText(cursor, str) brlapi_writeTextWin(cursor, str, 0)
1094 #define brlapi__writeText(handle, cursor, str) brlapi__writeTextWin(handle, cursor, str, 0)
1096 #ifndef BRLAPI_NO_SINGLE_SESSION
1097 #define brlapi_write(s) brlapi_writeWin(s, 0)
1099 #define brlapi__write(handle, s) brlapi__writeWin(handle, s, 0)
1104 #ifndef BRLAPI_NO_DEPRECATED
1117 #define brlapi_settings_t brlapi_connectionSettings_t
1131 #define BRLAPI_WRITESTRUCT_INITIALIZER BRLAPI_WRITEARGUMENTS_INITIALIZER
1133 #define brl_keycode_t brlapi_keyCode_t
1134 #define brl_type_t brlapi_packetType_t
1136 #define BRLCOMMANDS NULL
1137 #define BRL_KEYCODE_MAX BRLAPI_KEY_MAX
1139 #ifndef BRLAPI_NO_SINGLE_SESSION
1140 #define brlapi_initializeConnection brlapi_openConnection
1141 #define brlapi_getTty brlapi_enterTtyMode
1142 #define brlapi_getTtyPath brlapi_enterTtyModeWithPath
1143 #define brlapi_leaveTty brlapi_leaveTtyMode
1144 #define brlapi_unignoreKeyRange brlapi_acceptKeyRange
1145 #define brlapi_unignoreKeySet brlapi_acceptKeySet
1146 #define brlapi_getRaw brlapi_enterRawMode
1147 #define brlapi_leaveRaw brlapi_leaveRawMode
1148 #define brlapi_suspend brlapi_suspendDriver
1149 #define brlapi_resume brlapi_resumeDriver
1152 #define BRLERR_SUCCESS BRLAPI_ERROR_SUCCESS
1153 #define BRLERR_NOMEM BRLAPI_ERROR_NOMEM
1154 #define BRLERR_TTYBUSY BRLAPI_ERROR_TTYBUSY
1155 #define BRLERR_DEVICEBUSY BRLAPI_ERROR_DEVICEBUSY
1156 #define BRLERR_UNKNOWN_INSTRUCTION BRLAPI_ERROR_UNKNOWN_INSTRUCTION
1157 #define BRLERR_ILLEGAL_INSTRUCTION BRLAPI_ERROR_ILLEGAL_INSTRUCTION
1158 #define BRLERR_INVALID_PARAMETER BRLAPI_ERROR_INVALID_PARAMETER
1159 #define BRLERR_INVALID_PACKET BRLAPI_ERROR_INVALID_PACKET
1160 #define BRLERR_CONNREFUSED BRLAPI_ERROR_CONNREFUSED
1161 #define BRLERR_OPNOTSUPP BRLAPI_ERROR_OPNOTSUPP
1162 #define BRLERR_GAIERR BRLAPI_ERROR_GAIERR
1163 #define BRLERR_LIBCERR BRLAPI_ERROR_LIBCERR
1164 #define BRLERR_UNKNOWNTTY BRLAPI_ERROR_UNKNOWNTTY
1165 #define BRLERR_PROTOCOL_VERSION BRLAPI_ERROR_PROTOCOL_VERSION
1166 #define BRLERR_EOF BRLAPI_ERROR_EOF
1167 #define BRLERR_EMPTYKEY BRLAPI_ERROR_EMPTYKEY
1168 #define BRLERR_DRIVERERROR BRLAPI_ERROR_DRIVERERROR