Commit a7aec9cb authored by Chengzhao Li's avatar Chengzhao Li
Browse files

- clean code

parent c5aa04e1
......@@ -716,7 +716,6 @@ static NCMCBluetoothLEManager *_sharedNCMCBluetoothLEManager = nil;
[self.connectedCentrals removeObjectForKey:central.identifier.UUIDString];
// TODO : session stata change
if (self.session != nil) {
[self.session onCentralDisconnected];
}
......@@ -745,13 +744,7 @@ static NCMCBluetoothLEManager *_sharedNCMCBluetoothLEManager = nil;
[peripheral respondToRequest:request withResult:CBATTErrorSuccess];
//CCLOG(@"peripheralManager receive data length %u", request.value.length);
NSMutableString *identifier = [NSMutableString stringWithString:request.central.identifier.UUIDString];
/*
if (self.session != nil) {
NSString* customiseId = [self.session getCentralDeviceIdentifier];
if (![customiseId isEqualToString:@""]) {
[identifier setString:customiseId];
}
}*/
[self processMsg:request.value from:identifier];
}
}
......
......@@ -6,7 +6,6 @@
// Copyright © 2016 Apportable. All rights reserved.
//
//#import "NCMCCentralService.h"
#import "Core/NCMCBluetoothLEManager.h"
#import "Core/NCMCCentralService+Core.h"
......
......@@ -6,7 +6,6 @@
// Copyright © 2016 Apportable. All rights reserved.
//
//#import "NCMCPeripheralService.h"
#import "Core/NCMCPeripheralService+Core.h"
#import "Core/NCMCBluetoothLEManager.h"
......
......@@ -6,7 +6,6 @@
// Copyright © 2016 Apportable. All rights reserved.
//
//#import "NCMCSession.h"
#import "Core/NCMCBluetoothLEManager.h"
#import "Core/NCMCSession+Core.h"
#import "Core/NCMCPeerID+Core.h"
......@@ -129,14 +128,6 @@ typedef enum NCMCSystemMessageType {
}
self.myUniqueID = 0;
/*
NCMCDeviceInfo* centralDevice = [[NCMCDeviceInfo alloc]init];
centralDevice.identifier = self.myPeerID.identifier;
centralDevice.uniqueID = 0;
centralDevice.name = [self.myPeerID displayName];
self.connectedDevices[self.myPeerID.identifier] = centralDevice;*/
}
-(NSData*)packSystemMessageWithType:(char)msgType andMessage:(NSData*)msg
......@@ -226,7 +217,6 @@ typedef enum NCMCSystemMessageType {
-(void)sendCentralConnectionRequestToPeer:(NCMCPeerID *)peerID
{
//NCMCDeviceInfo* centralDevice = self.connectedDevices[self.myPeerID.identifier];
NCMCDeviceInfo* centralDevice = [[NCMCDeviceInfo alloc]init];
centralDevice.identifier = self.myPeerID.identifier;
centralDevice.uniqueID = 0;
......@@ -374,9 +364,6 @@ void(^myInvitationHandler)(BOOL, NCMCSession*, NCMCPeerID*) = ^(BOOL accept, NCM
self.myPeerID.identifier = device.identifier;
self.myUniqueID = device.uniqueID;
// add self to connected dict, do we?
//self.connectedDevices[device.identifier] = device;
// send central connection status notification
NCMCDeviceInfo* centralDevice = [self getDeviceInfoByUniqueID:0];
NCMCPeerID* peerID = [[NCMCPeerID alloc]initWithDisplayName:centralDevice.name andIdentifier:centralDevice.identifier];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment