24 #ifndef BRLAPI_INCLUDED_PROTOCOL 
   25 #define BRLAPI_INCLUDED_PROTOCOL 
   36 #define UINT32_MAX (4294967295U) 
   52 #define BRLAPI_PROTOCOL_VERSION ((uint32_t) 8)  
   56 #define BRLAPI_MAXPACKETSIZE 4096 
   58 #define BRLAPI_PACKET_VERSION         'v'    
   59 #define BRLAPI_PACKET_AUTH            'a'    
   60 #define BRLAPI_PACKET_GETDRIVERNAME   'n'    
   61 #define BRLAPI_PACKET_GETMODELID      'd'    
   62 #define BRLAPI_PACKET_GETDISPLAYSIZE  's'    
   63 #define BRLAPI_PACKET_ENTERTTYMODE    't'    
   64 #define BRLAPI_PACKET_SETFOCUS        'F'    
   65 #define BRLAPI_PACKET_LEAVETTYMODE    'L'    
   66 #define BRLAPI_PACKET_KEY             'k'    
   67 #define BRLAPI_PACKET_IGNOREKEYRANGES 'm'    
   68 #define BRLAPI_PACKET_ACCEPTKEYRANGES 'u'    
   69 #define BRLAPI_PACKET_WRITE           'w'    
   70 #define BRLAPI_PACKET_ENTERRAWMODE    '*'    
   71 #define BRLAPI_PACKET_LEAVERAWMODE    '#'    
   72 #define BRLAPI_PACKET_PACKET          'p'    
   73 #define BRLAPI_PACKET_ACK             'A'    
   74 #define BRLAPI_PACKET_ERROR           'e'    
   75 #define BRLAPI_PACKET_EXCEPTION       'E'    
   76 #define BRLAPI_PACKET_SUSPENDDRIVER   'S'    
   77 #define BRLAPI_PACKET_RESUMEDRIVER    'R'    
   78 #define BRLAPI_PACKET_SYNCHRONIZE     'Z'    
   79 #define BRLAPI_PACKET_PARAM_VALUE     (('P'<<8) + 'V')  
   80 #define BRLAPI_PACKET_PARAM_REQUEST   (('P'<<8) + 'R')  
   81 #define BRLAPI_PACKET_PARAM_UPDATE    (('P'<<8) + 'U')  
   84 #define BRLAPI_DEVICE_MAGIC (0xdeadbeefL) 
   93 #define BRLAPI_HEADERSIZE sizeof(brlapi_header_t) 
  110 #define BRLAPI_AUTH_NONE 'N'  
  111 #define BRLAPI_AUTH_KEY  'K'  
  112 #define BRLAPI_AUTH_CRED 'C'  
  129 #define BRLAPI_WF_DISPLAYNUMBER 0X01     
  130 #define BRLAPI_WF_REGION        0X02     
  131 #define BRLAPI_WF_TEXT          0X04     
  132 #define BRLAPI_WF_ATTR_AND      0X08     
  133 #define BRLAPI_WF_ATTR_OR       0X10     
  134 #define BRLAPI_WF_CURSOR        0X20     
  135 #define BRLAPI_WF_CHARSET       0X40     
  144 #define BRLAPI_PVF_GLOBAL            0X01     
  146 #define BRLAPI_MAXPARAMSIZE (BRLAPI_MAXPACKETSIZE - (sizeof(uint32_t) + sizeof(brlapi_param_t) + 2*sizeof(uint32_t))) 
  158 #define BRLAPI_PARAMF_GET            0X100     
  159 #define BRLAPI_PARAMF_SUBSCRIBE      0X200     
  160 #define BRLAPI_PARAMF_UNSUBSCRIBE    0X400     
Types, defines and functions prototypes for BrlAPI's library.
int brlapi_fileDescriptor
Definition: brlapi.h:164
uint32_t brlapi_packetType_t
Definition: brlapi.h:1405
brlapi_param_t
Definition: brlapi_param.h:36
#define BRLAPI_MAXPACKETSIZE
Definition: brlapi_protocol.h:56
pthread_mutex_t brlapi_fd_mutex
ssize_t brlapi_readPacketHeader(brlapi_fileDescriptor fd, brlapi_packetType_t *packetType)
ssize_t brlapi_readPacket(brlapi_fileDescriptor fd, brlapi_packetType_t *type, void *buf, size_t size)
ssize_t brlapi_readPacketContent(brlapi_fileDescriptor fd, size_t packetSize, void *buf, size_t bufSize)
#define BRLAPI_MAXPARAMSIZE
Definition: brlapi_protocol.h:146
ssize_t brlapi_writePacket(brlapi_fileDescriptor fd, brlapi_packetType_t type, const void *buf, size_t size)
Definition: brlapi_protocol.h:101
uint32_t type
Definition: brlapi_protocol.h:102
unsigned char key
Definition: brlapi_protocol.h:103
Definition: brlapi_protocol.h:106
Definition: brlapi_protocol.h:115
unsigned char packet
Definition: brlapi_protocol.h:118
brlapi_packetType_t type
Definition: brlapi_protocol.h:117
uint32_t code
Definition: brlapi_protocol.h:116
Definition: brlapi_protocol.h:122
char name
Definition: brlapi_protocol.h:125
uint32_t magic
Definition: brlapi_protocol.h:123
unsigned char nameLength
Definition: brlapi_protocol.h:124
Definition: brlapi_protocol.h:163
uint32_t subparam_lo
Definition: brlapi_protocol.h:167
uint32_t flags
Definition: brlapi_protocol.h:164
uint32_t subparam_hi
Definition: brlapi_protocol.h:166
brlapi_param_t param
Definition: brlapi_protocol.h:165
Definition: brlapi_protocol.h:149
uint32_t flags
Definition: brlapi_protocol.h:150
uint32_t subparam_lo
Definition: brlapi_protocol.h:153
brlapi_param_t param
Definition: brlapi_protocol.h:151
uint32_t subparam_hi
Definition: brlapi_protocol.h:152
Definition: brlapi_protocol.h:96
uint32_t protocolVersion
Definition: brlapi_protocol.h:97
Definition: brlapi_protocol.h:138
unsigned char data
Definition: brlapi_protocol.h:140
uint32_t flags
Definition: brlapi_protocol.h:139
Definition: brlapi_protocol.h:172
brlapi_errorPacket_t error
Definition: brlapi_protocol.h:177
brlapi_authServerPacket_t authServer
Definition: brlapi_protocol.h:176
uint32_t uint32
Definition: brlapi_protocol.h:182
brlapi_getDriverSpecificModePacket_t getDriverSpecificMode
Definition: brlapi_protocol.h:178
brlapi_paramValuePacket_t paramValue
Definition: brlapi_protocol.h:180
brlapi_versionPacket_t version
Definition: brlapi_protocol.h:174
brlapi_authClientPacket_t authClient
Definition: brlapi_protocol.h:175
brlapi_writeArgumentsPacket_t writeArguments
Definition: brlapi_protocol.h:179
brlapi_paramRequestPacket_t paramRequest
Definition: brlapi_protocol.h:181