| CustomiOSApi 1.09

CommPortBT.h
1//
2// CommPortBT.h
3// CustomiOSApi
4//
5// Created by CUSTOM on 03/07/13.
6// Copyright (c) 2013 CUSTOM. All rights reserved.
7//
8
9#import "CommPort.h"
10
11//Hide it in the documentation
12// @cond PRIVATE
13@interface CommPortBT : CommPort
14{
15@public
16
17
18
19@protected
20
21@private
22
23 EAAccessory* btaccessory;
24 EASession* btsession;
25 NSString* btprotocolString;
26
27 NSInputStream *iStream;
28 NSOutputStream *oStream;
29
30 Boolean isDongle;
31
32 enum CommPortStatus commPortStatusBT;
33 NSError *tmpErrorBT;
34 NSMutableData* dataRXBT;
35 Boolean mainThreadRunningBT;
36 NSTimeInterval commWatchdogBT;
37}
38
39//***********************************************
40// PRIVATE FUNCTIONS
41//***********************************************
42+(NSArray *) EnumBTDevices:(NSError**)error;
43- (int) BluetoothConnect:(EAAccessory *)btdevice :(NSError**)error;
44
45- (void) BTConnect:(EAAccessory *)btdevice :(NSError**)error;
46- (void) BTDisconnect:(NSError**)error;
47- (void) BTWrite:(NSData *)data :(NSError**)error;
48- (void) BTWrite:(const uint8_t *)buf :(int)length :(NSError**)error;
49- (NSData *) BTRead:(NSInteger)rxBufferSize :(NSError**)error;
50
51@end