diff --git a/fastpair/internal/base/BUILD b/fastpair/internal/base/BUILD index c8a85e15..c65aafc2 100644 --- a/fastpair/internal/base/BUILD +++ b/fastpair/internal/base/BUILD @@ -18,19 +18,6 @@ cc_library( ], ) -cc_library( - name = "base", - srcs = [ - ], - hdrs = [ - "observer_list.h", - ], - visibility = [ - "//fastpair:__subpackages__", - ], - deps = ["@com_google_absl//absl/container:flat_hash_set"], -) - cc_test( name = "base_test", size = "small", diff --git a/fastpair/internal/base/observer_list.h b/fastpair/internal/base/observer_list.h deleted file mode 100644 index cb6e8556..00000000 --- a/fastpair/internal/base/observer_list.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022 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_FASTPAIR_INTERNAL_BASE_OBSERVER_LIST_H_ -#define THIRD_PARTY_NEARBY_FASTPAIR_INTERNAL_BASE_OBSERVER_LIST_H_ - -#include -#include - -#include "absl/container/flat_hash_set.h" - -namespace nearby { -namespace fastpair { - -template -class ObserverList { - public: - using iterator = typename absl::flat_hash_set::iterator; - using const_iterator = - typename absl::flat_hash_set::const_iterator; - - void AddObserver(ObserverType* observer) { observers_.emplace(observer); } - - void RemoveObserver(ObserverType* observer) { observers_.erase(observer); } - - bool HasObserver(ObserverType* observer) { - return observers_.contains(observer); - } - - void Clear() { observers_.clear(); } - - bool empty() const { return observers_.empty(); } - - int size() const { return observers_.size(); } - - // Supports iterators - iterator begin() { return observers_.begin(); } - iterator end() { return observers_.end(); } - const_iterator begin() const { return observers_.begin(); } - const_iterator end() const { return observers_.end(); } - - private: - absl::flat_hash_set observers_; -}; - -} // namespace fastpair -} // namespace nearby - -#endif // THIRD_PARTY_NEARBY_FASTPAIR_INTERNAL_BASE_OBSERVER_LIST_H_ diff --git a/fastpair/internal/impl/windows/BUILD b/fastpair/internal/impl/windows/BUILD index 31619c93..add99165 100644 --- a/fastpair/internal/impl/windows/BUILD +++ b/fastpair/internal/impl/windows/BUILD @@ -45,7 +45,6 @@ cc_library( visibility = ["//fastpair:__subpackages__"], deps = [ "//fastpair/internal/api:platform", - "//fastpair/internal/base", "//fastpair/internal/base:bluetooth_address", "//internal/platform:base", "//internal/platform:logging", diff --git a/fastpair/internal/public/BUILD b/fastpair/internal/public/BUILD index 9ac346e7..9f561a84 100644 --- a/fastpair/internal/public/BUILD +++ b/fastpair/internal/public/BUILD @@ -32,7 +32,6 @@ cc_library( ":device_info", ":types", "//fastpair/internal/api:platform", - "//fastpair/internal/base", # fixdeps: keep "//fastpair/internal/impl/g3:platform_g3", "//internal/platform:logging", "//internal/platform:types",