# API Class Reference

This section provides details on the core classes, methods, and data objects used in `PeripheralsLib`.

## PeripheralsManager

The main entry point for the library.

**Constructor:** `PeripheralsManager(Context context)`

**Methods:** 

### `printBitmap`

Prints a bitmap image.

* **Signatures:**  
  * `void printBitmap(final Bitmap bitmap)`  
  * `void printBitmap(final Bitmap bitmap, PrintBmpCallback printCallback)`

### `magStripeRead`

Initiates a read operation for health cards.

* **Signature:** `void magStripeRead(MagReadCallback callback)`

### `barcodeRead`

Initiates a scan using the professional barcode reader.

* **Signature:** `void barcodeRead(BarcodeCallback callback)`

### `configTerminal`

Applies kiosk mode configurations to the terminal.

* **Signature:** `void configTerminal(MSG8210 config, ConfigCallback callback)`

## Data Objects

### MSG8210

Configuration object for `configTerminal`.

| Field | Type | Description |
| :---- | :---- | :---- |
| `launcherAppPackage` | String | Package ID for the default launcher app. |
| `launcherAppActivity` | String | Activity class name for the default launcher. |
| `enableStatusBar` | Boolean | Block/Allow status bar expansion. |
| `enableNavigationBar` | Boolean | Block/Allow navigation button usage. |
| `showStatusBar` | Boolean | Show/Hide status bar. |
| `showNavigationBar` | Boolean | Show/Hide navigation bar. |

### MagHealthResponse

Response object for `MagReadCallback`.

| Field | Type | Description |
| :---- | :---- | :---- |
| `HealthCard` | boolean | true if tracks identify a health card. |
| `Track1` | String | Data from Track 1 (empty if not a health card). |
| `Track2` | String | Data from Track 2 (empty if not a health card). |

## Callbacks

### PrintBmpCallback

* `void onSuccess()`
* `void onError(String error)`

### MagReadCallback

* `void onSuccess(MagHealthResponse magHealthResponse)`  
* `void onError(int errorCode, String description)`

### BarcodeCallback

* `void onSuccess(BarcodeResponse barcodeResponse)`  
* `void onError(int errorCode)`

### ConfigCallback

* `void onSuccess()`  
* `void onError(int errorCode)`