mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
Moved connections/windows to third_party, and copied the blueprint file into third_party
PiperOrigin-RevId: 387621210
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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__",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -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
|
||||
@@ -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_
|
||||
@@ -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
|
||||
@@ -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_
|
||||
Reference in New Issue
Block a user