Add BleEndPoint for the Darwin platforms (#1660)
* Create a new BleConnectionDelegate interface for BleLayer * Add BlePlatformDelegate, BleApplicationDelegate, BleConnectionDelegate code to src/platform/Darwin The delegates use CoreBluetooth which, unlike Network, is not directly available as C++ headers. As a result the mentioned delegates are implemented using Objective-c++. * Enable BleLayer to be built for standalone-apps * Remove c++11 extension from src/platform/Darwin/CHIPPlatformConfig.h since it is unused and create a warning when using Objective-c++ * Remove conflicting define from src/platform/Darwin/BlePlatformConfig.h that override BLE_CONNECTION_OBJECT default type * Expose BleLayer via a new ConnectivityManager::GetBleLayer method * Add Transport::BLE to src/transport It is a first version that directly use ChipDeviceController for callbacks. Transport::BLE is referenced as a friend class of ChipDeviceController to access some private members that may be better not accessible. Hopefully this dependency will be removed at some point. The current code also uses BleLayer->NewBleConnection which directly creates a BLE_CONNECTION_OBJECT from a given device name. * Add a new ChipDeviceController::ConnectDevice API dedicated for Ble devices The current API takes a name instead of an IP and a Port. Once PeerAddress has a better support of Ble this particular ConnectDevice api and the previous one (which uses IP/port) should likely be removed by a new API that takes a PeerAddress directly. This will obviosuly only be possible if Transport::BLE uses the SessionManager instead of beeing directly instantiated from the ChipDeviceController * Add .m and .mm to the set of compiled files by config/standalone-app.mk * Add 'echo-ble' to the list of commands supported by examples/chip-tool The patch reformats a little bit chip-tool in order to allow other commands that does not rely on IP. * Use the new platform BLE support from the iOS app
Showing
- config/standalone/standalone-app.mk 2 additions, 0 deletionsconfig/standalone/standalone-app.mk
- config/standalone/standalone-chip.mk 5 additions, 1 deletionconfig/standalone/standalone-chip.mk
- configure.ac 5 additions, 0 deletionsconfigure.ac
- examples/chip-tool/Makefile 1 addition, 1 deletionexamples/chip-tool/Makefile
- examples/chip-tool/main.cpp 149 additions, 95 deletionsexamples/chip-tool/main.cpp
- src/ble/BUILD.gn 1 addition, 0 deletionssrc/ble/BUILD.gn
- src/ble/Ble.h 1 addition, 0 deletionssrc/ble/Ble.h
- src/ble/BleConnectionDelegate.h 60 additions, 0 deletionssrc/ble/BleConnectionDelegate.h
- src/ble/BleLayer.am 1 addition, 0 deletionssrc/ble/BleLayer.am
- src/ble/BleLayer.cpp 29 additions, 2 deletionssrc/ble/BleLayer.cpp
- src/ble/BleLayer.h 7 additions, 0 deletionssrc/ble/BleLayer.h
- src/controller/CHIPDeviceController.cpp 75 additions, 5 deletionssrc/controller/CHIPDeviceController.cpp
- src/controller/CHIPDeviceController.h 21 additions, 0 deletionssrc/controller/CHIPDeviceController.h
- src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj 0 additions, 6 deletionssrc/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj
- src/darwin/CHIPTool/CHIPTool/QRCode/BLEConnectionController.m 0 additions, 128 deletions...darwin/CHIPTool/CHIPTool/QRCode/BLEConnectionController.m
- src/darwin/CHIPTool/CHIPTool/QRCode/QRCodeViewController.h 2 additions, 6 deletionssrc/darwin/CHIPTool/CHIPTool/QRCode/QRCodeViewController.h
- src/darwin/CHIPTool/CHIPTool/QRCode/QRCodeViewController.m 2 additions, 3 deletionssrc/darwin/CHIPTool/CHIPTool/QRCode/QRCodeViewController.m
- src/darwin/Framework/CHIP.xcodeproj/project.pbxproj 29 additions, 5 deletionssrc/darwin/Framework/CHIP.xcodeproj/project.pbxproj
- src/darwin/Framework/CHIP/CHIPDeviceController.h 1 addition, 0 deletionssrc/darwin/Framework/CHIP/CHIPDeviceController.h
- src/darwin/Framework/CHIP/CHIPDeviceController.mm 30 additions, 0 deletionssrc/darwin/Framework/CHIP/CHIPDeviceController.mm
Loading
Please register or sign in to comment