Commit Graph
68 Commits
Author SHA1 Message Date
hai007 d09f53a40b Unit test for WIFI Hotspot in BWU layer
PiperOrigin-RevId: 445437919
2022-04-29 09:29:59 -07:00
hai007 aeff3a9683 Change build target visibility for testing.
PiperOrigin-RevId: 445051381
2022-04-27 21:28:29 -07:00
hai007 8e80ee097a Unit test for WIFI Hotspot in Connection Medium layer
Fix 230126796: go/tsan error (data_race) found while running //third_party/nearby/internal/platform:public_test

PiperOrigin-RevId: 444788086
2022-04-27 01:21:23 -07:00
hai007 ec2d3ae1aa WIFI Hotspot implementation (4)
Part 4: BWU and client interface part

PiperOrigin-RevId: 443700883
2022-04-22 10:32:12 -07:00
hai007 60e896ad37 Implementation g3 medium/Environment/platform layer unit test for WIFI Hotspot
PiperOrigin-RevId: 443304661
2022-04-21 01:09:38 -07:00
jfcarroll 6fc5b64605 Flattening payload and listeners
PiperOrigin-RevId: 443168939
2022-04-20 12:55:23 -07:00
nohle 53a1d13496 [NC] Remove spammy AnalyticsRecorder log
If the platform (e.g., ChromeOS) doesn't provide an EventLogger, this WARNING is logged for nearly every Nearby Connections method.

PiperOrigin-RevId: 442539723
2022-04-18 07:42:45 -07:00
nohle 98a5b9d0ee [Nearby Connections][C++] Track bandwidth upgrade mediums for each endpoint (4/4 unit tests)
Add unit tests for BaseBwuHandler and BwuManager (BWU initiation only). Add fake classes and helper methods needed for testing. Refine comments and logs.

PiperOrigin-RevId: 442021842
2022-04-15 08:33:21 -07:00
nohle e5fb3a8f11 [Nearby Connections][C++] Track bandwidth upgrade mediums for each endpoint (3/4)
* Fix bandwidth upgrade service ID usage. For instance, no longer use the inaccurate service ID from ClientProxy.
* Add more fine-grained upgraded endpoint tracking using both service IDs and endpoint IDs
* Only "revert" bandwidth-upgrade mediums--for example, stop accepting connections on a server socket--for a service when the last endpoint for that service is finished.

These changes are necessary to support multiple services (e.g., Nearby Share and Phone Hub) and multiple mediums (e.g., WebRTC and WLAN).

PiperOrigin-RevId: 442021257
2022-04-15 08:29:41 -07:00
hai007 93f203dc0b WIFI Hotspot implementation (3)
Part 3: WIFI Hotspot platform code for Windows

PiperOrigin-RevId: 441826092
2022-04-14 12:31:07 -07:00
eidenkim 3f81504dc1 Nearby Connections - Fixed crash when starting the app on devices with no Bluetooth adapter
PiperOrigin-RevId: 441773811
2022-04-14 08:59:23 -07:00
hai007 530a6faeca Change copts include patch from relative path to full path for "impl_test"
PiperOrigin-RevId: 441529218
2022-04-13 11:13:00 -07:00
jfcarroll 2dca231337 This fixes the memory issues in bluetooth_adapter.cc
PiperOrigin-RevId: 441012332
2022-04-11 15:30:06 -07:00
edwinwu a6f4bb9c04 [iOS NC] LSC: Separate third_party/nearby/internal/platform/implementation/ios to
- third_party/nearby/internal/platform/implementation/ios (for platform)
- third_party/nearby/connections/clients/ios (for connections)
- third_party/nearby/connections/samples/ios (for sample codes)

PiperOrigin-RevId: 440895852
2022-04-11 08:19:27 -07:00
edwinwu fcb3b27314 BEGIN_PUBLIC
[iOS] Fixes the file_path is empty when "CreateIncomingInternalPayload" in internal_payload_factory. If empty then use the payload_id for the file_name.
END_PUBLIC

- This is for the way iOS -> Android file transfer.
- CC_MD5 is deprecated in iOS13, change to CC_SHA256
- UIImageWriteToSavedPhotosAlbum, the UIImage* is nil after completion callback to the selector "didFinishSavingWithError". Changes to show image by "showReceivedImage" after write to Photo album.
- "NSDownloadsDirectory" seems have
<<Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “Downloads” in the folder>>. Changes to use "NSTempDirectory".

PiperOrigin-RevId: 440808267
2022-04-11 00:18:05 -07:00
edwinwu 0c8838ad9b Deprecates the InputFile with PayloadId and replace the one with file path.
PiperOrigin-RevId: 440516892
2022-04-08 21:44:01 -07:00
hai007 43a165e418 WIFI Hotspot implementation (1)
Part 1: Internal common code

PiperOrigin-RevId: 440437253
2022-04-08 13:18:47 -07:00
hai007 6b3402ccd0 Disable layering check for objc_library
In preparation for enabling layering check by default for
objc_library, we are disabling layering check for any targets or
packages that would otherwise fail.

PiperOrigin-RevId: 439900062
2022-04-06 12:01:37 -07:00
suetfei 607cf4be72 Delete connections_log.pb.h 2022-04-05 09:52:55 -07:00
suetfei e372d2166a Delete connections_log.pb.cc 2022-04-05 09:52:45 -07:00
bourdakos 9429d0f383 In the connection initiated handler, return endpoint info as NSData instead of casting to a String
PiperOrigin-RevId: 439382816
2022-04-04 12:28:17 -07:00
edwinwu 0747c0a349 [BLE Refactor] Tune BleAdvertisement, BleAdvertisementHeader, BlePeripheral, AdvertisementReadResult, BleUtils.
PiperOrigin-RevId: 439365106
2022-04-04 11:19:24 -07:00
suetfei 7f9f5e2913 Create connections_log.pb.h 2022-04-04 00:46:39 -07:00
suetfei 72d6b75391 Create connections_log.pb.cc 2022-04-04 00:42:02 -07:00
jfcarroll 9470516984 Refactored the executor test testing a single threaded executor with mulitple tasks. I pulled the main
thread out of the array, and assigned it to it's own local var. I think this simplify's the test
making it more amenable to debugging. We are having flakiness in the iOS version of this test, so this is intended to make it absolutely clear what we are testing.

PiperOrigin-RevId: 438897634
2022-04-01 13:29:47 -07:00
suetfei e6752f3348 Update README for iOS & macOS Build.
PiperOrigin-RevId: 438758043
2022-04-01 00:43:03 -07:00
deling-google 1f7ad3b553 Add protos and headers 2022-03-31 12:44:50 -07:00
bourdakos 0f8c1b1fbe Move public headers to be compatible with SPM
PiperOrigin-RevId: 438583798
2022-03-31 09:16:17 -07:00
bourdakos a4feafd4f8 Fix a few struct initializers that are not compatible with c++14
PiperOrigin-RevId: 438565404
2022-03-31 07:44:24 -07:00
bourdakos 7c4bb693b5 Return the actual download path instead of tmp directory
PiperOrigin-RevId: 438464501
2022-03-30 20:26:26 -07:00
bourdakos 4e1c8c8222 Don't include base/logging.h for SPM builds
PiperOrigin-RevId: 438453534
2022-03-30 19:11:34 -07:00
bourdakos 267afabefd Escape file paths to avoid crashes when paths include spaces
PiperOrigin-RevId: 438437189
2022-03-30 17:26:43 -07:00
edwinwu 190d3ebafc [BLE Refactor] Impl Start/Stop Scanning and DiscoveredPeripheral callback function in medium layer and ScanCallback in platform layer.
PiperOrigin-RevId: 438293171
2022-03-30 07:08:05 -07:00
bourdakos 15d3fa0df5 Put CreateWebRtcMedium behind NO_WEBRTC flag
PiperOrigin-RevId: 437864516
2022-03-28 15:07:30 -07:00
bourdakos 6050084473 BEGIN_PUBLIC
Remove GTMStringEncoding dependency, because it is unused
END_PUBLIC

PiperOrigin-RevId: 437854852
2022-03-28 14:27:33 -07:00
hais c1e898bcf1 Initial impl for PresenceClient
PiperOrigin-RevId: 437370707
2022-03-25 17:37:25 -07:00
jfcarroll f4b80ccb59 These are the changes for Payload::Type => PayloadType for the flattening CL
PiperOrigin-RevId: 436767666
2022-03-23 10:11:15 -07:00
jfcarroll 517d77f5aa This adds parent path and file name to the Payload constructor. This will affect chrome.
PiperOrigin-RevId: 435223740
2022-03-16 19:18:13 -07:00
guogang 31b2aae6c5 Fixed crashes during bandwidth upgrade
PiperOrigin-RevId: 435192352
2022-03-16 16:36:09 -07:00
eidenkim 2b5c99df70 Refactor Nearby Connections Service layer in Nearby Sharing Service
PiperOrigin-RevId: 434850962
2022-03-15 14:06:26 -07:00
hai007 9239fb0767 Update connections_log.proto
PiperOrigin-RevId: 433386097
2022-03-08 21:17:00 -08:00
edwinwu 66b425dc4e [BLE Refactor] Impl Start/Stop AdvertisementGattServer
PiperOrigin-RevId: 432657453
2022-03-05 08:33:01 -08:00
hai007 eadc972af3 Fix BWU crash problem because WIFI_LAN create socket based on IPV6.
PiperOrigin-RevId: 432222945
2022-03-03 10:16:22 -08:00
edwinwu 91dfdefb9f [BLE Refactor] Impl Start/Stop Advertising function in medium layer.
PiperOrigin-RevId: 432185275
2022-03-03 07:04:32 -08:00
guogang e0bb166c62 Use 4 bytes string as IP address in NsdServiceInfo
PiperOrigin-RevId: 431543437
2022-02-28 15:44:41 -08:00
suetfei fe8bb9a880 Internal script change
PiperOrigin-RevId: 431088787
2022-02-25 20:58:58 -08:00
edwinwu 8f22ffefd4 [BLE Refactor] Move /cal/ble.h , base_types.h to /platform/implementation/ble_v2.h
PiperOrigin-RevId: 430133309
2022-02-21 22:14:20 -08:00
edwinwu 8326aeef38 [BLE Refactor] Implement CreateAdvertisementHeader in BleV2 medium.
PiperOrigin-RevId: 429550598
2022-02-18 06:30:09 -08:00
guogang ca172feb55 Updated header file of windns.h
PiperOrigin-RevId: 429323019
2022-02-17 09:04:27 -08:00
guogang 12377c32d1 Enabled platform types visible to nearby sharing
PiperOrigin-RevId: 428640501
2022-02-14 16:48:52 -08:00