#include "platform_v2/api/platform.h" #include #include #include "platform_v2/api/atomic_boolean.h" #include "platform_v2/api/atomic_reference.h" #include "platform_v2/api/ble.h" #include "platform_v2/api/ble_v2.h" #include "platform_v2/api/bluetooth_adapter.h" #include "platform_v2/api/bluetooth_classic.h" #include "platform_v2/api/condition_variable.h" #include "platform_v2/api/count_down_latch.h" #include "platform_v2/api/mutex.h" #include "platform_v2/api/scheduled_executor.h" #include "platform_v2/api/server_sync.h" #include "platform_v2/api/settable_future.h" #include "platform_v2/api/submittable_executor.h" #include "platform_v2/api/webrtc.h" #include "platform_v2/api/wifi.h" #include "platform_v2/impl/g3/atomic_boolean.h" #include "platform_v2/impl/g3/atomic_reference_any.h" #include "platform_v2/impl/g3/bluetooth_adapter.h" #include "platform_v2/impl/g3/condition_variable.h" #include "platform_v2/impl/g3/count_down_latch.h" #include "platform_v2/impl/g3/multi_thread_executor.h" #include "platform_v2/impl/g3/mutex.h" #include "platform_v2/impl/g3/scheduled_executor.h" #include "platform_v2/impl/g3/settable_future_any.h" #include "platform_v2/impl/g3/single_thread_executor.h" #include "absl/base/integral_types.h" #include "absl/memory/memory.h" #include "absl/time/time.h" namespace location { namespace nearby { namespace api { std::unique_ptr ImplementationPlatform::CreateSingleThreadExecutor() { return absl::make_unique(); } std::unique_ptr ImplementationPlatform::CreateMultiThreadExecutor(int max_concurrency) { return absl::make_unique(max_concurrency); } std::unique_ptr ImplementationPlatform::CreateScheduledExecutor() { return absl::make_unique(); } std::unique_ptr> ImplementationPlatform::CreateAtomicReferenceAny(absl::any initial_value) { return absl::make_unique(initial_value); } std::unique_ptr> ImplementationPlatform::CreateSettableFutureAny() { return absl::make_unique(); } std::unique_ptr ImplementationPlatform::CreateBluetoothAdapter() { return absl::make_unique(); } std::unique_ptr ImplementationPlatform::CreateCountDownLatch( std::int32_t count) { return absl::make_unique(count); } std::unique_ptr ImplementationPlatform::CreateAtomicBoolean( bool initial_value) { return absl::make_unique(initial_value); } std::unique_ptr ImplementationPlatform::CreateBluetoothClassicMedium() { return std::unique_ptr(); } std::unique_ptr ImplementationPlatform::CreateBleMedium() { return std::unique_ptr(); } std::unique_ptr ImplementationPlatform::CreateBleV2Medium() { return std::unique_ptr(); } std::unique_ptr ImplementationPlatform::CreateServerSyncMedium() { return std::unique_ptr(/*new ServerSyncMediumImpl()*/); } std::unique_ptr ImplementationPlatform::CreateWifiMedium() { return std::unique_ptr(); } std::unique_ptr ImplementationPlatform::CreateWifiLanMedium() { return std::unique_ptr(); } std::unique_ptr ImplementationPlatform::CreateWebRtcSignalingMessenger( absl::string_view self_id) { return std::unique_ptr( /*new FCMSignalingMessenger()*/); } std::unique_ptr ImplementationPlatform::CreateMutex(Mutex::Mode mode) { if (mode == Mutex::Mode::kRecursive) return absl::make_unique(); else return absl::make_unique(mode == Mutex::Mode::kRegular); } std::unique_ptr ImplementationPlatform::CreateConditionVariable(Mutex* mutex) { return std::unique_ptr( new g3::ConditionVariable(static_cast(mutex))); } std::string ImplementationPlatform::GetDeviceId() { // TODO(alexchau): Get deviceId from base return "google3"; } std::string ImplementationPlatform::GetPayloadPath(int64_t payload_id) { return "/tmp/" + std::to_string(payload_id); } } // namespace api } // namespace nearby } // namespace location