aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Bayles <jophba@chromium.org>2019-05-01 12:38:39 -0700
committerCommit Bot <commit-bot@chromium.org>2019-05-02 20:23:22 +0000
commitf1e4bb71be2c8b58871cf4788528039d18cbab95 (patch)
tree8f14bc8b1b06db1094c337cae79297fe6f036744
parent59224ce0a9846b7b80b6e18a469ed7ebffd455ac (diff)
downloadopenscreen-f1e4bb71be2c8b58871cf4788528039d18cbab95.tar.gz
Rename base to osp_base
Currently, our base/ folder causes issues when built with Chromium, since files in Chromium need access to files from both Chromium base and Open Screen base. This patch fixes that issue by renaming Open Screen's base implementation to osp_base Change-Id: If9d246fb32b9765bd4f1d98d880fbec4bf3689ad Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1592358 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org> Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
-rw-r--r--BUILD.gn6
-rw-r--r--DEPS2
-rw-r--r--api/impl/BUILD.gn4
-rw-r--r--api/impl/internal_services.cc2
-rw-r--r--api/impl/internal_services.h6
-rw-r--r--api/impl/mdns_responder_service.cc2
-rw-r--r--api/impl/mdns_responder_service.h2
-rw-r--r--api/impl/presentation/presentation_connection.cc2
-rw-r--r--api/impl/presentation/url_availability_requester.h2
-rw-r--r--api/impl/quic/BUILD.gn4
-rw-r--r--api/impl/quic/quic_client.h2
-rw-r--r--api/impl/quic/quic_client_unittest.cc2
-rw-r--r--api/impl/quic/quic_connection_factory.h2
-rw-r--r--api/impl/quic/quic_connection_factory_impl.cc2
-rw-r--r--api/impl/quic/quic_connection_factory_impl.h2
-rw-r--r--api/impl/quic/quic_connection_impl.cc2
-rw-r--r--api/impl/quic/quic_connection_impl.h2
-rw-r--r--api/impl/quic/quic_server.h2
-rw-r--r--api/impl/quic/quic_server_unittest.cc2
-rw-r--r--api/impl/quic/testing/quic_test_support.h2
-rw-r--r--api/impl/receiver_list.h2
-rw-r--r--api/impl/receiver_list_unittest.cc2
-rw-r--r--api/impl/service_listener_impl.cc2
-rw-r--r--api/impl/service_listener_impl.h6
-rw-r--r--api/impl/service_publisher_impl.h6
-rw-r--r--api/impl/testing/fake_mdns_responder_adapter.cc2
-rw-r--r--api/public/BUILD.gn2
-rw-r--r--api/public/endpoint_request_ids.h4
-rw-r--r--api/public/message_demuxer.cc4
-rw-r--r--api/public/message_demuxer.h2
-rw-r--r--api/public/network_metrics.h2
-rw-r--r--api/public/presentation/presentation_connection.h14
-rw-r--r--api/public/presentation/presentation_controller.h2
-rw-r--r--api/public/protocol_connection.h2
-rw-r--r--api/public/protocol_connection_client.h8
-rw-r--r--api/public/protocol_connection_server.h8
-rw-r--r--api/public/server_config.h2
-rw-r--r--api/public/service_info.h2
-rw-r--r--api/public/service_info_unittest.cc2
-rw-r--r--api/public/service_listener.h6
-rw-r--r--api/public/service_publisher.h6
-rw-r--r--base/macros.h29
-rw-r--r--discovery/mdns/BUILD.gn4
-rw-r--r--discovery/mdns/domain_name.cc2
-rw-r--r--discovery/mdns/domain_name.h2
-rw-r--r--discovery/mdns/domain_name_unittest.cc2
-rw-r--r--discovery/mdns/embedder_demo.cc2
-rw-r--r--discovery/mdns/mdns_responder_adapter.h4
-rw-r--r--discovery/mdns/mdns_responder_adapter_impl.h2
-rw-r--r--discovery/mdns/mdns_responder_platform.cc4
-rw-r--r--msgs/request_response_handler.h6
-rw-r--r--osp_base/BUILD.gn (renamed from base/BUILD.gn)6
-rw-r--r--osp_base/DEPS (renamed from base/DEPS)0
-rw-r--r--osp_base/big_endian.h (renamed from base/big_endian.h)6
-rw-r--r--osp_base/big_endian_unittest.cc (renamed from base/big_endian_unittest.cc)2
-rw-r--r--osp_base/boringssl_util.cc (renamed from base/boringssl_util.cc)2
-rw-r--r--osp_base/boringssl_util.h (renamed from base/boringssl_util.h)6
-rw-r--r--osp_base/error.cc (renamed from base/error.cc)2
-rw-r--r--osp_base/error.h (renamed from base/error.h)10
-rw-r--r--osp_base/error_unittest.cc (renamed from base/error_unittest.cc)2
-rw-r--r--osp_base/export.h (renamed from base/export.h)6
-rw-r--r--osp_base/ip_address.cc (renamed from base/ip_address.cc)2
-rw-r--r--osp_base/ip_address.h (renamed from base/ip_address.h)8
-rw-r--r--osp_base/ip_address_unittest.cc (renamed from base/ip_address_unittest.cc)4
-rw-r--r--osp_base/macros.h50
-rw-r--r--osp_base/scoped_pipe.h (renamed from base/scoped_pipe.h)6
-rw-r--r--osp_base/scoped_pipe_unittest.cc (renamed from base/scoped_pipe_unittest.cc)2
-rw-r--r--osp_base/std_util.h (renamed from base/std_util.h)6
-rw-r--r--osp_base/stringprintf.h (renamed from base/stringprintf.h)6
-rw-r--r--osp_base/time.h (renamed from base/time.h)6
-rw-r--r--osp_base/with_destruction_callback.cc (renamed from base/with_destruction_callback.cc)2
-rw-r--r--osp_base/with_destruction_callback.h (renamed from base/with_destruction_callback.h)10
-rw-r--r--platform/BUILD.gn4
-rw-r--r--platform/api/event_waiter.h2
-rw-r--r--platform/api/network_interface.h2
-rw-r--r--platform/api/socket.h8
-rw-r--r--platform/base/event_loop.h4
-rw-r--r--platform/chromium/logging.cc2
-rw-r--r--platform/linux/network_interface.cc4
-rw-r--r--platform/mac/network_interface.cc4
-rw-r--r--platform/posix/event_waiter.cc2
-rw-r--r--platform/posix/socket.cc2
-rw-r--r--streaming/cast/BUILD.gn9
-rw-r--r--streaming/cast/encoded_frame.h4
-rw-r--r--streaming/cast/frame_crypto.cc4
-rw-r--r--streaming/cast/frame_crypto.h4
-rw-r--r--streaming/cast/packet_util.h2
-rw-r--r--streaming/cast/rtp_packetizer.cc2
-rw-r--r--streaming/cast/ssrc_unittest.cc2
89 files changed, 206 insertions, 194 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 65ddd1d4..5a9d5a2c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -16,8 +16,8 @@ config("root_config_overrides") {
group("gn_all") {
deps = [
"api",
- "base",
"msgs",
+ "osp_base",
"platform",
"third_party/abseil",
"third_party/tinycbor",
@@ -41,9 +41,9 @@ executable("openscreen_unittests") {
testonly = true
deps = [
"api:api_unittests",
- "base:base_unittests",
"discovery/mdns:mdns_unittests",
"msgs:unittests",
+ "osp_base:osp_base_unittests",
"platform:platform_unittests",
"streaming/cast:cast_unittests",
"third_party/abseil",
@@ -59,8 +59,8 @@ if (use_chromium_quic && use_mdns_responder) {
deps = [
"api:api_with_chromium_quic",
- "base",
"discovery/mdns",
+ "osp_base",
"platform",
]
}
diff --git a/DEPS b/DEPS
index 4eb85924..444ddeca 100644
--- a/DEPS
+++ b/DEPS
@@ -93,7 +93,7 @@ recursedeps = [
include_rules = [
'+api',
- '+base',
+ '+osp_base',
'+msgs',
'+platform',
'+third_party',
diff --git a/api/impl/BUILD.gn b/api/impl/BUILD.gn
index 4ba40a5b..77164985 100644
--- a/api/impl/BUILD.gn
+++ b/api/impl/BUILD.gn
@@ -40,7 +40,7 @@ source_set("impl") {
"../public:api",
]
deps = [
- "../../base",
+ "../../osp_base",
"../../platform",
"quic",
]
@@ -62,8 +62,8 @@ if (use_chromium_quic) {
deps = [
"quic",
- "//base",
"//msgs",
+ "//osp_base",
"//platform",
"//third_party/chromium_quic",
]
diff --git a/api/impl/internal_services.cc b/api/impl/internal_services.cc
index 1f0bc10a..0ac71f93 100644
--- a/api/impl/internal_services.cc
+++ b/api/impl/internal_services.cc
@@ -7,8 +7,8 @@
#include <algorithm>
#include "api/impl/mdns_responder_service.h"
-#include "base/error.h"
#include "discovery/mdns/mdns_responder_adapter_impl.h"
+#include "osp_base/error.h"
#include "platform/api/logging.h"
#include "platform/api/socket.h"
diff --git a/api/impl/internal_services.h b/api/impl/internal_services.h
index 7238963e..2d7eb5a5 100644
--- a/api/impl/internal_services.h
+++ b/api/impl/internal_services.h
@@ -17,8 +17,8 @@
#include "api/public/mdns_service_publisher_factory.h"
#include "api/public/protocol_connection_client.h"
#include "api/public/protocol_connection_server.h"
-#include "base/ip_address.h"
-#include "base/macros.h"
+#include "osp_base/ip_address.h"
+#include "osp_base/macros.h"
#include "platform/api/event_waiter.h"
#include "platform/api/network_interface.h"
#include "platform/api/socket.h"
@@ -77,7 +77,7 @@ class InternalServices {
// Currently, RegisterMdnsSocket is our hook to do 1 or 2.
platform::EventWaiterPtr mdns_waiter_;
- DISALLOW_COPY_AND_ASSIGN(InternalServices);
+ OSP_DISALLOW_COPY_AND_ASSIGN(InternalServices);
};
} // namespace openscreen
diff --git a/api/impl/mdns_responder_service.cc b/api/impl/mdns_responder_service.cc
index f9251a3f..f4584836 100644
--- a/api/impl/mdns_responder_service.cc
+++ b/api/impl/mdns_responder_service.cc
@@ -9,7 +9,7 @@
#include <utility>
#include "api/impl/internal_services.h"
-#include "base/error.h"
+#include "osp_base/error.h"
#include "platform/api/logging.h"
namespace openscreen {
diff --git a/api/impl/mdns_responder_service.h b/api/impl/mdns_responder_service.h
index 20d878c2..6d8f3f0c 100644
--- a/api/impl/mdns_responder_service.h
+++ b/api/impl/mdns_responder_service.h
@@ -15,8 +15,8 @@
#include "api/impl/mdns_platform_service.h"
#include "api/impl/service_listener_impl.h"
#include "api/impl/service_publisher_impl.h"
-#include "base/ip_address.h"
#include "discovery/mdns/mdns_responder_adapter.h"
+#include "osp_base/ip_address.h"
#include "platform/api/network_interface.h"
#include "platform/base/event_loop.h"
diff --git a/api/impl/presentation/presentation_connection.cc b/api/impl/presentation/presentation_connection.cc
index 3e5e92b0..d594017d 100644
--- a/api/impl/presentation/presentation_connection.cc
+++ b/api/impl/presentation/presentation_connection.cc
@@ -13,8 +13,8 @@
#include "api/public/presentation/presentation_controller.h"
#include "api/public/presentation/presentation_receiver.h"
#include "api/public/protocol_connection.h"
-#include "base/std_util.h"
#include "msgs/osp_messages.h"
+#include "osp_base/std_util.h"
#include "platform/api/logging.h"
// TODO(issue/27): Address TODOs in this file
diff --git a/api/impl/presentation/url_availability_requester.h b/api/impl/presentation/url_availability_requester.h
index e0c86f99..62f959c5 100644
--- a/api/impl/presentation/url_availability_requester.h
+++ b/api/impl/presentation/url_availability_requester.h
@@ -14,8 +14,8 @@
#include "api/public/presentation/presentation_controller.h"
#include "api/public/protocol_connection_client.h"
#include "api/public/service_info.h"
-#include "base/error.h"
#include "msgs/osp_messages.h"
+#include "osp_base/error.h"
#include "platform/api/time.h"
namespace openscreen {
diff --git a/api/impl/quic/BUILD.gn b/api/impl/quic/BUILD.gn
index d4efee82..5eaf9a45 100644
--- a/api/impl/quic/BUILD.gn
+++ b/api/impl/quic/BUILD.gn
@@ -15,7 +15,7 @@ source_set("quic") {
]
deps = [
- "../../../base",
+ "../../../osp_base",
"../../../platform",
"../../public:api",
]
@@ -34,8 +34,8 @@ source_set("test_support") {
]
deps = [
- "../../../base",
"../../../msgs",
+ "../../../osp_base",
"../../../platform",
"//third_party/googletest:gmock",
]
diff --git a/api/impl/quic/quic_client.h b/api/impl/quic/quic_client.h
index ad42c7d7..3498ffb5 100644
--- a/api/impl/quic/quic_client.h
+++ b/api/impl/quic/quic_client.h
@@ -13,7 +13,7 @@
#include "api/impl/quic/quic_connection_factory.h"
#include "api/impl/quic/quic_service_common.h"
#include "api/public/protocol_connection_client.h"
-#include "base/ip_address.h"
+#include "osp_base/ip_address.h"
namespace openscreen {
diff --git a/api/impl/quic/quic_client_unittest.cc b/api/impl/quic/quic_client_unittest.cc
index dd8089d7..2deb10a8 100644
--- a/api/impl/quic/quic_client_unittest.cc
+++ b/api/impl/quic/quic_client_unittest.cc
@@ -13,7 +13,7 @@
#include "api/public/network_metrics.h"
#include "api/public/network_service_manager.h"
#include "api/public/testing/message_demuxer_test_support.h"
-#include "base/error.h"
+#include "osp_base/error.h"
#include "platform/api/logging.h"
#include "third_party/googletest/src/googlemock/include/gmock/gmock.h"
#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
diff --git a/api/impl/quic/quic_connection_factory.h b/api/impl/quic/quic_connection_factory.h
index 17db6402..993d60b2 100644
--- a/api/impl/quic/quic_connection_factory.h
+++ b/api/impl/quic/quic_connection_factory.h
@@ -9,7 +9,7 @@
#include <vector>
#include "api/impl/quic/quic_connection.h"
-#include "base/ip_address.h"
+#include "osp_base/ip_address.h"
namespace openscreen {
diff --git a/api/impl/quic/quic_connection_factory_impl.cc b/api/impl/quic/quic_connection_factory_impl.cc
index 758286f3..6f3bb895 100644
--- a/api/impl/quic/quic_connection_factory_impl.cc
+++ b/api/impl/quic/quic_connection_factory_impl.cc
@@ -8,7 +8,7 @@
#include <memory>
#include "api/impl/quic/quic_connection_impl.h"
-#include "base/error.h"
+#include "osp_base/error.h"
#include "platform/api/logging.h"
#include "platform/base/event_loop.h"
#include "third_party/chromium_quic/src/base/location.h"
diff --git a/api/impl/quic/quic_connection_factory_impl.h b/api/impl/quic/quic_connection_factory_impl.h
index 6206fedf..1b4b8849 100644
--- a/api/impl/quic/quic_connection_factory_impl.h
+++ b/api/impl/quic/quic_connection_factory_impl.h
@@ -9,7 +9,7 @@
#include <memory>
#include "api/impl/quic/quic_connection_factory.h"
-#include "base/ip_address.h"
+#include "osp_base/ip_address.h"
#include "platform/api/event_waiter.h"
#include "platform/api/socket.h"
#include "third_party/chromium_quic/src/base/at_exit.h"
diff --git a/api/impl/quic/quic_connection_impl.cc b/api/impl/quic/quic_connection_impl.cc
index 5371f68c..341acca0 100644
--- a/api/impl/quic/quic_connection_impl.cc
+++ b/api/impl/quic/quic_connection_impl.cc
@@ -9,7 +9,7 @@
#include "absl/types/optional.h"
#include "api/impl/quic/quic_connection_factory_impl.h"
-#include "base/error.h"
+#include "osp_base/error.h"
#include "platform/api/logging.h"
#include "third_party/chromium_quic/src/net/third_party/quic/platform/impl/quic_chromium_clock.h"
diff --git a/api/impl/quic/quic_connection_impl.h b/api/impl/quic/quic_connection_impl.h
index 3edf4e92..4555df97 100644
--- a/api/impl/quic/quic_connection_impl.h
+++ b/api/impl/quic/quic_connection_impl.h
@@ -9,7 +9,7 @@
#include <memory>
#include "api/impl/quic/quic_connection.h"
-#include "base/ip_address.h"
+#include "osp_base/ip_address.h"
#include "platform/api/socket.h"
#include "third_party/chromium_quic/src/base/callback.h"
#include "third_party/chromium_quic/src/base/location.h"
diff --git a/api/impl/quic/quic_server.h b/api/impl/quic/quic_server.h
index e7c60a72..bfecc71d 100644
--- a/api/impl/quic/quic_server.h
+++ b/api/impl/quic/quic_server.h
@@ -12,7 +12,7 @@
#include "api/impl/quic/quic_connection_factory.h"
#include "api/impl/quic/quic_service_common.h"
#include "api/public/protocol_connection_server.h"
-#include "base/ip_address.h"
+#include "osp_base/ip_address.h"
namespace openscreen {
diff --git a/api/impl/quic/quic_server_unittest.cc b/api/impl/quic/quic_server_unittest.cc
index d722cbd7..64bcffcc 100644
--- a/api/impl/quic/quic_server_unittest.cc
+++ b/api/impl/quic/quic_server_unittest.cc
@@ -12,7 +12,7 @@
#include "api/public/network_metrics.h"
#include "api/public/network_service_manager.h"
#include "api/public/testing/message_demuxer_test_support.h"
-#include "base/error.h"
+#include "osp_base/error.h"
#include "third_party/googletest/src/googlemock/include/gmock/gmock.h"
#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
diff --git a/api/impl/quic/testing/quic_test_support.h b/api/impl/quic/testing/quic_test_support.h
index 85a5dcf0..8aba0a1f 100644
--- a/api/impl/quic/testing/quic_test_support.h
+++ b/api/impl/quic/testing/quic_test_support.h
@@ -15,7 +15,7 @@
#include "api/public/network_metrics.h"
#include "api/public/protocol_connection_client.h"
#include "api/public/protocol_connection_server.h"
-#include "base/ip_address.h"
+#include "osp_base/ip_address.h"
#include "platform/api/time.h"
#include "third_party/googletest/src/googlemock/include/gmock/gmock.h"
diff --git a/api/impl/receiver_list.h b/api/impl/receiver_list.h
index 686b6c74..e4ffe57b 100644
--- a/api/impl/receiver_list.h
+++ b/api/impl/receiver_list.h
@@ -8,7 +8,7 @@
#include <vector>
#include "api/public/service_info.h"
-#include "base/error.h"
+#include "osp_base/error.h"
namespace openscreen {
diff --git a/api/impl/receiver_list_unittest.cc b/api/impl/receiver_list_unittest.cc
index 4fc84502..4fca5f79 100644
--- a/api/impl/receiver_list_unittest.cc
+++ b/api/impl/receiver_list_unittest.cc
@@ -4,7 +4,7 @@
#include "api/impl/receiver_list.h"
-#include "base/error.h"
+#include "osp_base/error.h"
#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
namespace openscreen {
diff --git a/api/impl/service_listener_impl.cc b/api/impl/service_listener_impl.cc
index d04039d3..20be1d4d 100644
--- a/api/impl/service_listener_impl.cc
+++ b/api/impl/service_listener_impl.cc
@@ -4,7 +4,7 @@
#include "api/impl/service_listener_impl.h"
-#include "base/error.h"
+#include "osp_base/error.h"
#include "platform/api/logging.h"
namespace openscreen {
diff --git a/api/impl/service_listener_impl.h b/api/impl/service_listener_impl.h
index f8077798..b86b9c34 100644
--- a/api/impl/service_listener_impl.h
+++ b/api/impl/service_listener_impl.h
@@ -10,8 +10,8 @@
#include "api/impl/receiver_list.h"
#include "api/public/service_info.h"
#include "api/public/service_listener.h"
-#include "base/macros.h"
-#include "base/with_destruction_callback.h"
+#include "osp_base/macros.h"
+#include "osp_base/with_destruction_callback.h"
namespace openscreen {
@@ -79,7 +79,7 @@ class ServiceListenerImpl final : public ServiceListener,
Delegate* const delegate_;
ReceiverList receiver_list_;
- DISALLOW_COPY_AND_ASSIGN(ServiceListenerImpl);
+ OSP_DISALLOW_COPY_AND_ASSIGN(ServiceListenerImpl);
};
} // namespace openscreen
diff --git a/api/impl/service_publisher_impl.h b/api/impl/service_publisher_impl.h
index b3305f22..4f309256 100644
--- a/api/impl/service_publisher_impl.h
+++ b/api/impl/service_publisher_impl.h
@@ -6,8 +6,8 @@
#define API_IMPL_SERVICE_PUBLISHER_IMPL_H_
#include "api/public/service_publisher.h"
-#include "base/macros.h"
-#include "base/with_destruction_callback.h"
+#include "osp_base/macros.h"
+#include "osp_base/with_destruction_callback.h"
namespace openscreen {
@@ -60,7 +60,7 @@ class ServicePublisherImpl final : public ServicePublisher,
Delegate* const delegate_;
- DISALLOW_COPY_AND_ASSIGN(ServicePublisherImpl);
+ OSP_DISALLOW_COPY_AND_ASSIGN(ServicePublisherImpl);
};
} // namespace openscreen
diff --git a/api/impl/testing/fake_mdns_responder_adapter.cc b/api/impl/testing/fake_mdns_responder_adapter.cc
index 64b1be19..6c43959e 100644
--- a/api/impl/testing/fake_mdns_responder_adapter.cc
+++ b/api/impl/testing/fake_mdns_responder_adapter.cc
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "base/error.h"
+#include "osp_base/error.h"
#include "platform/api/logging.h"
namespace openscreen {
diff --git a/api/public/BUILD.gn b/api/public/BUILD.gn
index b74d8ad0..392893bd 100644
--- a/api/public/BUILD.gn
+++ b/api/public/BUILD.gn
@@ -41,7 +41,7 @@ source_set("api") {
"../../msgs",
]
deps = [
- "../../base",
+ "../../osp_base",
"../../platform",
]
if (build_with_chromium) {
diff --git a/api/public/endpoint_request_ids.h b/api/public/endpoint_request_ids.h
index a5a109ce..f8290467 100644
--- a/api/public/endpoint_request_ids.h
+++ b/api/public/endpoint_request_ids.h
@@ -8,7 +8,7 @@
#include <cstdint>
#include <map>
-#include "base/macros.h"
+#include "osp_base/macros.h"
namespace openscreen {
@@ -35,7 +35,7 @@ class EndpointRequestIds {
const Role role_;
std::map<uint64_t, uint64_t> request_ids_by_endpoint_id_;
- DISALLOW_COPY_AND_ASSIGN(EndpointRequestIds);
+ OSP_DISALLOW_COPY_AND_ASSIGN(EndpointRequestIds);
};
} // namespace openscreen
diff --git a/api/public/message_demuxer.cc b/api/public/message_demuxer.cc
index ed1e950b..c558b74e 100644
--- a/api/public/message_demuxer.cc
+++ b/api/public/message_demuxer.cc
@@ -7,8 +7,8 @@
#include <memory>
#include "api/impl/quic/quic_connection.h"
-#include "base/big_endian.h"
-#include "base/error.h"
+#include "osp_base/big_endian.h"
+#include "osp_base/error.h"
#include "platform/api/logging.h"
namespace openscreen {
diff --git a/api/public/message_demuxer.h b/api/public/message_demuxer.h
index b66e6a09..83d060ac 100644
--- a/api/public/message_demuxer.h
+++ b/api/public/message_demuxer.h
@@ -9,8 +9,8 @@
#include <memory>
#include <vector>
-#include "base/error.h"
#include "msgs/osp_messages.h"
+#include "osp_base/error.h"
#include "platform/api/time.h"
namespace openscreen {
diff --git a/api/public/network_metrics.h b/api/public/network_metrics.h
index 4dff66ac..06b5fac5 100644
--- a/api/public/network_metrics.h
+++ b/api/public/network_metrics.h
@@ -7,7 +7,7 @@
#include <cstdint>
-#include "base/time.h"
+#include "osp_base/time.h"
namespace openscreen {
diff --git a/api/public/presentation/presentation_connection.h b/api/public/presentation/presentation_connection.h
index 521e15ca..2c42e3df 100644
--- a/api/public/presentation/presentation_connection.h
+++ b/api/public/presentation/presentation_connection.h
@@ -14,9 +14,9 @@
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "api/public/message_demuxer.h"
-#include "base/error.h"
-#include "base/ip_address.h"
-#include "base/macros.h"
+#include "osp_base/error.h"
+#include "osp_base/ip_address.h"
+#include "osp_base/macros.h"
#include "platform/api/logging.h"
#include "platform/api/time.h"
@@ -87,7 +87,7 @@ class Connection {
virtual void OnBinaryMessage(const std::vector<uint8_t>& data) = 0;
private:
- DISALLOW_COPY_AND_ASSIGN(Delegate);
+ OSP_DISALLOW_COPY_AND_ASSIGN(Delegate);
};
// Allows different close, termination, and destruction behavior for both
@@ -106,7 +106,7 @@ class Connection {
virtual void OnConnectionDestroyed(Connection* connection) = 0;
private:
- DISALLOW_COPY_AND_ASSIGN(ParentDelegate);
+ OSP_DISALLOW_COPY_AND_ASSIGN(ParentDelegate);
};
struct PresentationInfo {
@@ -179,7 +179,7 @@ class Connection {
absl::optional<uint64_t> endpoint_id_;
std::unique_ptr<ProtocolConnection> protocol_connection_;
- DISALLOW_COPY_AND_ASSIGN(Connection);
+ OSP_DISALLOW_COPY_AND_ASSIGN(Connection);
};
class ConnectionManager final : public MessageDemuxer::MessageCallback {
@@ -207,7 +207,7 @@ class ConnectionManager final : public MessageDemuxer::MessageCallback {
MessageDemuxer::MessageWatch close_request_watch_;
MessageDemuxer::MessageWatch close_event_watch_;
- DISALLOW_COPY_AND_ASSIGN(ConnectionManager);
+ OSP_DISALLOW_COPY_AND_ASSIGN(ConnectionManager);
};
} // namespace presentation
diff --git a/api/public/presentation/presentation_controller.h b/api/public/presentation/presentation_controller.h
index 377659c1..4d38fa35 100644
--- a/api/public/presentation/presentation_controller.h
+++ b/api/public/presentation/presentation_controller.h
@@ -14,7 +14,7 @@
#include "api/public/presentation/presentation_connection.h"
#include "api/public/protocol_connection.h"
#include "api/public/service_listener.h"
-#include "base/error.h"
+#include "osp_base/error.h"
#include "platform/api/time.h"
namespace openscreen {
diff --git a/api/public/protocol_connection.h b/api/public/protocol_connection.h
index ee9ff136..447c9879 100644
--- a/api/public/protocol_connection.h
+++ b/api/public/protocol_connection.h
@@ -9,8 +9,8 @@
#include <cstdint>
#include <type_traits>
-#include "base/error.h"
#include "msgs/osp_messages.h"
+#include "osp_base/error.h"
#include "platform/api/logging.h"
namespace openscreen {
diff --git a/api/public/protocol_connection_client.h b/api/public/protocol_connection_client.h
index 7f061b94..89e3b0ed 100644
--- a/api/public/protocol_connection_client.h
+++ b/api/public/protocol_connection_client.h
@@ -12,9 +12,9 @@
#include "api/public/endpoint_request_ids.h"
#include "api/public/message_demuxer.h"
#include "api/public/protocol_connection.h"
-#include "base/error.h"
-#include "base/ip_address.h"
-#include "base/macros.h"
+#include "osp_base/error.h"
+#include "osp_base/ip_address.h"
+#include "osp_base/macros.h"
namespace openscreen {
@@ -113,7 +113,7 @@ class ProtocolConnectionClient {
EndpointRequestIds endpoint_request_ids_;
ProtocolConnectionServiceObserver* const observer_;
- DISALLOW_COPY_AND_ASSIGN(ProtocolConnectionClient);
+ OSP_DISALLOW_COPY_AND_ASSIGN(ProtocolConnectionClient);
};
std::ostream& operator<<(std::ostream& os,
diff --git a/api/public/protocol_connection_server.h b/api/public/protocol_connection_server.h
index 96b07b3d..dc990153 100644
--- a/api/public/protocol_connection_server.h
+++ b/api/public/protocol_connection_server.h
@@ -14,9 +14,9 @@
#include "api/public/message_demuxer.h"
#include "api/public/protocol_connection.h"
#include "api/public/server_config.h"
-#include "base/error.h"
-#include "base/ip_address.h"
-#include "base/macros.h"
+#include "osp_base/error.h"
+#include "osp_base/ip_address.h"
+#include "osp_base/macros.h"
namespace openscreen {
@@ -93,7 +93,7 @@ class ProtocolConnectionServer {
EndpointRequestIds endpoint_request_ids_;
Observer* const observer_;
- DISALLOW_COPY_AND_ASSIGN(ProtocolConnectionServer);
+ OSP_DISALLOW_COPY_AND_ASSIGN(ProtocolConnectionServer);
};
std::ostream& operator<<(std::ostream& os,
diff --git a/api/public/server_config.h b/api/public/server_config.h
index 3d182e8f..967563bb 100644
--- a/api/public/server_config.h
+++ b/api/public/server_config.h
@@ -8,7 +8,7 @@
#include <cstdint>
#include <vector>
-#include "base/ip_address.h"
+#include "osp_base/ip_address.h"
#include "platform/api/network_interface.h"
namespace openscreen {
diff --git a/api/public/service_info.h b/api/public/service_info.h
index a5d7bd88..a7989d37 100644
--- a/api/public/service_info.h
+++ b/api/public/service_info.h
@@ -8,7 +8,7 @@
#include <cstdint>
#include <string>
-#include "base/ip_address.h"
+#include "osp_base/ip_address.h"
#include "platform/api/network_interface.h"
namespace openscreen {
diff --git a/api/public/service_info_unittest.cc b/api/public/service_info_unittest.cc
index f9ccd400..a92f532d 100644
--- a/api/public/service_info_unittest.cc
+++ b/api/public/service_info_unittest.cc
@@ -4,7 +4,7 @@
#include "api/public/service_info.h"
-#include "base/error.h"
+#include "osp_base/error.h"
#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
namespace openscreen {
diff --git a/api/public/service_listener.h b/api/public/service_listener.h
index 9a25bcc4..fab0e22e 100644
--- a/api/public/service_listener.h
+++ b/api/public/service_listener.h
@@ -10,8 +10,8 @@
#include <vector>
#include "api/public/service_info.h"
-#include "base/macros.h"
-#include "base/time.h"
+#include "osp_base/macros.h"
+#include "osp_base/time.h"
namespace openscreen {
@@ -154,7 +154,7 @@ class ServiceListener {
ServiceListenerError last_error_;
std::vector<Observer*> observers_;
- DISALLOW_COPY_AND_ASSIGN(ServiceListener);
+ OSP_DISALLOW_COPY_AND_ASSIGN(ServiceListener);
};
} // namespace openscreen
diff --git a/api/public/service_publisher.h b/api/public/service_publisher.h
index fcf030ac..b57253ef 100644
--- a/api/public/service_publisher.h
+++ b/api/public/service_publisher.h
@@ -9,8 +9,8 @@
#include <string>
#include <vector>
-#include "base/macros.h"
-#include "base/time.h"
+#include "osp_base/macros.h"
+#include "osp_base/time.h"
#include "platform/api/network_interface.h"
namespace openscreen {
@@ -149,7 +149,7 @@ class ServicePublisher {
ServicePublisherError last_error_;
Observer* observer_;
- DISALLOW_COPY_AND_ASSIGN(ServicePublisher);
+ OSP_DISALLOW_COPY_AND_ASSIGN(ServicePublisher);
};
} // namespace openscreen
diff --git a/base/macros.h b/base/macros.h
deleted file mode 100644
index 2be0c5a9..00000000
--- a/base/macros.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_MACROS_H_
-#define BASE_MACROS_H_
-
-// Use this when declaring/defining noexcept move constructors, to work around a
-// bug on older versions of g++.
-//
-// TODO(issues/40): Delete this macro once the g++ version is upgraded on the
-// bots.
-#if defined(__GNUC__) && __GNUC__ < 6
-#define MAYBE_NOEXCEPT
-#else
-#define MAYBE_NOEXCEPT noexcept
-#endif
-
-#define DISALLOW_COPY(ClassName) ClassName(const ClassName&) = delete
-#define DISALLOW_ASSIGN(ClassName) \
- ClassName& operator=(const ClassName&) = delete
-#define DISALLOW_COPY_AND_ASSIGN(ClassName) \
- DISALLOW_COPY(ClassName); \
- DISALLOW_ASSIGN(ClassName)
-#define DISALLOW_IMPLICIT_CONSTRUCTORS(ClassName) \
- ClassName() = delete; \
- DISALLOW_COPY_AND_ASSIGN(ClassName)
-
-#endif // BASE_MACROS_H_
diff --git a/discovery/mdns/BUILD.gn b/discovery/mdns/BUILD.gn
index 4046ac79..95a43d27 100644
--- a/discovery/mdns/BUILD.gn
+++ b/discovery/mdns/BUILD.gn
@@ -13,7 +13,7 @@ source_set("mdns_interface") {
]
public_deps = [
- "../../base",
+ "../../osp_base",
"../../platform",
]
configs += [ "../..:root_config_overrides" ]
@@ -60,7 +60,7 @@ if (use_mdns_responder) {
public_deps = [
":mdns_interface",
- "../../base",
+ "../../osp_base",
"../../platform",
]
diff --git a/discovery/mdns/domain_name.cc b/discovery/mdns/domain_name.cc
index 67efcd5e..9262aa0e 100644
--- a/discovery/mdns/domain_name.cc
+++ b/discovery/mdns/domain_name.cc
@@ -7,7 +7,7 @@
#include <algorithm>
#include <iterator>
-#include "base/stringprintf.h"
+#include "osp_base/stringprintf.h"
namespace openscreen {
namespace mdns {
diff --git a/discovery/mdns/domain_name.h b/discovery/mdns/domain_name.h
index 5c18994e..826dfbb3 100644
--- a/discovery/mdns/domain_name.h
+++ b/discovery/mdns/domain_name.h
@@ -10,7 +10,7 @@
#include <string>
#include <vector>
-#include "base/error.h"
+#include "osp_base/error.h"
#include "platform/api/logging.h"
namespace openscreen {
diff --git a/discovery/mdns/domain_name_unittest.cc b/discovery/mdns/domain_name_unittest.cc
index a6ea3e61..ce5cfca0 100644
--- a/discovery/mdns/domain_name_unittest.cc
+++ b/discovery/mdns/domain_name_unittest.cc
@@ -6,7 +6,7 @@
#include <sstream>
-#include "base/error.h"
+#include "osp_base/error.h"
#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
namespace openscreen {
diff --git a/discovery/mdns/embedder_demo.cc b/discovery/mdns/embedder_demo.cc
index 8d819eba..01ff1a41 100644
--- a/discovery/mdns/embedder_demo.cc
+++ b/discovery/mdns/embedder_demo.cc
@@ -10,8 +10,8 @@
#include <memory>
#include <vector>
-#include "base/error.h"
#include "discovery/mdns/mdns_responder_adapter_impl.h"
+#include "osp_base/error.h"
#include "platform/api/logging.h"
// This file contains a demo of our mDNSResponder wrapper code. It can both
diff --git a/discovery/mdns/mdns_responder_adapter.h b/discovery/mdns/mdns_responder_adapter.h
index 30f11283..d361fc1e 100644
--- a/discovery/mdns/mdns_responder_adapter.h
+++ b/discovery/mdns/mdns_responder_adapter.h
@@ -10,10 +10,10 @@
#include <string>
#include <vector>
-#include "base/error.h"
-#include "base/ip_address.h"
#include "discovery/mdns/domain_name.h"
#include "discovery/mdns/mdns_responder_platform.h"
+#include "osp_base/error.h"
+#include "osp_base/ip_address.h"
#include "platform/api/network_interface.h"
#include "platform/api/socket.h"
#include "platform/base/event_loop.h"
diff --git a/discovery/mdns/mdns_responder_adapter_impl.h b/discovery/mdns/mdns_responder_adapter_impl.h
index 20585c38..ca1cecb5 100644
--- a/discovery/mdns/mdns_responder_adapter_impl.h
+++ b/discovery/mdns/mdns_responder_adapter_impl.h
@@ -9,8 +9,8 @@
#include <memory>
#include <vector>
-#include "base/error.h"
#include "discovery/mdns/mdns_responder_adapter.h"
+#include "osp_base/error.h"
#include "platform/api/socket.h"
#include "third_party/mDNSResponder/src/mDNSCore/mDNSEmbeddedAPI.h"
diff --git a/discovery/mdns/mdns_responder_platform.cc b/discovery/mdns/mdns_responder_platform.cc
index fd1811a6..f4879f0d 100644
--- a/discovery/mdns/mdns_responder_platform.cc
+++ b/discovery/mdns/mdns_responder_platform.cc
@@ -10,8 +10,8 @@
#include <limits>
#include <vector>
-#include "base/error.h"
-#include "base/ip_address.h"
+#include "osp_base/error.h"
+#include "osp_base/ip_address.h"
#include "platform/api/logging.h"
#include "platform/api/network_interface.h"
#include "platform/api/socket.h"
diff --git a/msgs/request_response_handler.h b/msgs/request_response_handler.h
index 66a7da6a..485e7873 100644
--- a/msgs/request_response_handler.h
+++ b/msgs/request_response_handler.h
@@ -10,8 +10,8 @@
#include "api/public/message_demuxer.h"
#include "api/public/protocol_connection.h"
-#include "base/error.h"
-#include "base/macros.h"
+#include "osp_base/error.h"
+#include "osp_base/macros.h"
#include "platform/api/logging.h"
namespace openscreen {
@@ -198,7 +198,7 @@ class RequestResponseHandler : public MessageDemuxer::MessageCallback {
std::vector<RequestWithId> sent_;
MessageDemuxer::MessageWatch response_watch_;
- DISALLOW_COPY_AND_ASSIGN(RequestResponseHandler);
+ OSP_DISALLOW_COPY_AND_ASSIGN(RequestResponseHandler);
};
} // namespace openscreen
diff --git a/base/BUILD.gn b/osp_base/BUILD.gn
index f188ae96..f8766d8c 100644
--- a/base/BUILD.gn
+++ b/osp_base/BUILD.gn
@@ -4,7 +4,7 @@
import("//build_overrides/build.gni")
-source_set("base") {
+source_set("osp_base") {
sources = [
"big_endian.h",
"boringssl_util.cc",
@@ -29,7 +29,7 @@ source_set("base") {
configs += [ "..:root_config_overrides" ]
}
-source_set("base_unittests") {
+source_set("osp_base_unittests") {
testonly = true
sources = [
@@ -40,7 +40,7 @@ source_set("base_unittests") {
]
deps = [
- ":base",
+ ":osp_base",
"../third_party/abseil",
"../third_party/googletest:gmock",
"../third_party/googletest:gtest",
diff --git a/base/DEPS b/osp_base/DEPS
index 96d75425..96d75425 100644
--- a/base/DEPS
+++ b/osp_base/DEPS
diff --git a/base/big_endian.h b/osp_base/big_endian.h
index 2472b626..d4d312ec 100644
--- a/base/big_endian.h
+++ b/osp_base/big_endian.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_BIG_ENDIAN_H_
-#define BASE_BIG_ENDIAN_H_
+#ifndef OSP_BASE_BIG_ENDIAN_H_
+#define OSP_BASE_BIG_ENDIAN_H_
#include <stdint.h>
@@ -103,4 +103,4 @@ inline void WriteBigEndian(Integer val, void* dest) {
} // namespace openscreen
-#endif // BASE_BIG_ENDIAN_H_
+#endif // OSP_BASE_BIG_ENDIAN_H_
diff --git a/base/big_endian_unittest.cc b/osp_base/big_endian_unittest.cc
index 9450d107..dd959073 100644
--- a/base/big_endian_unittest.cc
+++ b/osp_base/big_endian_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/big_endian.h"
+#include "osp_base/big_endian.h"
#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
diff --git a/base/boringssl_util.cc b/osp_base/boringssl_util.cc
index ba3a8415..6c30aa79 100644
--- a/base/boringssl_util.cc
+++ b/osp_base/boringssl_util.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/boringssl_util.h"
+#include "osp_base/boringssl_util.h"
#include "absl/strings/string_view.h"
#include "platform/api/logging.h"
diff --git a/base/boringssl_util.h b/osp_base/boringssl_util.h
index c76c1206..b54e5e16 100644
--- a/base/boringssl_util.h
+++ b/osp_base/boringssl_util.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_BORINGSSL_UTIL_H_
-#define BASE_BORINGSSL_UTIL_H_
+#ifndef OSP_BASE_BORINGSSL_UTIL_H_
+#define OSP_BASE_BORINGSSL_UTIL_H_
namespace openscreen {
@@ -11,4 +11,4 @@ void LogAndClearBoringSslErrors();
} // namespace openscreen
-#endif // BASE_BORINGSSL_UTIL_H_
+#endif // OSP_BASE_BORINGSSL_UTIL_H_
diff --git a/base/error.cc b/osp_base/error.cc
index c7bc455f..c2e9838b 100644
--- a/base/error.cc
+++ b/osp_base/error.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/error.h"
+#include "osp_base/error.h"
namespace openscreen {
diff --git a/base/error.h b/osp_base/error.h
index f3c68294..5ad1792e 100644
--- a/base/error.h
+++ b/osp_base/error.h
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_ERROR_H_
-#define BASE_ERROR_H_
+#ifndef OSP_BASE_ERROR_H_
+#define OSP_BASE_ERROR_H_
#include <ostream>
#include <string>
#include <utility>
-#include "base/macros.h"
+#include "osp_base/macros.h"
namespace openscreen {
@@ -159,9 +159,9 @@ class ErrorOr {
Error error_;
Value value_;
- DISALLOW_COPY_AND_ASSIGN(ErrorOr);
+ OSP_DISALLOW_COPY_AND_ASSIGN(ErrorOr);
};
} // namespace openscreen
-#endif // BASE_ERROR_H_
+#endif // OSP_BASE_ERROR_H_
diff --git a/base/error_unittest.cc b/osp_base/error_unittest.cc
index a16f6efa..8ecd5ce0 100644
--- a/base/error_unittest.cc
+++ b/osp_base/error_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/error.h"
+#include "osp_base/error.h"
#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
diff --git a/base/export.h b/osp_base/export.h
index 4bddb4f3..b11a7428 100644
--- a/base/export.h
+++ b/osp_base/export.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_EXPORT_H_
-#define BASE_EXPORT_H_
+#ifndef OSP_BASE_EXPORT_H_
+#define OSP_BASE_EXPORT_H_
#if defined(WIN32)
@@ -23,4 +23,4 @@
#endif // defined(WIN32)
-#endif // BASE_EXPORT_H_
+#endif // OSP_BASE_EXPORT_H_
diff --git a/base/ip_address.cc b/osp_base/ip_address.cc
index 9f0058f1..479595fe 100644
--- a/base/ip_address.cc
+++ b/osp_base/ip_address.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/ip_address.h"
+#include "osp_base/ip_address.h"
#include <cstring>
#include <iomanip>
diff --git a/base/ip_address.h b/osp_base/ip_address.h
index 1fabd0bd..3462dc0e 100644
--- a/base/ip_address.h
+++ b/osp_base/ip_address.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_IP_ADDRESS_H_
-#define BASE_IP_ADDRESS_H_
+#ifndef OSP_BASE_IP_ADDRESS_H_
+#define OSP_BASE_IP_ADDRESS_H_
#include <array>
#include <cstdint>
@@ -11,7 +11,7 @@
#include <string>
#include <type_traits>
-#include "base/error.h"
+#include "osp_base/error.h"
namespace openscreen {
@@ -108,4 +108,4 @@ std::ostream& operator<<(std::ostream& out, const IPEndpoint& endpoint);
} // namespace openscreen
-#endif // BASE_IP_ADDRESS_H_
+#endif // OSP_BASE_IP_ADDRESS_H_
diff --git a/base/ip_address_unittest.cc b/osp_base/ip_address_unittest.cc
index 1b8d6ded..75459c7e 100644
--- a/base/ip_address_unittest.cc
+++ b/osp_base/ip_address_unittest.cc
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/ip_address.h"
+#include "osp_base/ip_address.h"
-#include "base/error.h"
+#include "osp_base/error.h"
#include "third_party/googletest/src/googlemock/include/gmock/gmock.h"
#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
diff --git a/osp_base/macros.h b/osp_base/macros.h
new file mode 100644
index 00000000..af6f4185
--- /dev/null
+++ b/osp_base/macros.h
@@ -0,0 +1,50 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef OSP_BASE_MACROS_H_
+#define OSP_BASE_MACROS_H_
+
+// Use this when declaring/defining noexcept move constructors, to work around a
+// bug on older versions of g++.
+//
+// TODO(issues/40): Delete this macro once the g++ version is upgraded on the
+// bots.
+#ifndef MAYBE_NOEXCEPT
+#if defined(__GNUC__) && __GNUC__ < 6
+#define MAYBE_NOEXCEPT
+#else
+#define MAYBE_NOEXCEPT noexcept
+#endif
+#endif
+
+#ifdef DISALLOW_COPY
+#define OSP_DISALLOW_COPY DISALLOW_COPY
+#else
+#define OSP_DISALLOW_COPY(ClassName) ClassName(const ClassName&) = delete
+#endif
+
+#ifdef DISALLOW_ASSIGN
+#define OSP_DISALLOW_ASSIGN DISALLOW_ASSIGN
+#else
+#define OSP_DISALLOW_ASSIGN(ClassName) \
+ ClassName& operator=(const ClassName&) = delete
+#endif
+
+#ifdef DISALLOW_COPY_AND_ASSIGN
+#define OSP_DISALLOW_COPY_AND_ASSIGN DISALLOW_COPY_AND_ASSIGN
+#else
+#define OSP_DISALLOW_COPY_AND_ASSIGN(ClassName) \
+ OSP_DISALLOW_COPY(ClassName); \
+ OSP_DISALLOW_ASSIGN(ClassName)
+#endif
+
+#ifdef DISALLOW_IMPLICIT_CONSTRUCTORS
+#define OSP_DISALLOW_IMPLICIT_CONSTRUCTORS DISALLOW_IMPLICIT_CONSTRUCTORS
+#else
+#define OSP_DISALLOW_IMPLICIT_CONSTRUCTORS(ClassName) \
+ ClassName() = delete; \
+ OSP_DISALLOW_COPY_AND_ASSIGN(ClassName)
+#endif
+
+#endif // OSP_BASE_MACROS_H_
diff --git a/base/scoped_pipe.h b/osp_base/scoped_pipe.h
index 830988ca..1e56f948 100644
--- a/base/scoped_pipe.h
+++ b/osp_base/scoped_pipe.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_SCOPED_PIPE_H_
-#define BASE_SCOPED_PIPE_H_
+#ifndef OSP_BASE_SCOPED_PIPE_H_
+#define OSP_BASE_SCOPED_PIPE_H_
#include <unistd.h>
@@ -68,4 +68,4 @@ using ScopedFd = ScopedPipe<IntFdTraits>;
} // namespace openscreen
-#endif // BASE_SCOPED_PIPE_H_
+#endif // OSP_BASE_SCOPED_PIPE_H_
diff --git a/base/scoped_pipe_unittest.cc b/osp_base/scoped_pipe_unittest.cc
index c5a1840b..aed147f5 100644
--- a/base/scoped_pipe_unittest.cc
+++ b/osp_base/scoped_pipe_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/scoped_pipe.h"
+#include "osp_base/scoped_pipe.h"
#include <vector>
diff --git a/base/std_util.h b/osp_base/std_util.h
index a9d3743d..18abdabd 100644
--- a/base/std_util.h
+++ b/osp_base/std_util.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_STD_UTIL_H_
-#define BASE_STD_UTIL_H_
+#ifndef OSP_BASE_STD_UTIL_H_
+#define OSP_BASE_STD_UTIL_H_
#include <map>
@@ -36,4 +36,4 @@ void SortAndDedupeElements(RandomAccessContainer* c) {
} // namespace openscreen
-#endif // BASE_STD_UTIL_H_
+#endif // OSP_BASE_STD_UTIL_H_
diff --git a/base/stringprintf.h b/osp_base/stringprintf.h
index c5eb5385..3f8616b6 100644
--- a/base/stringprintf.h
+++ b/osp_base/stringprintf.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_STRINGPRINTF_H_
-#define BASE_STRINGPRINTF_H_
+#ifndef OSP_BASE_STRINGPRINTF_H_
+#define OSP_BASE_STRINGPRINTF_H_
#include <ostream>
@@ -38,4 +38,4 @@ void PrettyPrintAsciiHex(std::ostream& os, It first, It last) {
} // namespace openscreen
-#endif // BASE_STRINGPRINTF_H_
+#endif // OSP_BASE_STRINGPRINTF_H_
diff --git a/base/time.h b/osp_base/time.h
index 3def00db..09cb2493 100644
--- a/base/time.h
+++ b/osp_base/time.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_TIME_H_
-#define BASE_TIME_H_
+#ifndef OSP_BASE_TIME_H_
+#define OSP_BASE_TIME_H_
namespace openscreen {
@@ -12,4 +12,4 @@ typedef uint64_t timestamp_t;
} // namespace openscreen
-#endif // BASE_TIME_H_
+#endif // OSP_BASE_TIME_H_
diff --git a/base/with_destruction_callback.cc b/osp_base/with_destruction_callback.cc
index 08e02224..f84f41f7 100644
--- a/base/with_destruction_callback.cc
+++ b/osp_base/with_destruction_callback.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/with_destruction_callback.h"
+#include "osp_base/with_destruction_callback.h"
#include "platform/api/logging.h"
diff --git a/base/with_destruction_callback.h b/osp_base/with_destruction_callback.h
index 0c5efab7..6c223cbb 100644
--- a/base/with_destruction_callback.h
+++ b/osp_base/with_destruction_callback.h
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_WITH_DESTRUCTION_CALLBACK_H_
-#define BASE_WITH_DESTRUCTION_CALLBACK_H_
+#ifndef OSP_BASE_WITH_DESTRUCTION_CALLBACK_H_
+#define OSP_BASE_WITH_DESTRUCTION_CALLBACK_H_
-#include "base/macros.h"
+#include "osp_base/macros.h"
namespace openscreen {
@@ -26,9 +26,9 @@ class WithDestructionCallback {
DestructionCallbackFunctionPointer destruction_callback_function_ = nullptr;
void* destruction_callback_state_ = nullptr;
- DISALLOW_COPY_AND_ASSIGN(WithDestructionCallback);
+ OSP_DISALLOW_COPY_AND_ASSIGN(WithDestructionCallback);
};
} // namespace openscreen
-#endif // BASE_WITH_DESTRUCTION_CALLBACK_H_
+#endif // OSP_BASE_WITH_DESTRUCTION_CALLBACK_H_
diff --git a/platform/BUILD.gn b/platform/BUILD.gn
index 2137718b..92a43c4a 100644
--- a/platform/BUILD.gn
+++ b/platform/BUILD.gn
@@ -23,11 +23,11 @@ source_set("platform") {
deps = []
public_deps = [
- "../base",
+ "../osp_base",
"../third_party/abseil",
]
configs += [ "..:root_config_overrides" ]
- allow_circular_includes_from = [ "../base" ]
+ allow_circular_includes_from = [ "../osp_base" ]
if (build_with_chromium) {
deps += [ ":chromium" ]
diff --git a/platform/api/event_waiter.h b/platform/api/event_waiter.h
index d30e2d4a..2d514650 100644
--- a/platform/api/event_waiter.h
+++ b/platform/api/event_waiter.h
@@ -7,7 +7,7 @@
#include <vector>
-#include "base/error.h"
+#include "osp_base/error.h"
#include "platform/api/socket.h"
#include "platform/api/time.h"
diff --git a/platform/api/network_interface.h b/platform/api/network_interface.h
index 10a1b228..c3a2acbb 100644
--- a/platform/api/network_interface.h
+++ b/platform/api/network_interface.h
@@ -8,7 +8,7 @@
#include <string>
#include <vector>
-#include "base/ip_address.h"
+#include "osp_base/ip_address.h"
namespace openscreen {
namespace platform {
diff --git a/platform/api/socket.h b/platform/api/socket.h
index 59f5bcc2..22e7061b 100644
--- a/platform/api/socket.h
+++ b/platform/api/socket.h
@@ -8,9 +8,9 @@
#include <cstdint>
#include <memory>
-#include "base/error.h"
-#include "base/ip_address.h"
-#include "base/macros.h"
+#include "osp_base/error.h"
+#include "osp_base/ip_address.h"
+#include "osp_base/macros.h"
#include "platform/api/network_interface.h"
namespace openscreen {
@@ -83,7 +83,7 @@ class UdpSocket {
~UdpSocket();
private:
- DISALLOW_COPY_AND_ASSIGN(UdpSocket);
+ OSP_DISALLOW_COPY_AND_ASSIGN(UdpSocket);
};
} // namespace platform
diff --git a/platform/base/event_loop.h b/platform/base/event_loop.h
index 22893022..1d4678e8 100644
--- a/platform/base/event_loop.h
+++ b/platform/base/event_loop.h
@@ -11,8 +11,8 @@
#include <cstdint>
#include <vector>
-#include "base/error.h"
-#include "base/ip_address.h"
+#include "osp_base/error.h"
+#include "osp_base/ip_address.h"
#include "platform/api/event_waiter.h"
namespace openscreen {
diff --git a/platform/chromium/logging.cc b/platform/chromium/logging.cc
index 90d3a104..222169a7 100644
--- a/platform/chromium/logging.cc
+++ b/platform/chromium/logging.cc
@@ -4,7 +4,7 @@
#include "platform/api/logging.h"
-#include "base/logging.h"
+#include "osp_base/logging.h"
namespace openscreen {
namespace platform {
diff --git a/platform/linux/network_interface.cc b/platform/linux/network_interface.cc
index dbc2e3d3..234b820d 100644
--- a/platform/linux/network_interface.cc
+++ b/platform/linux/network_interface.cc
@@ -24,8 +24,8 @@
#include <cstring>
#include "absl/strings/string_view.h"
-#include "base/ip_address.h"
-#include "base/scoped_pipe.h"
+#include "osp_base/ip_address.h"
+#include "osp_base/scoped_pipe.h"
#include "platform/api/logging.h"
namespace openscreen {
diff --git a/platform/mac/network_interface.cc b/platform/mac/network_interface.cc
index c36cc8dc..267e7771 100644
--- a/platform/mac/network_interface.cc
+++ b/platform/mac/network_interface.cc
@@ -19,8 +19,8 @@
#include <string>
#include <vector>
-#include "base/ip_address.h"
-#include "base/scoped_pipe.h"
+#include "osp_base/ip_address.h"
+#include "osp_base/scoped_pipe.h"
#include "platform/api/logging.h"
namespace openscreen {
diff --git a/platform/posix/event_waiter.cc b/platform/posix/event_waiter.cc
index b119e8a7..7f1dd0d8 100644
--- a/platform/posix/event_waiter.cc
+++ b/platform/posix/event_waiter.cc
@@ -9,7 +9,7 @@
#include <algorithm>
#include <vector>
-#include "base/error.h"
+#include "osp_base/error.h"
#include "platform/api/logging.h"
#include "platform/posix/socket.h"
diff --git a/platform/posix/socket.cc b/platform/posix/socket.cc
index bcf815de..f04bb00c 100644
--- a/platform/posix/socket.cc
+++ b/platform/posix/socket.cc
@@ -16,7 +16,7 @@
#include <memory>
#include "absl/types/optional.h"
-#include "base/error.h"
+#include "osp_base/error.h"
#include "platform/api/logging.h"
#include "platform/posix/socket.h"
diff --git a/streaming/cast/BUILD.gn b/streaming/cast/BUILD.gn
index e6b3f506..ac1e4b77 100644
--- a/streaming/cast/BUILD.gn
+++ b/streaming/cast/BUILD.gn
@@ -28,12 +28,6 @@ source_set("common") {
"ssrc.h",
]
- # TODO(btolsch): Here and elsewhere, this begs the question of whether we
- # should either change //base to //osp_base (like webrtc) or maybe introduce
- # an osp_source_set template (also like webrtc).
- if (build_with_chromium) {
- configs -= [ "//build/config/compiler:default_include_dirs" ]
- }
configs += [ "../..:root_config_overrides" ]
public_deps = [
"../../third_party/abseil",
@@ -81,9 +75,6 @@ source_set("cast_unittests") {
"ssrc_unittest.cc",
]
- if (build_with_chromium) {
- configs -= [ "//build/config/compiler:default_include_dirs" ]
- }
configs += [ "../..:root_config_overrides" ]
deps = [
":receiver",
diff --git a/streaming/cast/encoded_frame.h b/streaming/cast/encoded_frame.h
index e253dad5..50ecfa9d 100644
--- a/streaming/cast/encoded_frame.h
+++ b/streaming/cast/encoded_frame.h
@@ -10,7 +10,7 @@
#include <chrono>
#include <vector>
-#include "base/macros.h"
+#include "osp_base/macros.h"
#include "platform/api/time.h"
#include "streaming/cast/frame_id.h"
#include "streaming/cast/rtp_time.h"
@@ -83,7 +83,7 @@ struct EncodedFrame {
// The encoded signal data.
std::vector<uint8_t> data;
- DISALLOW_COPY_AND_ASSIGN(EncodedFrame);
+ OSP_DISALLOW_COPY_AND_ASSIGN(EncodedFrame);
};
} // namespace cast_streaming
diff --git a/streaming/cast/frame_crypto.cc b/streaming/cast/frame_crypto.cc
index 2b848c53..ff0ffe5a 100644
--- a/streaming/cast/frame_crypto.cc
+++ b/streaming/cast/frame_crypto.cc
@@ -6,8 +6,8 @@
#include <random>
-#include "base/big_endian.h"
-#include "base/boringssl_util.h"
+#include "osp_base/big_endian.h"
+#include "osp_base/boringssl_util.h"
#include "third_party/boringssl/src/include/openssl/crypto.h"
#include "third_party/boringssl/src/include/openssl/err.h"
#include "third_party/boringssl/src/include/openssl/rand.h"
diff --git a/streaming/cast/frame_crypto.h b/streaming/cast/frame_crypto.h
index 48f96a3d..c9f0f614 100644
--- a/streaming/cast/frame_crypto.h
+++ b/streaming/cast/frame_crypto.h
@@ -11,7 +11,7 @@
#include <array>
#include <vector>
-#include "base/macros.h"
+#include "osp_base/macros.h"
#include "streaming/cast/encoded_frame.h"
#include "third_party/boringssl/src/include/openssl/aes.h"
@@ -31,7 +31,7 @@ struct EncryptedFrame : public EncodedFrame {
friend class FrameCrypto;
EncryptedFrame();
- DISALLOW_COPY_AND_ASSIGN(EncryptedFrame);
+ OSP_DISALLOW_COPY_AND_ASSIGN(EncryptedFrame);
};
// Encrypts EncodedFrames before sending, or decrypts EncryptedFrames that have
diff --git a/streaming/cast/packet_util.h b/streaming/cast/packet_util.h
index f85c38ea..3dbbd3d3 100644
--- a/streaming/cast/packet_util.h
+++ b/streaming/cast/packet_util.h
@@ -8,7 +8,7 @@
#include <utility>
#include "absl/types/span.h"
-#include "base/big_endian.h"
+#include "osp_base/big_endian.h"
#include "streaming/cast/ssrc.h"
namespace openscreen {
diff --git a/streaming/cast/rtp_packetizer.cc b/streaming/cast/rtp_packetizer.cc
index c115286e..4def25fb 100644
--- a/streaming/cast/rtp_packetizer.cc
+++ b/streaming/cast/rtp_packetizer.cc
@@ -8,7 +8,7 @@
#include <limits>
#include <random>
-#include "base/big_endian.h"
+#include "osp_base/big_endian.h"
#include "platform/api/logging.h"
#include "platform/api/time.h"
#include "streaming/cast/packet_util.h"
diff --git a/streaming/cast/ssrc_unittest.cc b/streaming/cast/ssrc_unittest.cc
index 1eac199e..7646e6ab 100644
--- a/streaming/cast/ssrc_unittest.cc
+++ b/streaming/cast/ssrc_unittest.cc
@@ -6,7 +6,7 @@
#include <vector>
-#include "base/std_util.h"
+#include "osp_base/std_util.h"
#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
namespace openscreen {