Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > main-release > by-pkgid > 78cff6a8ec39f0e621e35b5f5c351f9d > files > 379

lib64brlapi-devel-4.1-1mdv2010.1.x86_64.rpm

.TH "Driver-Specific modes" 3 "7 Oct 2009" "Version 1.0" "BrlAPI" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Driver-Specific modes \- Raw and Suspend Modes mechanism.  

.PP
.SS "Functions"

.in +1c
.ti -1c
.RI "int BRLAPI_STDCALL \fBbrlapi_enterRawMode\fP (const char *driver)"
.br
.ti -1c
.RI "int BRLAPI_STDCALL \fBbrlapi__enterRawMode\fP (\fBbrlapi_handle_t\fP *handle, const char *driver)"
.br
.ti -1c
.RI "int BRLAPI_STDCALL \fBbrlapi_leaveRawMode\fP (void)"
.br
.ti -1c
.RI "int BRLAPI_STDCALL \fBbrlapi__leaveRawMode\fP (\fBbrlapi_handle_t\fP *handle)"
.br
.ti -1c
.RI "ssize_t BRLAPI_STDCALL \fBbrlapi_sendRaw\fP (const void *buffer, size_t size)"
.br
.ti -1c
.RI "ssize_t BRLAPI_STDCALL \fBbrlapi__sendRaw\fP (\fBbrlapi_handle_t\fP *handle, const void *buffer, size_t size)"
.br
.ti -1c
.RI "ssize_t BRLAPI_STDCALL \fBbrlapi_recvRaw\fP (void *buffer, size_t size)"
.br
.ti -1c
.RI "ssize_t BRLAPI_STDCALL \fBbrlapi__recvRaw\fP (\fBbrlapi_handle_t\fP *handle, void *buffer, size_t size)"
.br
.ti -1c
.RI "int BRLAPI_STDCALL \fBbrlapi_suspendDriver\fP (const char *driver)"
.br
.ti -1c
.RI "int BRLAPI_STDCALL \fBbrlapi__suspendDriver\fP (\fBbrlapi_handle_t\fP *handle, const char *driver)"
.br
.ti -1c
.RI "int BRLAPI_STDCALL \fBbrlapi_resumeDriver\fP (void)"
.br
.ti -1c
.RI "int BRLAPI_STDCALL \fBbrlapi__resumeDriver\fP (\fBbrlapi_handle_t\fP *handle)"
.br
.in -1c
.SH "Detailed Description"
.PP 
If the application wants to directly talk to the braille terminal, it should use Raw Mode. In this special mode, the driver gives the whole control of the terminal to it: \fIbrltty\fP doesn't work any more.
.PP
For this, it simply has to call \fBbrlapi_enterRawMode()\fP, then \fBbrlapi_sendRaw()\fP and \fBbrlapi_recvRaw()\fP, and finally give control back thanks to \fBbrlapi_leaveRawMode()\fP.
.PP
Special care of the terminal should be taken, since one might completely trash the terminal's data, or even lock it! The application should always check for terminal's type thanks to \fBbrlapi_getDriverName()\fP.
.PP
The client can also make brltty close the driver by using \fBbrlapi_suspendDriver()\fP, and resume it again with \fBbrlapi_resumeDriver()\fP. This should not be used if possible: raw mode should be sufficient for any use. If not, please ask for features :) 
.SH "Function Documentation"
.PP 
.SS "int BRLAPI_STDCALL brlapi__enterRawMode (\fBbrlapi_handle_t\fP * handle, const char * driver)"
.PP
.SS "int BRLAPI_STDCALL brlapi__leaveRawMode (\fBbrlapi_handle_t\fP * handle)"
.PP
.SS "ssize_t BRLAPI_STDCALL brlapi__recvRaw (\fBbrlapi_handle_t\fP * handle, void * buffer, size_t size)"
.PP
.SS "int BRLAPI_STDCALL brlapi__resumeDriver (\fBbrlapi_handle_t\fP * handle)"
.PP
.SS "ssize_t BRLAPI_STDCALL brlapi__sendRaw (\fBbrlapi_handle_t\fP * handle, const void * buffer, size_t size)"
.PP
.SS "int BRLAPI_STDCALL brlapi__suspendDriver (\fBbrlapi_handle_t\fP * handle, const char * driver)"
.PP
.SS "int BRLAPI_STDCALL brlapi_enterRawMode (const char * driver)"
.PP
Switch to Raw mode 
.PP
\fBParameters:\fP
.RS 4
\fIdriver\fP Specifies the name of the driver for which the raw communication will be established. 
.RE
.PP
\fBReturns:\fP
.RS 4
0 on success, -1 on error 
.RE
.PP

.SS "int BRLAPI_STDCALL brlapi_leaveRawMode (void)"
.PP
Leave Raw mode 
.PP
\fBReturns:\fP
.RS 4
0 on success, -1 on error 
.RE
.PP

.SS "ssize_t BRLAPI_STDCALL brlapi_recvRaw (void * buffer, size_t size)"
.PP
Get Raw data
.PP
\fBParameters:\fP
.RS 4
\fIbuffer\fP points on a buffer where the function will store the received data; 
.br
\fIsize\fP holds the buffer size. 
.RE
.PP
\fBReturns:\fP
.RS 4
its size, -1 on error or signal interruption 
.RE
.PP

.SS "int BRLAPI_STDCALL brlapi_resumeDriver (void)"
.PP
Resume braille driver 
.PP
\fBReturns:\fP
.RS 4
-1 on error 
.RE
.PP

.SS "ssize_t BRLAPI_STDCALL brlapi_sendRaw (const void * buffer, size_t size)"
.PP
Send Raw data
.PP
\fBParameters:\fP
.RS 4
\fIbuffer\fP points on the data; 
.br
\fIsize\fP holds the packet size. 
.RE
.PP
\fBReturns:\fP
.RS 4
size on success, -1 on error 
.RE
.PP

.SS "int BRLAPI_STDCALL brlapi_suspendDriver (const char * driver)"
.PP
Suspend braille driver 
.PP
\fBParameters:\fP
.RS 4
\fIdriver\fP Specifies the name of the driver which will be suspended. 
.RE
.PP
\fBReturns:\fP
.RS 4
-1 on error 
.RE
.PP