// 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 "platform/api/platform.h" #include "platform/impl/shared/file.h" #include "platform/impl/windows/atomic_boolean.h" #include "platform/impl/windows/atomic_reference.h" #include "platform/impl/windows/ble.h" #include "platform/impl/windows/bluetooth_adapter.h" #include "platform/impl/windows/bluetooth_classic.h" #include "platform/impl/windows/cancelable.h" #include "platform/impl/windows/condition_variable.h" #include "platform/impl/windows/count_down_latch.h" #include "platform/impl/windows/executor.h" #include "platform/impl/windows/future.h" #include "platform/impl/windows/listenable_future.h" #include "platform/impl/windows/log_message.h" #include "platform/impl/windows/mutex.h" #include "platform/impl/windows/scheduled_executor.h" #include "platform/impl/windows/server_sync.h" #include "platform/impl/windows/settable_future.h" #include "platform/impl/windows/submittable_executor.h" #include "platform/impl/windows/webrtc.h" #include "platform/impl/windows/wifi.h" #include "platform/impl/windows/wifi_lan.h" namespace location { namespace nearby { namespace api { namespace { std::string GetPayloadPath(PayloadId payload_id) { return absl::StrCat("/tmp/", payload_id); } } // namespace // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateAtomicBoolean( bool initial_value) { return absl::make_unique(); } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateAtomicUint32( std::uint32_t value) { return absl::make_unique(); } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateCountDownLatch( std::int32_t count) { return absl::make_unique(); } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateMutex(Mutex::Mode mode) { return absl::make_unique(); } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateConditionVariable(Mutex* mutex) { return std::unique_ptr(new windows::ConditionVariable()); } std::unique_ptr ImplementationPlatform::CreateInputFile( PayloadId payload_id, std::int64_t total_size) { return absl::make_unique( GetPayloadPath(payload_id), total_size); } std::unique_ptr ImplementationPlatform::CreateOutputFile( PayloadId payload_id) { return absl::make_unique( GetPayloadPath(payload_id)); } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateLogMessage( const char* file, int line, LogMessage::Severity severity) { return absl::make_unique(file, line, severity); } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateSingleThreadExecutor() { return absl::make_unique(); } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateMultiThreadExecutor( std::int32_t max_concurrency) { return absl::make_unique(); } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateScheduledExecutor() { return absl::make_unique(); } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateBluetoothAdapter() { return absl::make_unique(); } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateBluetoothClassicMedium( BluetoothAdapter& adapter) { return absl::make_unique(); } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateBleMedium( BluetoothAdapter& adapter) { return absl::make_unique(); } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateBleV2Medium( BluetoothAdapter&) { return nullptr; } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateServerSyncMedium() { return std::unique_ptr(); } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateWifiMedium() { return std::unique_ptr(); } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateWifiLanMedium() { return absl::make_unique(); } // TODO(b/184975123): replace with real implementation. std::unique_ptr ImplementationPlatform::CreateWebRtcMedium() { return absl::make_unique(); } } // namespace api } // namespace nearby } // namespace location