Chapter 3. Application Programming Interface

Affix design allows user to implement applications at the kernel level (as kernel modules) and user level (as applications). For this reason Affix exports following interfaces:

3.1. Affix API Components

Affix API components include following entities: incorporated in header files and libraries. Default installation path for header files and libraries is /usr/include/affix and /usr/lib respectively.

Table 3-1. Affix header files

Header fileDescription
bluetooth.hMain header file. Has to be included in all programs. Contains main system Affix type definitions and function declarations. Provides interface between kernel and user parts.
hci_types.hContains all HCI type definitions. (defined according to the Bluetooth Specifications).
hci_cmds.hContains HCI commands implementation. (defined according to the Bluetooth Specification).
btcore.hContains user-level Affix system specific definitions and declarations.
utils.hContains declarations of common tools for the Affix.
sdp.hContains SDP type definitions.
sdpclt.hContains SDP client interface declarations.
sdpsrv.hContains SDP server interface declarations.
obex.hContains OBEX client interface declarations.

Table 3-2. Affix libraries

LibraryDescription
libaffix.soMain Affix library. Contains Affix and Bluetooth core implementation. All programs must link with it.
libaffix_utils.soContains implementation of general purpose functions used in the Affix.
libaffix_sdp.soContains SDP client API implementation. Any program using SDP has to link with it.
libaffix_sdpsvc.socontains SDP server API implementation. Only programs registering services link with it.
libaffix_obex.soContains Bluetooth OBEX framework implementation. Any program using OBEX must link with it.

Table 3-3. Affix kernel modules

ModuleDescription
affix.koAffix core module (HCI, L2CAP, and its socket interfaces)
affix_rfcomm.koRFCOMM, BTY and its socket interfaces
affix_pan.koPAN (BNEP, network interface)
affix_usb.koBluetooth USB driver
affix_uart.koBluetooth UART (H4, BCSP, TLP) driver
affix_uart_cs.koPCMCIA driver for UART cards
affix_hidpHID device support implementation