Skip to content

Commit c1ede41

Browse files
committed
Fixed to use latest BLE code.
1 parent 53f8ba8 commit c1ede41

File tree

5 files changed

+172
-150
lines changed

5 files changed

+172
-150
lines changed

Examples/BLEChat_Central_OSX/BLEChat_Central_OSX/BLE/BLE.h

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11

22
/*
33
4-
Copyright (c) 2012 RedBearLab
4+
Copyright (c) 2013-2014 RedBearLab
55
66
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
77
88
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
99
1010
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1111
12-
*/
12+
*/
1313

1414
#import <Foundation/Foundation.h>
1515
#if TARGET_OS_IPHONE
16-
#import <CoreBluetooth/CoreBluetooth.h>
16+
#import <CoreBluetooth/CoreBluetooth.h>
1717
#else
18-
#import <IOBluetooth/IOBluetooth.h>
18+
#import <IOBluetooth/IOBluetooth.h>
1919
#endif
2020

2121
@protocol BLEDelegate
@@ -40,19 +40,16 @@
4040
-(void) read;
4141
-(void) writeValue:(CBUUID *)serviceUUID characteristicUUID:(CBUUID *)characteristicUUID p:(CBPeripheral *)p data:(NSData *)data;
4242

43-
-(UInt16) readLibVer;
44-
-(UInt16) readFrameworkVersion;
45-
-(NSString *) readVendorName;
4643
-(BOOL) isConnected;
47-
-(int) readRSSI;
4844
-(void) write:(NSData *)d;
45+
-(void) readRSSI;
4946

50-
-(int) controlSetup:(int) s;
47+
-(void) controlSetup;
5148
-(int) findBLEPeripherals:(int) timeout;
5249
-(void) connectPeripheral:(CBPeripheral *)peripheral;
5350

5451
-(UInt16) swap:(UInt16) s;
55-
-(const char *) centralManagerStateToString:(long)state;
52+
-(const char *) centralManagerStateToString:(int)state;
5653
-(void) scanTimer:(NSTimer *)timer;
5754
-(void) printKnownPeripherals;
5855
-(void) printPeripheralInfo:(CBPeripheral*)peripheral;
@@ -61,11 +58,13 @@
6158
-(void) getAllCharacteristicsFromPeripheral:(CBPeripheral *)p;
6259
-(CBService *) findServiceFromUUID:(CBUUID *)UUID p:(CBPeripheral *)p;
6360
-(CBCharacteristic *) findCharacteristicFromUUID:(CBUUID *)UUID service:(CBService*)service;
64-
-(const char *) UUIDToString:(CFUUIDRef) UUID;
65-
-(const char *) CBUUIDToString:(CBUUID *) UUID;
61+
62+
//-(NSString *) NSUUIDToString:(NSUUID *) UUID;
63+
-(NSString *) CBUUIDToString:(CBUUID *) UUID;
64+
6665
-(int) compareCBUUID:(CBUUID *) UUID1 UUID2:(CBUUID *)UUID2;
6766
-(int) compareCBUUIDToInt:(CBUUID *) UUID1 UUID2:(UInt16)UUID2;
6867
-(UInt16) CBUUIDToInt:(CBUUID *) UUID;
69-
-(int) UUIDSAreEqual:(CFUUIDRef)u1 u2:(CFUUIDRef)u2;
68+
-(BOOL) UUIDSAreEqual:(NSUUID *)UUID1 UUID2:(NSUUID *)UUID2;
7069

7170
@end

0 commit comments

Comments
 (0)