From 236bc66e9a404447fdecdd92b0ed3a28ef3f34fc Mon Sep 17 00:00:00 2001 From: hai007 Date: Thu, 29 Jul 2021 10:51:46 -0700 Subject: [PATCH] Moved connections/windows to third_party, and copied the blueprint file into third_party PiperOrigin-RevId: 387621210 --- connections/windows/BUILD | 17 -- connections/windows/core_adapter.cc | 143 ---------- connections/windows/core_adapter.h | 261 ------------------ cpp/platform/impl/windows/BUILD | 15 +- cpp/platform/impl/windows/generated/BUILD | 2 +- .../public/advertisement_generator.cc | 30 -- cpp/presence/public/advertisement_generator.h | 35 --- cpp/presence/public/client.cc | 43 --- cpp/presence/public/client.h | 34 --- windows/BUILD | 7 +- 10 files changed, 10 insertions(+), 577 deletions(-) delete mode 100644 connections/windows/BUILD delete mode 100644 connections/windows/core_adapter.cc delete mode 100644 connections/windows/core_adapter.h delete mode 100644 cpp/presence/public/advertisement_generator.cc delete mode 100644 cpp/presence/public/advertisement_generator.h delete mode 100644 cpp/presence/public/client.cc delete mode 100644 cpp/presence/public/client.h diff --git a/connections/windows/BUILD b/connections/windows/BUILD deleted file mode 100644 index 9bf0ae9c..00000000 --- a/connections/windows/BUILD +++ /dev/null @@ -1,17 +0,0 @@ -load("//third_party/msvc:build_windows.bzl", "cc_windows_dll") - -# Build with --config=lexan -cc_windows_dll( - name = "core_adapter", - srcs = ["core_adapter.cc"], - hdrs = ["core_adapter.h"], - copts = ["-DCORE_ADAPTER_BUILD_DLL"], - defines = ["CORE_ADAPTER_DLL"], - tags = ["windows-dll"], - deps = [ - "//absl/strings", - "//core", - "//platform/impl/windows", - "//webrtc/api:create_peerconnection_factory", - ], -) diff --git a/connections/windows/core_adapter.cc b/connections/windows/core_adapter.cc deleted file mode 100644 index 8bb4799b..00000000 --- a/connections/windows/core_adapter.cc +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "location/nearby/connections/windows/core_adapter.h" -#include "absl/strings/str_format.h" - -namespace location { -namespace nearby { -namespace connections { - -Core* InitCoreWithServiceControllerFactory( - std::function factory) { - return new Core(factory); -} - -Core* InitCore() { return new Core(); } - -void CloseCore(Core* pCore) { - if (pCore) { - pCore->StopAllEndpoints( - {.result_cb = - std::function{ - [](location::nearby::connections::Status) {}}}); - delete pCore; - pCore = nullptr; - } -} - -void StartAdvertising(Core* pCore, absl::string_view service_id, - ConnectionOptions options, ConnectionRequestInfo info, - ResultCallback callback) { - if (pCore) { - pCore->StartAdvertising(service_id, options, info, callback); - } -} - -void StopAdvertising(Core* pCore, ResultCallback callback) { - if (pCore) { - pCore->StopAdvertising(callback); - } -} - -void StartDiscovery(Core* pCore, absl::string_view service_id, - ConnectionOptions options, DiscoveryListener listener, - ResultCallback callback) { - if (pCore) { - pCore->StartDiscovery(service_id, options, listener, callback); - } -} - -void StopDiscovery(Core* pCore, ResultCallback callback) { - if (pCore) { - pCore->StopDiscovery(callback); - } -} - -void InjectEndpoint(Core* pCore, absl::string_view service_id, - OutOfBandConnectionMetadata metadata, - ResultCallback callback) { - if (pCore) { - pCore->InjectEndpoint(service_id, metadata, callback); - } -} - -void RequestConnection(Core* pCore, absl::string_view endpoint_id, - ConnectionRequestInfo info, ConnectionOptions options, - ResultCallback callback) { - if (pCore) { - pCore->RequestConnection(endpoint_id, info, options, callback); - } -} - -void AcceptConnection(Core* pCore, absl::string_view endpoint_id, - PayloadListener listener, ResultCallback callback) { - if (pCore) { - pCore->AcceptConnection(endpoint_id, listener, callback); - } -} - -void RejectConnection(Core* pCore, absl::string_view endpoint_id, - ResultCallback callback) { - if (pCore) { - pCore->RejectConnection(endpoint_id, callback); - } -} - -void SendPayload(Core* pCore, absl::Span endpoint_ids, - Payload payload, ResultCallback callback) { - if (pCore) { - pCore->SendPayload(endpoint_ids, std::move(payload), callback); - } -} - -void CancelPayload(Core* pCore, std::int64_t payload_id, - ResultCallback callback) { - if (pCore) { - pCore->CancelPayload(payload_id, callback); - } -} - -void DisconnectFromEndpoint(Core* pCore, absl::string_view endpoint_id, - ResultCallback callback) { - if (pCore) { - pCore->DisconnectFromEndpoint(endpoint_id, callback); - } -} - -void StopAllEndpoints(Core* pCore, ResultCallback callback) { - if (pCore) { - pCore->StopAllEndpoints(callback); - } -} - -void InitiateBandwidthUpgrade(Core* pCore, absl::string_view endpoint_id, - ResultCallback callback) { - if (pCore) { - pCore->InitiateBandwidthUpgrade(endpoint_id, callback); - } -} - -const char* GetLocalEndpointId(Core* pCore) { - if (pCore) { - std::string endpoint_id = pCore->GetLocalEndpointId(); - char * result = new char[endpoint_id.length() + 1]; - absl::SNPrintF(result, endpoint_id.length() + 1, "%s", endpoint_id); - return result; - } - return "Null-Core"; -} -} // namespace connections -} // namespace nearby -} // namespace location diff --git a/connections/windows/core_adapter.h b/connections/windows/core_adapter.h deleted file mode 100644 index d2b371dd..00000000 --- a/connections/windows/core_adapter.h +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef LOCATION_NEARBY_CONNECTIONS_WINDOWS_CORE_ADAPTER_H_ -#define LOCATION_NEARBY_CONNECTIONS_WINDOWS_CORE_ADAPTER_H_ - -#include "absl/strings/string_view.h" -#include "absl/types/span.h" -#include "core/core.h" -#include "core/internal/client_proxy.h" -#include "core/internal/offline_service_controller.h" -#include "core/internal/service_controller.h" -#include "core/internal/service_controller_router.h" -#include "core/listeners.h" -#include "core/options.h" -#include "core/params.h" - -#define DLL_API extern "C" __declspec(dllexport) -namespace location { -namespace nearby { -namespace connections { - -// Initizlizes a Core instance, providing the ServiceController factory from -// app side. If no factory is provided, it will initialize a new -// factory creating OffilineServiceController. -// Returns the instance handle to c# client. -DLL_API Core* __stdcall InitCoreWithServiceControllerFactory( - std::function factory = []() { - return new OfflineServiceController; - }); - -// Initializes a default Core instance. -// Returns the instance handle to c# client. -DLL_API Core* __stdcall InitCore(); - -// Closes the core with stopping all endpoints, then free the memory. -DLL_API void __stdcall CloseCore(Core* pCore); - -// Starts advertising an endpoint for a local app. -// -// service_id - An identifier to advertise your app to other endpoints. -// This can be an arbitrary string, so long as it uniquely -// identifies your service. A good default is to use your -// app's package name. -// options - The options for advertising. -// info - Connection parameters: -// > name - A human readable name for this endpoint, to appear on -// other devices. -// > listener - A callback notified when remote endpoints request a -// connection to this endpoint. -// callback - to access the status of the operation when available. -// Possible status codes include: -// Status::STATUS_OK if advertising started successfully. -// Status::STATUS_ALREADY_ADVERTISING if the app is already advertising. -// Status::STATUS_OUT_OF_ORDER_API_CALL if the app is currently -// connected to remote endpoints; call StopAllEndpoints first. -DLL_API void __stdcall StartAdvertising(Core* pCore, - absl::string_view service_id, - ConnectionOptions options, - ConnectionRequestInfo info, - ResultCallback callback); - -// Stops advertising a local endpoint. Should be called after calling -// StartAdvertising, as soon as the application no longer needs to advertise -// itself or goes inactive. Payloads can still be sent to connected -// endpoints after advertising ends. -// -// result_cb - to access the status of the operation when available. -// Possible status codes include: -// Status::STATUS_OK if none of the above errors occurred. -DLL_API void __stdcall StopAdvertising(Core* pCore, ResultCallback callback); - -// Starts discovery for remote endpoints with the specified service ID. -// -// service_id - The ID for the service to be discovered, as specified in -// the corresponding call to StartAdvertising. -// listener - A callback notified when a remote endpoint is discovered. -// options - The options for discovery. -// result_cb - to access the status of the operation when available. -// Possible status codes include: -// Status::STATUS_OK if discovery started successfully. -// Status::STATUS_ALREADY_DISCOVERING if the app is already -// discovering the specified service. -// Status::STATUS_OUT_OF_ORDER_API_CALL if the app is currently -// connected to remote endpoints; call StopAllEndpoints first. -DLL_API void __stdcall StartDiscovery(Core* pCore, absl::string_view service_id, - ConnectionOptions options, - DiscoveryListener listener, - ResultCallback callback); - -// Stops discovery for remote endpoints, after a previous call to -// StartDiscovery, when the client no longer needs to discover endpoints or -// goes inactive. Payloads can still be sent to connected endpoints after -// discovery ends. -// -// result_cb - to access the status of the operation when available. -// Possible status codes include: -// Status::STATUS_OK if none of the above errors occurred. -DLL_API void __stdcall StopDiscovery(Core* pCore, ResultCallback callback); - -// Invokes the discovery callback from a previous call to StartDiscovery() -// with the given endpoint info. The previous call to StartDiscovery() must -// have been passed ConnectionOptions with is_out_of_band_connection == true. -// -// service_id - The ID for the service to be discovered, as -// specified in the corresponding call to -// StartDiscovery(). -// metadata - Metadata used in order to inject the endpoint. -// result_cb - to access the status of the operation when -// available. -// Possible status codes include: -// Status::kSuccess if endpoint injection was attempted. -// Status::kError if endpoint_id, endpoint_info, or -// remote_bluetooth_mac_address are malformed. -// Status::kOutOfOrderApiCall if the app is not discovering. -DLL_API void __stdcall InjectEndpoint(Core* pCore, absl::string_view service_id, - OutOfBandConnectionMetadata metadata, - ResultCallback callback); - -// Sends a request to connect to a remote endpoint. -// -// endpoint_id - The identifier for the remote endpoint to which a -// connection request will be sent. Should match the value -// provided in a call to -// DiscoveryListener::endpoint_found_cb() -// info - Connection parameters: -// > name - A human readable name for the local endpoint, to appear on -// the remote endpoint. -// > listener - A callback notified when the remote endpoint sends a -// response to the connection request. -// result_cb - to access the status of the operation when available. -// Possible status codes include: -// Status::STATUS_OK if the connection request was sent. -// Status::STATUS_ALREADY_CONNECTED_TO_ENDPOINT if the app already -// has a connection to the specified endpoint. -// Status::STATUS_RADIO_ERROR if we failed to connect because of an -// issue with Bluetooth/WiFi. -// Status::STATUS_ERROR if we failed to connect for any other reason. -DLL_API void __stdcall RequestConnection(Core* pCore, - absl::string_view endpoint_id, - ConnectionRequestInfo info, - ConnectionOptions options, - ResultCallback callback); - -// Accepts a connection to a remote endpoint. This method must be called -// before Payloads can be exchanged with the remote endpoint. -// -// endpoint_id - The identifier for the remote endpoint. Should match the -// value provided in a call to -// ConnectionListener::onConnectionInitiated. -// listener - A callback for payloads exchanged with the remote endpoint. -// result_cb - to access the status of the operation when available. -// Possible status codes include: -// Status::STATUS_OK if the connection request was accepted. -// Status::STATUS_ALREADY_CONNECTED_TO_ENDPOINT if the app already. -// has a connection to the specified endpoint. -DLL_API void __stdcall AcceptConnection(Core* pCore, - absl::string_view endpoint_id, - PayloadListener listener, - ResultCallback callback); - -// Rejects a connection to a remote endpoint. -// -// endpoint_id - The identifier for the remote endpoint. Should match the -// value provided in a call to -// ConnectionListener::onConnectionInitiated(). -// result_cb - to access the status of the operation when available. -// Possible status codes include: -// Status::STATUS_OK} if the connection request was rejected. -// Status::STATUS_ALREADY_CONNECTED_TO_ENDPOINT} if the app already -// has a connection to the specified endpoint. -DLL_API void __stdcall RejectConnection(Core* pCore, - absl::string_view endpoint_id, - ResultCallback callback); - -// Sends a Payload to a remote endpoint. Payloads can only be sent to remote -// endpoints once a notice of connection acceptance has been delivered via -// ConnectionListener::onConnectionResult(). -// -// endpoint_ids - Array of remote endpoint identifiers for the to which the -// payload should be sent. -// payload - The Payload to be sent. -// result_cb - to access the status of the operation when available. -// Possible status codes include: -// Status::STATUS_OUT_OF_ORDER_API_CALL if the device has not first -// performed advertisement or discovery (to set the Strategy. -// Status::STATUS_ENDPOINT_UNKNOWN if there's no active (or pending) -// connection to the remote endpoint. -// Status::STATUS_OK if none of the above errors occurred. Note that this -// indicates that Nearby Connections will attempt to send the Payload, -// but not that the send has successfully completed yet. Errors might -// still occur during transmission (and at different times for -// different endpoints), and will be delivered via -// PayloadCallback#onPayloadTransferUpdate. -DLL_API void __stdcall SendPayload(Core* pCore, - absl::Span endpoint_ids, - Payload payload, ResultCallback callback); - -// Cancels a Payload currently in-flight to or from remote endpoint(s). -// -// payload_id - The identifier for the Payload to be canceled. -// result_cb - to access the status of the operation when available. -// Possible status codes include: -// Status::STATUS_OK if none of the above errors occurred. -DLL_API void __stdcall CancelPayload(Core* pCore, std::int64_t payload_id, - ResultCallback callback); - -// Disconnects from a remote endpoint. {@link Payload}s can no longer be sent -// to or received from the endpoint after this method is called. -// -// endpoint_id - The identifier for the remote endpoint to disconnect from. -// result_cb - to access the status of the operation when available. -// Possible status codes include: -// Status::STATUS_OK - finished successfully. -DLL_API void __stdcall DisconnectFromEndpoint(Core* pCore, - absl::string_view endpoint_id, - ResultCallback callback); - -// Disconnects from, and removes all traces of, all connected and/or -// discovered endpoints. This call is expected to be preceded by a call to -// StopAdvertising or StartDiscovery as needed. After calling -// StopAllEndpoints, no further operations with remote endpoints will be -// possible until a new call to one of StartAdvertising() or StartDiscovery(). -// -// result_cb - to access the status of the operation when available. -// Possible status codes include: -// Status::STATUS_OK - finished successfully. -DLL_API void __stdcall StopAllEndpoints(Core* pCore, ResultCallback callback); - -// Sends a request to initiate connection bandwidth upgrade. -// -// endpoint_id - The identifier for the remote endpoint which will be -// switching to a higher connection data rate and possibly -// different wireless protocol. On success, calls -// ConnectionListener::bandwidth_changed_cb(). -// result_cb - to access the status of the operation when available. -// Possible status codes include: -// Status::STATUS_OK - finished successfully. -DLL_API void __stdcall InitiateBandwidthUpgrade(Core* pCore, - absl::string_view endpoint_id, - ResultCallback callback); - -// Gets the local endpoint generated by Nearby Connections. -// DLL_API std::string __stdcall GetLocalEndpointId(Core* pCore); -DLL_API const char* __stdcall GetLocalEndpointId(Core* pCore); -} // namespace connections -} // namespace nearby -} // namespace location - -#endif // LOCATION_NEARBY_CONNECTIONS_WINDOWS_CORE_ADAPTER_H_ diff --git a/cpp/platform/impl/windows/BUILD b/cpp/platform/impl/windows/BUILD index a45f57e4..446dca81 100644 --- a/cpp/platform/impl/windows/BUILD +++ b/cpp/platform/impl/windows/BUILD @@ -1,4 +1,5 @@ licenses(["notice"]) + # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,9 +13,6 @@ licenses(["notice"]) # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - -exports_files(["LICENSE"]) # needs to be on a line by itself for PRESUBMIT - cc_library( name = "types", srcs = [ @@ -24,6 +22,7 @@ cc_library( hdrs = [ "atomic_boolean.h", "atomic_reference.h", + "bluetooth_adapter.h", "cancelable.h", "condition_variable.h", "count_down_latch.h", @@ -38,9 +37,6 @@ cc_library( "settable_future.h", "submittable_executor.h", ], - visibility = [ - "//third_party/nearby_connections/windows:__subpackages__", - ], deps = [ "//base", "//platform/api:types", @@ -52,8 +48,11 @@ cc_library( name = "comm", hdrs = [ "ble.h", - "bluetooth_adapter.h", "bluetooth_classic.h", + "bluetooth_classic_device.h", + "bluetooth_classic_medium.h", + "bluetooth_classic_server_socket.h", + "bluetooth_classic_socket.h", "server_sync.h", "webrtc.h", "wifi.h", @@ -122,7 +121,7 @@ cc_library( "test_utils.h", ], visibility = [ - "//location/nearby/windows:__subpackages__", + "//third_party/nearby_connections/windows:__subpackages__", ], deps = [ "//platform/base", diff --git a/cpp/platform/impl/windows/generated/BUILD b/cpp/platform/impl/windows/generated/BUILD index 1bbd6bdb..544ecb4e 100644 --- a/cpp/platform/impl/windows/generated/BUILD +++ b/cpp/platform/impl/windows/generated/BUILD @@ -32,7 +32,7 @@ cc_library( ], textual_hdrs = glob(["**/*.h"]), visibility = [ + "//third_party/nearby_connections/connections/windows:__subpackages__", "//platform/impl/windows:__subpackages__", - "//third_party/nearby_connections/windows:__subpackages__", ], ) diff --git a/cpp/presence/public/advertisement_generator.cc b/cpp/presence/public/advertisement_generator.cc deleted file mode 100644 index 8a32239e..00000000 --- a/cpp/presence/public/advertisement_generator.cc +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "third_party/nearby_connections/cpp/presence/public/advertisement_generator.h" - -namespace nearby { -namespace presence { - -AdvertisementGenerator::AdvertisementGenerator() = default; -AdvertisementGenerator::~AdvertisementGenerator() = default; -std::string AdvertisementGenerator::GeneratePresenceServiceUuid() { - return kPresenceServiceUuid; -} -ByteArray AdvertisementGenerator::GeneratePresenceAdvertisementBytes() { - return ByteArray{"12345"}; -} - -} // namespace presence -} // namespace nearby diff --git a/cpp/presence/public/advertisement_generator.h b/cpp/presence/public/advertisement_generator.h deleted file mode 100644 index 0e6fe52e..00000000 --- a/cpp/presence/public/advertisement_generator.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef THIRD_PARTY_NEARBY_CONNECTIONS_CPP_PRESENCE_PUBLIC_ADVERTISEMENT_GENERATOR_H_ -#define THIRD_PARTY_NEARBY_CONNECTIONS_CPP_PRESENCE_PUBLIC_ADVERTISEMENT_GENERATOR_H_ - -#include "platform/base/byte_array.h" -namespace nearby { -namespace presence { - -class AdvertisementGenerator { - public: - AdvertisementGenerator(); - ~AdvertisementGenerator(); - std::string GeneratePresenceServiceUuid(); - ByteArray GeneratePresenceAdvertisementBytes(); - - private: - static constexpr std::string kPresenceServiceUuid = "FE2C" -} - -} // namespace presence -} // namespace nearby -#endif // THIRD_PARTY_NEARBY_CONNECTIONS_CPP_PRESENCE_PUBLIC_ADVERTISEMENT_GENERATOR_H_ diff --git a/cpp/presence/public/client.cc b/cpp/presence/public/client.cc deleted file mode 100644 index d1a86009..00000000 --- a/cpp/presence/public/client.cc +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "third_party/nearby_connections/cpp/presence/public/client.h" - -#include "platform/base/logging.h" -#include "third_party/nearby_connections/cpp/presence/public/advertisement_generator.h" - -namespace nearby { -namespace presence { - -class PresenceClient { - public: - PresenceClient(); - ~PresenceClient(); - void PresenceClient::StartAdvertising() { - NEARBY_LOGS(INFO) << "uudi: " - << advertisement_generator_.GeneratePresenceServiceUuid(); - NEARBY_LOGS(INFO) - << "Advertisement bytes: " - << advertisement_generator_.GeneratePresenceAdvertisementBytes(); - } - void PresenceClient::StopAdvertising() { - NEARBY_LOGS(INFO) << "Stop advertising."; - } - - private: - AdvertisementGenerator advertisement_generator_; -}; - -} // namespace presence -} // namespace nearby diff --git a/cpp/presence/public/client.h b/cpp/presence/public/client.h deleted file mode 100644 index 011dc7c3..00000000 --- a/cpp/presence/public/client.h +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef THIRD_PARTY_NEARBY_CONNECTIONS_CPP_PRESENCE_PUBLIC_CLIENT_H_ -#define THIRD_PARTY_NEARBY_CONNECTIONS_CPP_PRESENCE_PUBLIC_CLIENT_H_ -namespace nearby { -namespace presence { - -class PresenceClient { - public: - PresenceClient() = default; - ~PresenceClient() = default; - void StartAdvertising(); - void StopAdvertising(); - - private: - AdvertisementGenerator advertisement_generator_; -}; - -} // namespace presence -} // namespace nearby - -#endif // THIRD_PARTY_NEARBY_CONNECTIONS_CPP_PRESENCE_PUBLIC_CLIENT_H_ diff --git a/windows/BUILD b/windows/BUILD index e9576671..37ddcf90 100644 --- a/windows/BUILD +++ b/windows/BUILD @@ -1,4 +1,3 @@ -licenses(["notice"]) # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,10 +12,10 @@ licenses(["notice"]) # See the License for the specific language governing permissions and # limitations under the License. -exports_files(["LICENSE"]) # needs to be on a line by itself for PRESUBMIT - load("//third_party/msvc:build_windows.bzl", "cc_windows_dll") +licenses(["notice"]) + # Build with --config=lexan cc_windows_dll( name = "core_adapter", @@ -29,8 +28,6 @@ cc_windows_dll( "//absl/strings", "//core", "//platform/impl/windows", - "//platform/impl/windows:types", - "//platform/impl/windows/generated:types", "//webrtc/api:create_peerconnection_factory", ], )