mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Change "ios" package name to "apple" since its usage isn't limited to iOS
PiperOrigin-RevId: 497046967
This commit is contained in:
committed by
Copybara-Service
parent
504ab8aa82
commit
07998a05ed
+11
-11
@@ -390,8 +390,8 @@ let package = Package(
|
||||
"connections/samples",
|
||||
"docs",
|
||||
"internal/platform/implementation/g3",
|
||||
"internal/platform/implementation/ios/Tests",
|
||||
"internal/platform/implementation/ios/Mediums/Ble/Sockets/Tests",
|
||||
"internal/platform/implementation/apple/Tests",
|
||||
"internal/platform/implementation/apple/Mediums/Ble/Sockets/Tests",
|
||||
"internal/platform/implementation/windows",
|
||||
"third_party",
|
||||
"CONTRIBUTING.md",
|
||||
@@ -409,10 +409,10 @@ let package = Package(
|
||||
"internal/crypto/BUILD",
|
||||
"internal/crypto/BUILD.gn",
|
||||
"internal/platform/implementation/shared/BUILD",
|
||||
"internal/platform/implementation/ios/Mediums/BUILD",
|
||||
"internal/platform/implementation/ios/Mediums/Ble/Sockets/BUILD",
|
||||
"internal/platform/implementation/ios/Tests/BUILD",
|
||||
"internal/platform/implementation/ios/BUILD",
|
||||
"internal/platform/implementation/apple/Mediums/BUILD",
|
||||
"internal/platform/implementation/apple/Mediums/Ble/Sockets/BUILD",
|
||||
"internal/platform/implementation/apple/Tests/BUILD",
|
||||
"internal/platform/implementation/apple/BUILD",
|
||||
"internal/platform/implementation/BUILD",
|
||||
"internal/platform/BUILD",
|
||||
"internal/analytics/BUILD",
|
||||
@@ -505,11 +505,11 @@ let package = Package(
|
||||
"internal/platform/ble_test.cc",
|
||||
"internal/platform/ble_v2_test.cc",
|
||||
"internal/platform/prng_test.cc",
|
||||
"internal/platform/implementation/ios/count_down_latch_test.cc",
|
||||
"internal/platform/implementation/ios/condition_variable_test.cc",
|
||||
"internal/platform/implementation/ios/mutex_test.cc",
|
||||
"internal/platform/implementation/ios/atomic_boolean_test.cc",
|
||||
"internal/platform/implementation/ios/atomic_uint32_test.cc",
|
||||
"internal/platform/implementation/apple/count_down_latch_test.cc",
|
||||
"internal/platform/implementation/apple/condition_variable_test.cc",
|
||||
"internal/platform/implementation/apple/mutex_test.cc",
|
||||
"internal/platform/implementation/apple/atomic_boolean_test.cc",
|
||||
"internal/platform/implementation/apple/atomic_uint32_test.cc",
|
||||
"internal/platform/implementation/shared/file_test.cc",
|
||||
"internal/platform/atomic_boolean_test.cc",
|
||||
"internal/platform/exception_test.cc",
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ cc_library(
|
||||
visibility = [
|
||||
"//connections:__subpackages__",
|
||||
"//internal/analytics:__subpackages__",
|
||||
"//internal/platform/implementation/ios:__subpackages__",
|
||||
"//internal/platform/implementation/apple:__subpackages__",
|
||||
"//location/nearby/testing:__subpackages__",
|
||||
],
|
||||
deps = [
|
||||
|
||||
@@ -49,7 +49,7 @@ objc_library(
|
||||
deps = [
|
||||
"//connections:core",
|
||||
"//connections:core_types",
|
||||
"//internal/platform/implementation/ios:Platform",
|
||||
"//internal/platform/implementation/apple",
|
||||
"//third_party/apple_frameworks:Foundation",
|
||||
"//third_party/objective_c/google_toolbox_for_mac:GTM_Logger",
|
||||
"@com_google_absl//absl/functional:bind_front",
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "connections/params.h"
|
||||
#include "connections/status.h"
|
||||
#include "internal/platform/byte_array.h"
|
||||
#import "internal/platform/implementation/ios/utils.h"
|
||||
#import "internal/platform/implementation/apple/utils.h"
|
||||
#import "GoogleToolboxForMac/GTMLogger.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -16,17 +16,18 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#import "connections/clients/ios/Public/NearbyConnections/GNCConnection.h"
|
||||
#import "connections/clients/ios/Public/NearbyConnections/GNCPayload.h"
|
||||
#include "connections/core.h"
|
||||
#include "connections/payload.h"
|
||||
#include "internal/platform/exception.h"
|
||||
#include "internal/platform/file.h"
|
||||
#include "internal/platform/implementation/input_file.h"
|
||||
#import "internal/platform/implementation/ios/utils.h"
|
||||
#include "internal/platform/input_stream.h"
|
||||
#include "internal/platform/payload_id.h"
|
||||
|
||||
#import "connections/clients/ios/Public/NearbyConnections/GNCConnection.h"
|
||||
#import "connections/clients/ios/Public/NearbyConnections/GNCPayload.h"
|
||||
#import "internal/platform/implementation/apple/utils.h"
|
||||
|
||||
using ::location::nearby::ByteArrayFromNSData;
|
||||
using ::location::nearby::CppStringFromObjCString;
|
||||
using ::location::nearby::InputFile;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "connections/listeners.h"
|
||||
#include "connections/status.h"
|
||||
#include "internal/platform/byte_array.h"
|
||||
#import "internal/platform/implementation/ios/utils.h"
|
||||
#import "internal/platform/implementation/apple/utils.h"
|
||||
#import "GoogleToolboxForMac/GTMLogger.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "internal/platform/byte_array.h"
|
||||
#include "internal/platform/exception.h"
|
||||
#include "internal/platform/file.h"
|
||||
#include "internal/platform/implementation/ios/utils.h"
|
||||
#include "internal/platform/implementation/apple/utils.h"
|
||||
#include "internal/platform/input_stream.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -33,7 +33,7 @@ objc_library(
|
||||
"//connections:core",
|
||||
"//connections:core_types",
|
||||
"//internal/platform:base",
|
||||
"//internal/platform/implementation/ios:Platform", # buildcleaner: keep
|
||||
"//internal/platform/implementation/apple", # buildcleaner: keep
|
||||
"//third_party/apple_frameworks:Foundation",
|
||||
"//third_party/apple_frameworks:ObjectiveC",
|
||||
],
|
||||
|
||||
@@ -20,7 +20,7 @@ proto_library(
|
||||
"offline_wire_formats.proto",
|
||||
],
|
||||
visibility = [
|
||||
"//internal/platform/implementation/ios:__subpackages__",
|
||||
"//internal/platform/implementation/apple:__subpackages__",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
# Building Nearby on IOS
|
||||
|
||||
We do not yet support build from source. Instead a prebuilt library is provided. See [this link](https://github.com/google/nearby/blob/master/internal/platform/implementation/ios/Example/NearbyConnectionsExample/README.md) for a sample app using the prebuilt library.
|
||||
We do not yet support build from source. Instead a prebuilt library is provided. See [this link](https://github.com/google/nearby/blob/master/connections/samples/ios/NearbyConnectionsExample/README.md) for a sample app using the prebuilt library.
|
||||
|
||||
+3
-3
@@ -16,11 +16,11 @@ licenses(["notice"])
|
||||
package(default_visibility = [
|
||||
"//connections/clients/ios:__subpackages__",
|
||||
"//connections/clients/swift:__subpackages__",
|
||||
"//internal/platform/implementation/ios:__subpackages__",
|
||||
"//internal/platform/implementation/apple:__subpackages__",
|
||||
])
|
||||
|
||||
objc_library(
|
||||
name = "Platform",
|
||||
name = "apple",
|
||||
srcs = [
|
||||
"ble.mm",
|
||||
"bluetooth_adapter.mm",
|
||||
@@ -48,7 +48,7 @@ objc_library(
|
||||
":Shared",
|
||||
"//internal/platform/implementation:platform",
|
||||
"//internal/platform/implementation:types",
|
||||
"//internal/platform/implementation/ios/Mediums",
|
||||
"//internal/platform/implementation/apple/Mediums",
|
||||
"//internal/platform/implementation/shared:file",
|
||||
"//third_party/apple_frameworks:CoreBluetooth",
|
||||
"//third_party/apple_frameworks:CoreFoundation",
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/GNCUtils.h"
|
||||
#import "internal/platform/implementation/apple/GNCUtils.h"
|
||||
|
||||
#import <CommonCrypto/CommonDigest.h>
|
||||
|
||||
+5
-5
@@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
licenses(["notice"])
|
||||
|
||||
package(default_visibility = ["//internal/platform/implementation/ios:__subpackages__"])
|
||||
package(default_visibility = ["//internal/platform/implementation/apple:__subpackages__"])
|
||||
|
||||
objc_library(
|
||||
name = "Mediums",
|
||||
@@ -42,10 +42,10 @@ objc_library(
|
||||
"WifiLan/GNCMBonjourUtils.h",
|
||||
],
|
||||
deps = [
|
||||
"//internal/platform/implementation/ios:Shared",
|
||||
"//internal/platform/implementation/ios/Mediums/Ble/Sockets:Central",
|
||||
"//internal/platform/implementation/ios/Mediums/Ble/Sockets:Peripheral",
|
||||
"//internal/platform/implementation/ios/Mediums/Ble/Sockets:Shared",
|
||||
"//internal/platform/implementation/apple:Shared",
|
||||
"//internal/platform/implementation/apple/Mediums/Ble/Sockets:Central",
|
||||
"//internal/platform/implementation/apple/Mediums/Ble/Sockets:Peripheral",
|
||||
"//internal/platform/implementation/apple/Mediums/Ble/Sockets:Shared",
|
||||
"//proto/mediums:ble_frames_cc_proto",
|
||||
"//third_party/apple_frameworks:CoreBluetooth",
|
||||
"//third_party/apple_frameworks:Foundation",
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
#import <CoreBluetooth/CoreBluetooth.h>
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCMConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCMConnection.h"
|
||||
|
||||
@class CBUUID;
|
||||
|
||||
+6
-6
@@ -12,13 +12,13 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/GNCMBleCentral.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/GNCMBleCentral.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/GNCMBleConnection.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/GNCMBleUtils.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Central/GNSCentralManager.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Central/GNSCentralPeerManager.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCMConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/GNCMBleConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/GNCMBleUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Central/GNSCentralManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Central/GNSCentralPeerManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCMConnection.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCMConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCMConnection.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
+5
-5
@@ -12,12 +12,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/GNCMBleConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/GNCMBleConnection.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/GNCMBleUtils.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSSocket.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCLeaks.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCMConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/GNCMBleUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSSocket.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCLeaks.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCMConnection.h"
|
||||
#import "GoogleToolboxForMac/GTMLogger.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCMConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCMConnection.h"
|
||||
|
||||
@class CBCharacteristic;
|
||||
@class CBUUID;
|
||||
+7
-7
@@ -12,16 +12,16 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/GNCMBlePeripheral.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/GNCMBlePeripheral.h"
|
||||
|
||||
#import <CoreBluetooth/CoreBluetooth.h>
|
||||
|
||||
#import "internal/platform/implementation/ios/GNCUtils.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/GNCMBleConnection.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/GNCMBleUtils.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralManager.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralServiceManager.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCMConnection.h"
|
||||
#import "internal/platform/implementation/apple/GNCUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/GNCMBleConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/GNCMBleUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralServiceManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCMConnection.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
+3
-3
@@ -12,13 +12,13 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/GNCMBleUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/GNCMBleUtils.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#import "internal/platform/implementation/ios/GNCUtils.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSSocket.h"
|
||||
#import "internal/platform/implementation/apple/GNCUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSSocket.h"
|
||||
#include "proto/mediums/ble_frames.pb.h"
|
||||
#import "GoogleToolboxForMac/GTMLogger.h"
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Central/GNSCentralManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Central/GNSCentralManager.h"
|
||||
|
||||
#import <CoreBluetooth/CoreBluetooth.h>
|
||||
|
||||
+4
-4
@@ -12,11 +12,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Central/GNSCentralManager.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Central/GNSCentralManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Central/GNSCentralManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Central/GNSCentralManager+Private.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Central/GNSCentralPeerManager+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Central/GNSCentralPeerManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Central/GNSCentralPeerManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Central/GNSCentralPeerManager.h"
|
||||
#import "GoogleToolboxForMac/GTMLogger.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
+2
-2
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Central/GNSCentralPeerManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Central/GNSCentralPeerManager.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
+9
-9
@@ -12,16 +12,16 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Central/GNSCentralPeerManager.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Central/GNSCentralPeerManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Central/GNSCentralPeerManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Central/GNSCentralPeerManager+Private.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Central/GNSCentralManager+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Central/GNSCentralManager.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSSocket.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSUtils+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Central/GNSCentralManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Central/GNSCentralManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSSocket.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSUtils+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
#import "GoogleToolboxForMac/GTMLogger.h"
|
||||
|
||||
static const NSTimeInterval kMaxConnectionConfirmWaitTimeInSeconds = 2;
|
||||
+3
-3
@@ -12,6 +12,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Central/GNSCentralManager.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Central/GNSCentralPeerManager.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/GNSShared.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Central/GNSCentralManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Central/GNSCentralPeerManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/GNSShared.h"
|
||||
+3
-3
@@ -12,6 +12,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/GNSShared.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralManager.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralServiceManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/GNSShared.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralServiceManager.h"
|
||||
+2
-2
@@ -12,5 +12,5 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSSocket.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSSocket.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
+2
-2
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralManager.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
|
||||
@class GNSSocket;
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#import <CoreBluetooth/CoreBluetooth.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
|
||||
@class GNSPeripheralServiceManager;
|
||||
|
||||
+3
-3
@@ -12,10 +12,10 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralManager+Private.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralServiceManager+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralServiceManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "GoogleToolboxForMac/GTMLogger.h"
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
+2
-2
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralServiceManager.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralServiceManager.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
|
||||
typedef NS_ENUM(NSInteger, GNSBluetoothServiceState) {
|
||||
GNSBluetoothServiceStateNotAdded,
|
||||
+5
-5
@@ -12,12 +12,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralServiceManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralServiceManager+Private.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralManager+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Peripheral/GNSPeripheralManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
#import "GoogleToolboxForMac/GTMLogger.h"
|
||||
|
||||
// The Weave BLE protocol has only one valid version.
|
||||
+2
-2
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSSocket.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSSocket.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSUtils+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSUtils+Private.h"
|
||||
|
||||
@class GNSWeaveDataPacket;
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
|
||||
@class CBCentral;
|
||||
@class GNSPeripheralServiceManager;
|
||||
+2
-2
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
#import "GoogleToolboxForMac/GTMLogger.h"
|
||||
|
||||
typedef void (^GNSIncomingChunkReceivedBlock)(NSData *incomingData);
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSUtils+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSUtils+Private.h"
|
||||
|
||||
#import <CommonCrypto/CommonDigest.h>
|
||||
|
||||
+2
-2
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/Sockets/Source/Shared/GNSUtils+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/Sockets/Source/Shared/GNSUtils+Private.h"
|
||||
|
||||
// Constants defined by the Weave BLE protocol.
|
||||
const UInt8 kGNSMaxPacketCounterValue = 8;
|
||||
+2
-2
@@ -14,8 +14,8 @@
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Central/GNSCentralManager+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Central/GNSCentralPeerManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Central/GNSCentralManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Central/GNSCentralPeerManager+Private.h"
|
||||
#import "third_party/objective_c/ocmock/v3/Source/OCMock/OCMock.h"
|
||||
|
||||
@interface TestGNSCentralManager : GNSCentralManager
|
||||
+3
-3
@@ -14,9 +14,9 @@
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Central/GNSCentralManager+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Central/GNSCentralPeerManager+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Central/GNSCentralManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Central/GNSCentralPeerManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
#import "third_party/objective_c/ocmock/v3/Source/OCMock/OCMock.h"
|
||||
|
||||
static SEL gTimerSelector = nil;
|
||||
+3
-3
@@ -14,9 +14,9 @@
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Peripheral/GNSPeripheralManager+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Peripheral/GNSPeripheralServiceManager+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Peripheral/GNSPeripheralManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Peripheral/GNSPeripheralServiceManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "third_party/objective_c/ocmock/v3/Source/OCMock/OCMock.h"
|
||||
|
||||
@interface TestGNSPeripheralManager : GNSPeripheralManager
|
||||
+5
-5
@@ -14,11 +14,11 @@
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Peripheral/GNSPeripheralManager+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Peripheral/GNSPeripheralServiceManager+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Peripheral/GNSPeripheralManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Peripheral/GNSPeripheralServiceManager+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
#import "third_party/objective_c/ocmock/v3/Source/OCMock/OCMock.h"
|
||||
|
||||
@interface GNSPeripheralServiceManagerTest : XCTestCase {
|
||||
+2
-2
@@ -14,8 +14,8 @@
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Shared/GNSSocket+Private.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
#import "third_party/objective_c/ocmock/v3/Source/OCMock/OCMock.h"
|
||||
|
||||
@interface GNSSocketTest : XCTestCase {
|
||||
+2
-2
@@ -14,9 +14,9 @@
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Shared/GNSWeavePacket.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/ble/Sockets/Source/Shared/GNSUtils.h"
|
||||
|
||||
@interface GNSWeavePacketTest : XCTestCase {
|
||||
NSData *_largeNonEmptyData;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCLeaks.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCLeaks.h"
|
||||
|
||||
void GNCVerifyDealloc(id object, NSTimeInterval timeInterval) {
|
||||
#if DEBUG
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCMConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCMConnection.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCMConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCMConnection.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
+4
-4
@@ -12,11 +12,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/WifiLan/GNCMBonjourBrowser.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/WifiLan/GNCMBonjourBrowser.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCMConnection.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/WifiLan/GNCMBonjourConnection.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/WifiLan/GNCMBonjourUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCMConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/WifiLan/GNCMBonjourConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/WifiLan/GNCMBonjourUtils.h"
|
||||
#import "GoogleToolboxForMac/GTMLogger.h"
|
||||
|
||||
typedef NSString *GNCEndpointId;
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCMConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCMConnection.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
+2
-2
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/WifiLan/GNCMBonjourConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/WifiLan/GNCMBonjourConnection.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCMConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCMConnection.h"
|
||||
#import "GoogleToolboxForMac/GTMLogger.h"
|
||||
|
||||
enum { kMaxPacketSize = 32 * 1024 };
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCMConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCMConnection.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
+4
-4
@@ -12,11 +12,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/WifiLan/GNCMBonjourService.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/WifiLan/GNCMBonjourService.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCMConnection.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/WifiLan/GNCMBonjourConnection.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/WifiLan/GNCMBonjourUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCMConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/WifiLan/GNCMBonjourConnection.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/WifiLan/GNCMBonjourUtils.h"
|
||||
#import "GoogleToolboxForMac/GTMLogger.h"
|
||||
|
||||
@interface GNCMBonjourService () <NSNetServiceDelegate>
|
||||
+1
-1
@@ -12,6 +12,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/Mediums/WifiLan/GNCMBonjourUtils.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/WifiLan/GNCMBonjourUtils.h"
|
||||
|
||||
NSString *const GNCMBonjourDomain = @"local";
|
||||
+2
-2
@@ -31,8 +31,8 @@ objc_library(
|
||||
],
|
||||
features = ["-layering_check"],
|
||||
deps = [
|
||||
"//internal/platform/implementation/ios:Platform",
|
||||
"//internal/platform/implementation/ios:Shared",
|
||||
"//internal/platform/implementation/apple",
|
||||
"//internal/platform/implementation/apple:Shared",
|
||||
],
|
||||
)
|
||||
|
||||
+3
-2
@@ -13,8 +13,9 @@
|
||||
// limitations under the License.
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#include "internal/platform/implementation/ios/bluetooth_adapter.h"
|
||||
#include "internal/platform/implementation/apple/bluetooth_adapter.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
@@ -31,7 +32,7 @@ using ::location::nearby::api::ble_v2::BleAdvertisementData;
|
||||
using ::location::nearby::api::ble_v2::BleMedium;
|
||||
using ::location::nearby::api::ble_v2::GattCharacteristic;
|
||||
using ::location::nearby::api::ble_v2::TxPowerLevel;
|
||||
using IOSBluetoothAdapter = ::location::nearby::ios::BluetoothAdapter;
|
||||
using IOSBluetoothAdapter = ::location::nearby::apple::BluetoothAdapter;
|
||||
|
||||
static const char *const kAdvertisementString = "\x0a\x0b\x0c\x0d";
|
||||
static const TxPowerLevel kTxPowerLevel = TxPowerLevel::kHigh;
|
||||
+3
-3
@@ -16,12 +16,12 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "internal/platform/implementation/apple/bluetooth_adapter.h"
|
||||
#include "internal/platform/implementation/ble_v2.h"
|
||||
#include "internal/platform/implementation/bluetooth_adapter.h"
|
||||
#include "internal/platform/implementation/ios/bluetooth_adapter.h"
|
||||
|
||||
using ::location::nearby::ios::BlePeripheral;
|
||||
using ::location::nearby::ios::BluetoothAdapter;
|
||||
using ::location::nearby::apple::BlePeripheral;
|
||||
using ::location::nearby::apple::BluetoothAdapter;
|
||||
using ScanMode = ::location::nearby::api::BluetoothAdapter::ScanMode;
|
||||
using Status = ::location::nearby::api::BluetoothAdapter::Status;
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#include "internal/platform/byte_array.h"
|
||||
#include "internal/platform/implementation/ios/utils.h"
|
||||
#include "internal/platform/implementation/apple/utils.h"
|
||||
|
||||
using ::location::nearby::ByteArray;
|
||||
using ::location::nearby::ByteArrayFromNSData;
|
||||
+5
-5
@@ -12,8 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef PLATFORM_IMPL_IOS_ATOMIC_BOOLEAN_H_
|
||||
#define PLATFORM_IMPL_IOS_ATOMIC_BOOLEAN_H_
|
||||
#ifndef PLATFORM_IMPL_APPLE_ATOMIC_BOOLEAN_H_
|
||||
#define PLATFORM_IMPL_APPLE_ATOMIC_BOOLEAN_H_
|
||||
|
||||
#include <atomic>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
// Concrete AtomicBoolean implementation.
|
||||
class AtomicBoolean : public api::AtomicBoolean {
|
||||
@@ -39,8 +39,8 @@ class AtomicBoolean : public api::AtomicBoolean {
|
||||
std::atomic_bool value_;
|
||||
};
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
|
||||
#endif // PLATFORM_IMPL_IOS_ATOMIC_BOOLEAN_H_
|
||||
#endif // PLATFORM_IMPL_APPLE_ATOMIC_BOOLEAN_H_
|
||||
+3
-3
@@ -12,14 +12,14 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "internal/platform/implementation/ios/atomic_boolean.h"
|
||||
#include "internal/platform/implementation/apple/atomic_boolean.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "thread/fiber/fiber.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
namespace {
|
||||
|
||||
TEST(AtomicBooleanTest, SetOnSameThread) {
|
||||
@@ -73,6 +73,6 @@ TEST(AtomicBooleanTest, GetOnNewThread) {
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
+5
-5
@@ -12,8 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef PLATFORM_IMPL_IOS_ATOMIC_UINT32_H_
|
||||
#define PLATFORM_IMPL_IOS_ATOMIC_UINT32_H_
|
||||
#ifndef PLATFORM_IMPL_APPLE_ATOMIC_UINT32_H_
|
||||
#define PLATFORM_IMPL_APPLE_ATOMIC_UINT32_H_
|
||||
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
// Concrete AtomicUint32 implementation.
|
||||
class AtomicUint32 : public api::AtomicUint32 {
|
||||
@@ -40,8 +40,8 @@ class AtomicUint32 : public api::AtomicUint32 {
|
||||
std::atomic<std::uint32_t> value_;
|
||||
};
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
|
||||
#endif // PLATFORM_IMPL_IOS_ATOMIC_UINT32_H_
|
||||
#endif // PLATFORM_IMPL_APPLE_ATOMIC_UINT32_H_
|
||||
+3
-3
@@ -12,14 +12,14 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "internal/platform/implementation/ios/atomic_uint32.h"
|
||||
#include "internal/platform/implementation/apple/atomic_uint32.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "thread/fiber/fiber.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
namespace {
|
||||
|
||||
TEST(AtomicUint32Test, GetOnSameThread) {
|
||||
@@ -59,6 +59,6 @@ TEST(AtomicUint32Test, GetOnNewThread) {
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
+8
-7
@@ -12,8 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef THIRD_PARTY_NEARBY_INTERNAL_PLATFORM_IMPLEMENTATION_IOS_BLE_H_
|
||||
#define THIRD_PARTY_NEARBY_INTERNAL_PLATFORM_IMPLEMENTATION_IOS_BLE_H_
|
||||
#ifndef THIRD_PARTY_NEARBY_INTERNAL_PLATFORM_IMPLEMENTATION_APPLE_BLE_H_
|
||||
#define THIRD_PARTY_NEARBY_INTERNAL_PLATFORM_IMPLEMENTATION_APPLE_BLE_H_
|
||||
#ifdef __cplusplus
|
||||
|
||||
#import <CoreBluetooth/CoreBluetooth.h>
|
||||
@@ -23,16 +23,17 @@
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "internal/platform/cancellation_flag.h"
|
||||
#include "internal/platform/implementation/apple/bluetooth_adapter.h"
|
||||
#include "internal/platform/implementation/ble_v2.h"
|
||||
#include "internal/platform/implementation/bluetooth_adapter.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/GNCMConnection.h"
|
||||
#include "internal/platform/implementation/ios/bluetooth_adapter.h"
|
||||
|
||||
#import "internal/platform/implementation/apple/Mediums/GNCMConnection.h"
|
||||
|
||||
@class GNCMBlePeripheral, GNCMBleCentral;
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
/** InputStream that reads from GNCMConnection. */
|
||||
class BleInputStream : public InputStream {
|
||||
@@ -201,9 +202,9 @@ class BleMedium : public api::ble_v2::BleMedium {
|
||||
dispatch_queue_t callback_queue_;
|
||||
};
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
|
||||
#endif
|
||||
#endif // THIRD_PARTY_NEARBY_INTERNAL_PLATFORM_IMPLEMENTATION_IOS_BLE_H_
|
||||
#endif // THIRD_PARTY_NEARBY_INTERNAL_PLATFORM_IMPLEMENTATION_APPLE_BLE_H_
|
||||
+8
-7
@@ -12,22 +12,23 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/ble.h"
|
||||
#import "internal/platform/implementation/apple/ble.h"
|
||||
|
||||
#include <CoreBluetooth/CoreBluetooth.h>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "internal/platform/implementation/apple/bluetooth_adapter.h"
|
||||
#include "internal/platform/implementation/apple/utils.h"
|
||||
#include "internal/platform/implementation/ble_v2.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/GNCMBleCentral.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/GNCMBlePeripheral.h"
|
||||
#include "internal/platform/implementation/ios/bluetooth_adapter.h"
|
||||
#include "internal/platform/implementation/ios/utils.h"
|
||||
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/GNCMBleCentral.h"
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/GNCMBlePeripheral.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -590,6 +591,6 @@ void BleMedium::GattClient::Disconnect() {
|
||||
[central_ disconnectGattServiceWithPeripheralID:ObjCStringFromCppString(peripheral_id_)];
|
||||
}
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
+7
-6
@@ -12,19 +12,20 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef THIRD_PARTY_NEARBY_INTERNAL_PLATFORM_IMPLEMENTATION_IOS_BLUETOOTH_ADAPTER_H_
|
||||
#define THIRD_PARTY_NEARBY_INTERNAL_PLATFORM_IMPLEMENTATION_IOS_BLUETOOTH_ADAPTER_H_
|
||||
#ifndef THIRD_PARTY_NEARBY_INTERNAL_PLATFORM_IMPLEMENTATION_APPLE_BLUETOOTH_ADAPTER_H_
|
||||
#define THIRD_PARTY_NEARBY_INTERNAL_PLATFORM_IMPLEMENTATION_APPLE_BLUETOOTH_ADAPTER_H_
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "internal/platform/implementation/ble_v2.h"
|
||||
#include "internal/platform/implementation/bluetooth_adapter.h"
|
||||
#import "internal/platform/implementation/ios/Mediums/Ble/GNCMBleCentral.h"
|
||||
|
||||
#import "internal/platform/implementation/apple/Mediums/Ble/GNCMBleCentral.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
class BluetoothAdapter;
|
||||
|
||||
@@ -96,9 +97,9 @@ class BluetoothAdapter : public api::BluetoothAdapter {
|
||||
bool enabled_ = true;
|
||||
};
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
|
||||
#endif
|
||||
#endif // THIRD_PARTY_NEARBY_INTERNAL_PLATFORM_IMPLEMENTATION_IOS_BLUETOOTH_ADAPTER_H_
|
||||
#endif // THIRD_PARTY_NEARBY_INTERNAL_PLATFORM_IMPLEMENTATION_APPLE_BLUETOOTH_ADAPTER_H_
|
||||
+3
-3
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "internal/platform/implementation/ios/bluetooth_adapter.h"
|
||||
#include "internal/platform/implementation/apple/bluetooth_adapter.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
std::string BlePeripheral::GetAddress() const { return adapter_.GetMacAddress(); }
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
+4
-4
@@ -12,13 +12,13 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "internal/platform/implementation/ios/condition_variable.h"
|
||||
#include "internal/platform/implementation/apple/condition_variable.h"
|
||||
|
||||
#include "internal/platform/implementation/ios/mutex.h"
|
||||
#include "internal/platform/implementation/apple/mutex.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
Exception ConditionVariable::Wait() {
|
||||
condition_variable_.Wait(mutex_);
|
||||
@@ -32,6 +32,6 @@ Exception ConditionVariable::Wait(absl::Duration timeout) {
|
||||
|
||||
void ConditionVariable::Notify() { condition_variable_.SignalAll(); }
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
+7
-7
@@ -12,21 +12,21 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef PLATFORM_IMPL_IOS_CONDITION_VARIABLE_H_
|
||||
#define PLATFORM_IMPL_IOS_CONDITION_VARIABLE_H_
|
||||
#ifndef PLATFORM_IMPL_APPLE_CONDITION_VARIABLE_H_
|
||||
#define PLATFORM_IMPL_APPLE_CONDITION_VARIABLE_H_
|
||||
|
||||
#include "absl/synchronization/mutex.h"
|
||||
#include "internal/platform/implementation/condition_variable.h"
|
||||
#include "internal/platform/implementation/ios/mutex.h"
|
||||
#include "internal/platform/implementation/apple/mutex.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
// Concrete ConditionVariable implementation.
|
||||
class ConditionVariable : public api::ConditionVariable {
|
||||
public:
|
||||
explicit ConditionVariable(ios::Mutex* mutex) : mutex_(&mutex->mutex_) {}
|
||||
explicit ConditionVariable(apple::Mutex* mutex) : mutex_(&mutex->mutex_) {}
|
||||
~ConditionVariable() override = default;
|
||||
|
||||
ConditionVariable(const ConditionVariable&) = delete;
|
||||
@@ -41,8 +41,8 @@ class ConditionVariable : public api::ConditionVariable {
|
||||
absl::CondVar condition_variable_;
|
||||
};
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
|
||||
#endif // PLATFORM_IMPL_IOS_CONDITION_VARIABLE_H_
|
||||
#endif // PLATFORM_IMPL_APPLE_CONDITION_VARIABLE_H_
|
||||
+4
-4
@@ -12,16 +12,16 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "internal/platform/implementation/ios/condition_variable.h"
|
||||
#include "internal/platform/implementation/apple/condition_variable.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/time/clock.h"
|
||||
#include "internal/platform/implementation/ios/mutex.h"
|
||||
#include "internal/platform/implementation/apple/mutex.h"
|
||||
#include "thread/fiber/fiber.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
namespace {
|
||||
|
||||
TEST(ConditionVariableTest, CanCreate) {
|
||||
@@ -79,6 +79,6 @@ TEST(ConditionVariableTest, WaitTerminatesOnTimeoutWithoutNotify) {
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
+3
-3
@@ -12,11 +12,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "internal/platform/implementation/ios/count_down_latch.h"
|
||||
#include "internal/platform/implementation/apple/count_down_latch.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
Exception CountDownLatch::Await() {
|
||||
absl::MutexLock lock(&mutex_, absl::Condition(IsZeroOrNegative, &count_));
|
||||
@@ -35,6 +35,6 @@ void CountDownLatch::CountDown() {
|
||||
count_--;
|
||||
}
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
+5
-5
@@ -12,15 +12,15 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef PLATFORM_IMPL_IOS_COUNT_DOWN_LATCH_H_
|
||||
#define PLATFORM_IMPL_IOS_COUNT_DOWN_LATCH_H_
|
||||
#ifndef PLATFORM_IMPL_APPLE_COUNT_DOWN_LATCH_H_
|
||||
#define PLATFORM_IMPL_APPLE_COUNT_DOWN_LATCH_H_
|
||||
|
||||
#include "absl/synchronization/mutex.h"
|
||||
#include "internal/platform/implementation/count_down_latch.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
// Concrete CountDownLatch implementation.
|
||||
class CountDownLatch : public api::CountDownLatch {
|
||||
@@ -42,8 +42,8 @@ class CountDownLatch : public api::CountDownLatch {
|
||||
int count_ ABSL_GUARDED_BY(mutex_);
|
||||
};
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
|
||||
#endif // PLATFORM_IMPL_IOS_COUNT_DOWN_LATCH_H_
|
||||
#endif // PLATFORM_IMPL_APPLE_COUNT_DOWN_LATCH_H_
|
||||
+3
-3
@@ -12,14 +12,14 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "internal/platform/implementation/ios/count_down_latch.h"
|
||||
#include "internal/platform/implementation/apple/count_down_latch.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "thread/fiber/fiber.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
namespace {
|
||||
|
||||
TEST(CountDownLatchTest, LatchAwaitCanWait) {
|
||||
@@ -78,6 +78,6 @@ TEST(CountDownLatchTest, InitialCountNegative_AwaitDoesNotBlock) {
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
+2
-2
@@ -15,8 +15,8 @@
|
||||
#include "internal/platform/implementation/crypto.h"
|
||||
|
||||
#import "absl/strings/string_view.h"
|
||||
#import "internal/platform/implementation/ios/GNCUtils.h"
|
||||
#import "internal/platform/implementation/ios/utils.h"
|
||||
#import "internal/platform/implementation/apple/GNCUtils.h"
|
||||
#import "internal/platform/implementation/apple/utils.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
+5
-5
@@ -12,8 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef PLATFORM_IMPL_IOS_LOG_MESSAGE_H_
|
||||
#define PLATFORM_IMPL_IOS_LOG_MESSAGE_H_
|
||||
#ifndef PLATFORM_IMPL_APPLE_LOG_MESSAGE_H_
|
||||
#define PLATFORM_IMPL_APPLE_LOG_MESSAGE_H_
|
||||
#ifdef __cplusplus
|
||||
|
||||
#ifdef NEARBY_SWIFTPM
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
// Concrete LogMessage implementation
|
||||
class LogMessage : public api::LogMessage {
|
||||
@@ -49,9 +49,9 @@ class LogMessage : public api::LogMessage {
|
||||
api::LogMessage::Severity severity_;
|
||||
};
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
|
||||
#endif
|
||||
#endif // IPHONE_SHARED_NEARBY_CONNECTIONS_SOURCE_PLATFORM_LOG_MESSAGE_H_
|
||||
#endif // PLATFORM_IMPL_APPLE_LOG_MESSAGE_H_
|
||||
+4
-4
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "internal/platform/implementation/ios/log_message.h"
|
||||
#include "internal/platform/implementation/apple/log_message.h"
|
||||
|
||||
#ifndef NEARBY_SWIFTPM
|
||||
#include "glog/logging.h"
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
api::LogMessage::Severity gMinLogSeverity = api::LogMessage::Severity::kInfo;
|
||||
|
||||
@@ -78,12 +78,12 @@ std::ostream& LogMessage::Stream() { return log_streamer_; }
|
||||
std::ostream& LogMessage::Stream() { return log_streamer_.stream(); }
|
||||
#endif
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
|
||||
namespace api {
|
||||
|
||||
// static
|
||||
void LogMessage::SetMinLogSeverity(Severity severity) { ios::gMinLogSeverity = severity; }
|
||||
void LogMessage::SetMinLogSeverity(Severity severity) { apple::gMinLogSeverity = severity; }
|
||||
|
||||
// static
|
||||
bool LogMessage::ShouldCreateLogMessage(Severity severity) {
|
||||
+6
-6
@@ -12,17 +12,17 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef PLATFORM_IMPL_IOS_MULTI_THREAD_EXECUTOR_H_
|
||||
#define PLATFORM_IMPL_IOS_MULTI_THREAD_EXECUTOR_H_
|
||||
#ifndef PLATFORM_IMPL_APPLE_MULTI_THREAD_EXECUTOR_H_
|
||||
#define PLATFORM_IMPL_APPLE_MULTI_THREAD_EXECUTOR_H_
|
||||
#ifdef __cplusplus
|
||||
|
||||
#import "internal/platform/implementation/ios/scheduled_executor.h"
|
||||
#import "internal/platform/implementation/apple/scheduled_executor.h"
|
||||
#include "internal/platform/implementation/submittable_executor.h"
|
||||
#import "internal/platform/runnable.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
class MultiThreadExecutor : public api::SubmittableExecutor {
|
||||
public:
|
||||
@@ -41,9 +41,9 @@ class MultiThreadExecutor : public api::SubmittableExecutor {
|
||||
std::unique_ptr<ScheduledExecutor> scheduled_executor_;
|
||||
};
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
|
||||
#endif
|
||||
#endif // PLATFORM_IMPL_IOS_MULTI_THREAD_EXECUTOR_H_
|
||||
#endif // PLATFORM_IMPL_APPLE_MULTI_THREAD_EXECUTOR_H_
|
||||
+4
-4
@@ -12,14 +12,14 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/multi_thread_executor.h"
|
||||
#import "internal/platform/implementation/apple/multi_thread_executor.h"
|
||||
|
||||
#import "internal/platform/implementation/ios/scheduled_executor.h"
|
||||
#import "internal/platform/implementation/apple/scheduled_executor.h"
|
||||
#include "internal/platform/runnable.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
MultiThreadExecutor::MultiThreadExecutor(int max_concurrency) {
|
||||
scheduled_executor_ = std::make_unique<ScheduledExecutor>(max_concurrency);
|
||||
@@ -35,6 +35,6 @@ bool MultiThreadExecutor::DoSubmit(Runnable&& runnable) {
|
||||
return scheduled_executor_->DoSubmit(std::move(runnable));
|
||||
}
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
+5
-5
@@ -12,15 +12,15 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef PLATFORM_IMPL_IOS_MUTEX_H_
|
||||
#define PLATFORM_IMPL_IOS_MUTEX_H_
|
||||
#ifndef PLATFORM_IMPL_APPLE_MUTEX_H_
|
||||
#define PLATFORM_IMPL_APPLE_MUTEX_H_
|
||||
|
||||
#include "absl/synchronization/mutex.h"
|
||||
#include "internal/platform/implementation/mutex.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
// Concrete Mutex implementation.
|
||||
class ABSL_LOCKABLE Mutex : public api::Mutex {
|
||||
@@ -77,8 +77,8 @@ class ABSL_LOCKABLE RecursiveMutex : public api::Mutex {
|
||||
absl::Mutex mutex_;
|
||||
};
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
|
||||
#endif // PLATFORM_IMPL_IOS_MUTEX_H_
|
||||
#endif // PLATFORM_IMPL_APPLE_MUTEX_H_
|
||||
+3
-3
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "internal/platform/implementation/ios/mutex.h"
|
||||
#include "internal/platform/implementation/apple/mutex.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/synchronization/mutex.h"
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
namespace {
|
||||
|
||||
static const absl::Duration kTimeToWait = absl::Milliseconds(500);
|
||||
@@ -87,6 +87,6 @@ TEST(MutexTest, RecursiveLockingForNestedWorks) {
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
+26
-26
@@ -16,18 +16,18 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "internal/platform/implementation/ios/atomic_boolean.h"
|
||||
#include "internal/platform/implementation/ios/atomic_uint32.h"
|
||||
#include "internal/platform/implementation/ios/ble.h"
|
||||
#include "internal/platform/implementation/ios/condition_variable.h"
|
||||
#include "internal/platform/implementation/ios/count_down_latch.h"
|
||||
#import "internal/platform/implementation/ios/log_message.h"
|
||||
#import "internal/platform/implementation/ios/multi_thread_executor.h"
|
||||
#include "internal/platform/implementation/ios/mutex.h"
|
||||
#import "internal/platform/implementation/ios/scheduled_executor.h"
|
||||
#import "internal/platform/implementation/ios/single_thread_executor.h"
|
||||
#import "internal/platform/implementation/ios/utils.h"
|
||||
#include "internal/platform/implementation/ios/wifi_lan.h"
|
||||
#include "internal/platform/implementation/apple/atomic_boolean.h"
|
||||
#include "internal/platform/implementation/apple/atomic_uint32.h"
|
||||
#include "internal/platform/implementation/apple/ble.h"
|
||||
#include "internal/platform/implementation/apple/condition_variable.h"
|
||||
#include "internal/platform/implementation/apple/count_down_latch.h"
|
||||
#import "internal/platform/implementation/apple/log_message.h"
|
||||
#import "internal/platform/implementation/apple/multi_thread_executor.h"
|
||||
#include "internal/platform/implementation/apple/mutex.h"
|
||||
#import "internal/platform/implementation/apple/scheduled_executor.h"
|
||||
#import "internal/platform/implementation/apple/single_thread_executor.h"
|
||||
#import "internal/platform/implementation/apple/utils.h"
|
||||
#include "internal/platform/implementation/apple/wifi_lan.h"
|
||||
#include "internal/platform/implementation/mutex.h"
|
||||
#include "internal/platform/implementation/shared/file.h"
|
||||
#include "internal/platform/payload_id.h"
|
||||
@@ -64,30 +64,30 @@ OSName ImplementationPlatform::GetCurrentOS() { return OSName::kiOS; }
|
||||
|
||||
// Atomics:
|
||||
std::unique_ptr<AtomicBoolean> ImplementationPlatform::CreateAtomicBoolean(bool initial_value) {
|
||||
return std::make_unique<ios::AtomicBoolean>(initial_value);
|
||||
return std::make_unique<apple::AtomicBoolean>(initial_value);
|
||||
}
|
||||
|
||||
std::unique_ptr<AtomicUint32> ImplementationPlatform::CreateAtomicUint32(
|
||||
std::uint32_t initial_value) {
|
||||
return std::make_unique<ios::AtomicUint32>(initial_value);
|
||||
return std::make_unique<apple::AtomicUint32>(initial_value);
|
||||
}
|
||||
|
||||
std::unique_ptr<CountDownLatch> ImplementationPlatform::CreateCountDownLatch(std::int32_t count) {
|
||||
return std::make_unique<ios::CountDownLatch>(count);
|
||||
return std::make_unique<apple::CountDownLatch>(count);
|
||||
}
|
||||
|
||||
std::unique_ptr<Mutex> ImplementationPlatform::CreateMutex(Mutex::Mode mode) {
|
||||
// iOS does not support unchecked Mutex in debug mode, therefore
|
||||
// ios::Mutex is used for both kRegular and kRegularNoCheck.
|
||||
// apple::Mutex is used for both kRegular and kRegularNoCheck.
|
||||
if (mode == Mutex::Mode::kRecursive) {
|
||||
return std::make_unique<ios::RecursiveMutex>();
|
||||
return std::make_unique<apple::RecursiveMutex>();
|
||||
} else {
|
||||
return std::make_unique<ios::Mutex>();
|
||||
return std::make_unique<apple::Mutex>();
|
||||
}
|
||||
}
|
||||
|
||||
std::unique_ptr<ConditionVariable> ImplementationPlatform::CreateConditionVariable(Mutex* mutex) {
|
||||
return std::make_unique<ios::ConditionVariable>(static_cast<ios::Mutex*>(mutex));
|
||||
return std::make_unique<apple::ConditionVariable>(static_cast<apple::Mutex*>(mutex));
|
||||
}
|
||||
|
||||
ABSL_DEPRECATED("This interface will be deleted in the near future.")
|
||||
@@ -112,26 +112,26 @@ std::unique_ptr<OutputFile> ImplementationPlatform::CreateOutputFile(const std::
|
||||
|
||||
std::unique_ptr<LogMessage> ImplementationPlatform::CreateLogMessage(
|
||||
const char* file, int line, LogMessage::Severity severity) {
|
||||
return std::make_unique<ios::LogMessage>(file, line, severity);
|
||||
return std::make_unique<apple::LogMessage>(file, line, severity);
|
||||
}
|
||||
|
||||
// Java-like Executors
|
||||
std::unique_ptr<SubmittableExecutor> ImplementationPlatform::CreateSingleThreadExecutor() {
|
||||
return std::make_unique<ios::SingleThreadExecutor>();
|
||||
return std::make_unique<apple::SingleThreadExecutor>();
|
||||
}
|
||||
|
||||
std::unique_ptr<SubmittableExecutor> ImplementationPlatform::CreateMultiThreadExecutor(
|
||||
int max_concurrency) {
|
||||
return std::make_unique<ios::MultiThreadExecutor>(max_concurrency);
|
||||
return std::make_unique<apple::MultiThreadExecutor>(max_concurrency);
|
||||
}
|
||||
|
||||
std::unique_ptr<ScheduledExecutor> ImplementationPlatform::CreateScheduledExecutor() {
|
||||
return std::make_unique<ios::ScheduledExecutor>();
|
||||
return std::make_unique<apple::ScheduledExecutor>();
|
||||
}
|
||||
|
||||
// Mediums
|
||||
std::unique_ptr<BluetoothAdapter> ImplementationPlatform::CreateBluetoothAdapter() {
|
||||
return std::make_unique<ios::BluetoothAdapter>();
|
||||
return std::make_unique<apple::BluetoothAdapter>();
|
||||
}
|
||||
|
||||
std::unique_ptr<BluetoothClassicMedium> ImplementationPlatform::CreateBluetoothClassicMedium(
|
||||
@@ -145,7 +145,7 @@ std::unique_ptr<BleMedium> ImplementationPlatform::CreateBleMedium(api::Bluetoot
|
||||
|
||||
std::unique_ptr<ble_v2::BleMedium> ImplementationPlatform::CreateBleV2Medium(
|
||||
api::BluetoothAdapter& adapter) {
|
||||
return std::make_unique<ios::BleMedium>(adapter);
|
||||
return std::make_unique<apple::BleMedium>(adapter);
|
||||
}
|
||||
|
||||
std::unique_ptr<ServerSyncMedium> ImplementationPlatform::CreateServerSyncMedium() {
|
||||
@@ -155,7 +155,7 @@ std::unique_ptr<ServerSyncMedium> ImplementationPlatform::CreateServerSyncMedium
|
||||
std::unique_ptr<WifiMedium> ImplementationPlatform::CreateWifiMedium() { return nullptr; }
|
||||
|
||||
std::unique_ptr<WifiLanMedium> ImplementationPlatform::CreateWifiLanMedium() {
|
||||
return std::make_unique<ios::WifiLanMedium>();
|
||||
return std::make_unique<apple::WifiLanMedium>();
|
||||
}
|
||||
|
||||
std::unique_ptr<WifiHotspotMedium> ImplementationPlatform::CreateWifiHotspotMedium() {
|
||||
+5
-5
@@ -12,8 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef PLATFORM_IMPL_IOS_SCHEDULED_EXECUTOR_H_
|
||||
#define PLATFORM_IMPL_IOS_SCHEDULED_EXECUTOR_H_
|
||||
#ifndef PLATFORM_IMPL_APPLE_SCHEDULED_EXECUTOR_H_
|
||||
#define PLATFORM_IMPL_APPLE_SCHEDULED_EXECUTOR_H_
|
||||
#ifdef __cplusplus
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
// Concrete ScheduledExecutor implementation.
|
||||
class ScheduledExecutor : public api::ScheduledExecutor {
|
||||
@@ -62,9 +62,9 @@ class ScheduledExecutor : public api::ScheduledExecutor {
|
||||
GNCOperationQueueImpl* impl_;
|
||||
};
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
|
||||
#endif
|
||||
#endif // PLATFORM_IMPL_IOS_SCHEDULED_EXECUTOR_H_
|
||||
#endif // PLATFORM_IMPL_APPLE_SCHEDULED_EXECUTOR_H_
|
||||
+8
-6
@@ -12,12 +12,14 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/scheduled_executor.h"
|
||||
#import "internal/platform/implementation/apple/scheduled_executor.h"
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "absl/time/time.h"
|
||||
#import "internal/platform/implementation/ios/atomic_boolean.h"
|
||||
#import "internal/platform/implementation/apple/atomic_boolean.h"
|
||||
#include "internal/platform/runnable.h"
|
||||
|
||||
// This wraps the C++ Runnable in an Obj-C object for memory management. It is retained by the
|
||||
@@ -25,7 +27,7 @@
|
||||
@interface GNCRunnableWrapper : NSObject {
|
||||
@public
|
||||
location::nearby::Runnable _runnable;
|
||||
std::unique_ptr<location::nearby::ios::AtomicBoolean> _canceled;
|
||||
std::unique_ptr<location::nearby::apple::AtomicBoolean> _canceled;
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -34,7 +36,7 @@
|
||||
+ (instancetype)wrapperWithRunnable:(location::nearby::Runnable)runnable {
|
||||
GNCRunnableWrapper *wrapper = [[GNCRunnableWrapper alloc] init];
|
||||
wrapper->_runnable = runnable;
|
||||
wrapper->_canceled = std::make_unique<location::nearby::ios::AtomicBoolean>(false);
|
||||
wrapper->_canceled = std::make_unique<location::nearby::apple::AtomicBoolean>(false);
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@@ -53,7 +55,7 @@
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
static const std::int64_t kExecutorShutdownDefaultTimeout = 500; // 0.5 seconds
|
||||
|
||||
@@ -139,6 +141,6 @@ void ScheduledExecutor::Shutdown(std::int64_t timeout_millis) {
|
||||
dispatch_group_wait(group, dispatch_time(DISPATCH_TIME_NOW, timeout_millis * NSEC_PER_MSEC));
|
||||
}
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
+6
-6
@@ -12,15 +12,15 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef PLATFORM_IMPL_IOS_SINGLE_THREAD_EXECUTOR_H_
|
||||
#define PLATFORM_IMPL_IOS_SINGLE_THREAD_EXECUTOR_H_
|
||||
#ifndef PLATFORM_IMPL_APPLE_SINGLE_THREAD_EXECUTOR_H_
|
||||
#define PLATFORM_IMPL_APPLE_SINGLE_THREAD_EXECUTOR_H_
|
||||
#ifdef __cplusplus
|
||||
|
||||
#import "internal/platform/implementation/ios/multi_thread_executor.h"
|
||||
#import "internal/platform/implementation/apple/multi_thread_executor.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace ios {
|
||||
namespace apple {
|
||||
|
||||
class SingleThreadExecutor : public MultiThreadExecutor {
|
||||
public:
|
||||
@@ -28,9 +28,9 @@ class SingleThreadExecutor : public MultiThreadExecutor {
|
||||
~SingleThreadExecutor() override = default;
|
||||
};
|
||||
|
||||
} // namespace ios
|
||||
} // namespace apple
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
|
||||
#endif
|
||||
#endif // PLATFORM_IMPL_IOS_SINGLE_THREAD_EXECUTOR_H_
|
||||
#endif // PLATFORM_IMPL_APPLE_SINGLE_THREAD_EXECUTOR_H_
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#import "internal/platform/implementation/ios/utils.h"
|
||||
#import "internal/platform/implementation/apple/utils.h"
|
||||
|
||||
#import "absl/container/flat_hash_map.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user