BRPtouchBLEManager
BRPtouchBLEManager
class provides APIs to discover printers via Bluetooth Low Energy (BLE).
Class Methods
sharedManager
Get the instance of BRPtouchBLEManager
.
Declaration
+ (BRPtouchBLEManager *)sharedManager;
Return Value
The shared instance of BRPtouchBLEManager
.
Instance Methods
startSearchWithCompletionHandler:
Start searching printers which support Bluetooth Low Energy. This continually call the handler when a new device is found. And it keeps on searching until stopSearch
is called.
See also a sample codes in Discovering Printer.
Declaration
- (BOOL)startSearchWithCompletionHandler:(BRBLEManagerSearchCompletionHandler)handler;
Parameters
Parameter | Description |
---|---|
handler | A block which receives found printer information |
Return Value
No
if Bluetooth Low Energy is not available, otherwise YES
.
stopSearch
Stop searching.
Declaration
- (void)stopSearch;
Types
BRBLEManagerSearchCompletionHandler
BRBLEManagerSearchCompletionHandler
is a block definition to receive the found printer information.
Declaration
typedef void (^BRBLEManagerSearchCompletionHandler)(BRPtouchDeviceInfo *deviceInfo);
Parameters
Parameter | Description |
---|---|
handler | Found printer information |