Internal change

PiperOrigin-RevId: 385190129
This commit is contained in:
hai007
2021-07-16 11:36:42 -07:00
committed by Copybara-Service
parent ed511f962d
commit ee320905b9
25 changed files with 843 additions and 5893 deletions
+36
View File
@@ -0,0 +1,36 @@
# 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.
cc_library(
name = "types",
linkopts = [
"advapi32.lib",
"comdlg32.lib",
"gdi32.lib",
"kernel32.lib",
"odbc32.lib",
"odbccp32.lib",
"ole32.lib",
"oleaut32.lib",
"shell32.lib",
"user32.lib",
"uuid.lib",
"winmm.lib",
"winspool.lib",
],
textual_hdrs = glob(["**/*.h"]),
visibility = [
"//platform/impl/windows:__subpackages__",
],
)
@@ -1,63 +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.
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.210505.3
#pragma once
#include "winrt/location.nearby.windows.h"
namespace winrt::location::nearby::windows::implementation
{
template <typename D, typename... I>
struct __declspec(empty_bases) BluetoothClassicMedium_base : implements<D, location::nearby::windows::BluetoothClassicMedium, I...>
{
using base_type = BluetoothClassicMedium_base;
using class_type = location::nearby::windows::BluetoothClassicMedium;
using implements_type = typename BluetoothClassicMedium_base::implements_type;
using implements_type::implements_type;
hstring GetRuntimeClassName() const
{
return L"location.nearby.windows.BluetoothClassicMedium";
}
};
}
namespace winrt::location::nearby::windows::factory_implementation
{
template <typename D, typename T, typename... I>
struct __declspec(empty_bases) BluetoothClassicMediumT : implements<D, winrt::Windows::Foundation::IActivationFactory, I...>
{
using instance_type = location::nearby::windows::BluetoothClassicMedium;
hstring GetRuntimeClassName() const
{
return L"location.nearby.windows.BluetoothClassicMedium";
}
auto ActivateInstance() const
{
return make<T>();
}
};
}
#if defined(WINRT_FORCE_INCLUDE_BLUETOOTHCLASSICMEDIUM_XAML_G_H) || __has_include("BluetoothClassicMedium.xaml.g.h")
#include "BluetoothClassicMedium.xaml.g.h"
#else
namespace winrt::location::nearby::windows::implementation
{
template <typename D, typename... I>
using BluetoothClassicMediumT = BluetoothClassicMedium_base<D, I...>;
}
#endif
@@ -1,63 +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.
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.210505.3
#pragma once
#include "winrt/location.nearby.windows.h"
namespace winrt::location::nearby::windows::implementation
{
template <typename D, typename... I>
struct __declspec(empty_bases) BluetoothClassicMedium_base : implements<D, location::nearby::windows::BluetoothClassicMedium, I...>
{
using base_type = BluetoothClassicMedium_base;
using class_type = location::nearby::windows::BluetoothClassicMedium;
using implements_type = typename BluetoothClassicMedium_base::implements_type;
using implements_type::implements_type;
hstring GetRuntimeClassName() const
{
return L"location.nearby.windows.BluetoothClassicMedium";
}
};
}
namespace winrt::location::nearby::windows::factory_implementation
{
template <typename D, typename T, typename... I>
struct __declspec(empty_bases) BluetoothClassicMediumT : implements<D, winrt::Windows::Foundation::IActivationFactory, I...>
{
using instance_type = location::nearby::windows::BluetoothClassicMedium;
hstring GetRuntimeClassName() const
{
return L"location.nearby.windows.BluetoothClassicMedium";
}
auto ActivateInstance() const
{
return make<T>();
}
};
}
#if defined(WINRT_FORCE_INCLUDE_BLUETOOTHCLASSICMEDIUM_XAML_G_H) || __has_include("location.nearby.windows.BluetoothClassicMedium.xaml.g.h")
#include "location.nearby.windows.BluetoothClassicMedium.xaml.g.h"
#else
namespace winrt::location::nearby::windows::implementation
{
template <typename D, typename... I>
using BluetoothClassicMediumT = BluetoothClassicMedium_base<D, I...>;
}
#endif
@@ -1,75 +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.
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.210505.3
#include "pch.h"
#include "winrt/base.h"
#include "BluetoothClassicMedium.h"
bool __stdcall winrt_can_unload_now() noexcept
{
if (winrt::get_module_lock())
{
return false;
}
winrt::clear_factory_cache();
return true;
}
void* __stdcall winrt_get_activation_factory([[maybe_unused]] std::wstring_view const& name)
{
auto requal = [](std::wstring_view const& left, std::wstring_view const& right) noexcept
{
return std::equal(left.rbegin(), left.rend(), right.rbegin(), right.rend());
};
if (requal(name, L"location.nearby.windows.BluetoothClassicMedium"))
{
return winrt::detach_abi(winrt::make<winrt::location::nearby::windows::factory_implementation::BluetoothClassicMedium>());
}
return nullptr;
}
int32_t __stdcall WINRT_CanUnloadNow() noexcept
{
#ifdef _WRL_MODULE_H_
if (!::Microsoft::WRL::Module<::Microsoft::WRL::InProc>::GetModule().Terminate())
{
return 1;
}
#endif
return winrt_can_unload_now() ? 0 : 1;
}
int32_t __stdcall WINRT_GetActivationFactory(void* classId, void** factory) noexcept try
{
std::wstring_view const name{ *reinterpret_cast<winrt::hstring*>(&classId) };
*factory = winrt_get_activation_factory(name);
if (*factory)
{
return 0;
}
#ifdef _WRL_MODULE_H_
return ::Microsoft::WRL::Module<::Microsoft::WRL::InProc>::GetModule().GetActivationFactory(static_cast<HSTRING>(classId), reinterpret_cast<::IActivationFactory**>(factory));
#else
return winrt::hresult_class_not_available(name).to_abi();
#endif
}
catch (...) { return winrt::to_hresult(); }
@@ -1,24 +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 "pch.h"
#include "BluetoothClassicMedium.h"
// Note: Remove this static_assert after copying these generated source files to your project.
// This assertion exists to avoid compiling these generated source files directly.
static_assert(false, "Do not compile generated C++/WinRT source files directly");
namespace winrt::location::nearby::windows::implementation
{
}
@@ -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.
#pragma once
#include "BluetoothClassicMedium.g.h"
// Note: Remove this static_assert after copying these generated source files to your project.
// This assertion exists to avoid compiling these generated source files directly.
static_assert(false, "Do not compile generated C++/WinRT source files directly");
namespace winrt::location::nearby::windows::implementation
{
struct BluetoothClassicMedium : BluetoothClassicMediumT<BluetoothClassicMedium>
{
BluetoothClassicMedium() = default;
};
}
namespace winrt::location::nearby::windows::factory_implementation
{
struct BluetoothClassicMedium : BluetoothClassicMediumT<BluetoothClassicMedium, implementation::BluetoothClassicMedium>
{
};
}
@@ -1,24 +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 "pch.h"
#include "location.nearby.windows.BluetoothClassicMedium.h"
// Note: Remove this static_assert after copying these generated source files to your project.
// This assertion exists to avoid compiling these generated source files directly.
static_assert(false, "Do not compile generated C++/WinRT source files directly");
namespace winrt::location::nearby::windows::implementation
{
}
@@ -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.
#pragma once
#include "location.nearby.windows.BluetoothClassicMedium.g.h"
// Note: Remove this static_assert after copying these generated source files to your project.
// This assertion exists to avoid compiling these generated source files directly.
static_assert(false, "Do not compile generated C++/WinRT source files directly");
namespace winrt::location::nearby::windows::implementation
{
struct BluetoothClassicMedium : BluetoothClassicMediumT<BluetoothClassicMedium>
{
BluetoothClassicMedium() = default;
};
}
namespace winrt::location::nearby::windows::factory_implementation
{
struct BluetoothClassicMedium : BluetoothClassicMediumT<BluetoothClassicMedium, implementation::BluetoothClassicMedium>
{
};
}
File diff suppressed because it is too large Load Diff
@@ -1,47 +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.
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.210505.3
#ifndef WINRT_location_nearby_windows_0_H
#define WINRT_location_nearby_windows_0_H
WINRT_EXPORT namespace winrt::location::nearby::windows
{
struct IBluetoothClassicMedium;
struct BluetoothClassicMedium;
}
namespace winrt::impl
{
template <> struct category<winrt::location::nearby::windows::IBluetoothClassicMedium>{ using type = interface_category; };
template <> struct category<winrt::location::nearby::windows::BluetoothClassicMedium>{ using type = class_category; };
template <> inline constexpr auto& name_v<winrt::location::nearby::windows::BluetoothClassicMedium> = L"location.nearby.windows.BluetoothClassicMedium";
template <> inline constexpr auto& name_v<winrt::location::nearby::windows::IBluetoothClassicMedium> = L"location.nearby.windows.IBluetoothClassicMedium";
template <> inline constexpr guid guid_v<winrt::location::nearby::windows::IBluetoothClassicMedium>{ 0x4F571DCA,0x9274,0x5AB4,{ 0x84,0x58,0x4A,0x94,0x69,0x24,0xDB,0xEE } }; // 4F571DCA-9274-5AB4-8458-4A946924DBEE
template <> struct default_interface<winrt::location::nearby::windows::BluetoothClassicMedium>{ using type = winrt::location::nearby::windows::IBluetoothClassicMedium; };
template <> struct abi<winrt::location::nearby::windows::IBluetoothClassicMedium>
{
struct __declspec(novtable) type : inspectable_abi
{
};
};
template <typename D>
struct consume_location_nearby_windows_IBluetoothClassicMedium
{
};
template <> struct consume<winrt::location::nearby::windows::IBluetoothClassicMedium>
{
template <typename D> using type = consume_location_nearby_windows_IBluetoothClassicMedium<D>;
};
}
#endif
@@ -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.
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.210505.3
#ifndef WINRT_location_nearby_windows_1_H
#define WINRT_location_nearby_windows_1_H
#include "winrt/impl/location.nearby.windows.0.h"
WINRT_EXPORT namespace winrt::location::nearby::windows
{
struct __declspec(empty_bases) IBluetoothClassicMedium :
winrt::Windows::Foundation::IInspectable,
impl::consume_t<IBluetoothClassicMedium>
{
IBluetoothClassicMedium(std::nullptr_t = nullptr) noexcept {}
IBluetoothClassicMedium(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {}
IBluetoothClassicMedium(IBluetoothClassicMedium const&) noexcept = default;
IBluetoothClassicMedium(IBluetoothClassicMedium&&) noexcept = default;
IBluetoothClassicMedium& operator=(IBluetoothClassicMedium const&) & noexcept = default;
IBluetoothClassicMedium& operator=(IBluetoothClassicMedium&&) & noexcept = default;
};
}
#endif
@@ -1,33 +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.
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.210505.3
#ifndef WINRT_location_nearby_windows_2_H
#define WINRT_location_nearby_windows_2_H
#include "winrt/impl/location.nearby.windows.1.h"
WINRT_EXPORT namespace winrt::location::nearby::windows
{
struct __declspec(empty_bases) BluetoothClassicMedium : winrt::location::nearby::windows::IBluetoothClassicMedium
{
BluetoothClassicMedium(std::nullptr_t) noexcept {}
BluetoothClassicMedium(void* ptr, take_ownership_from_abi_t) noexcept : winrt::location::nearby::windows::IBluetoothClassicMedium(ptr, take_ownership_from_abi) {}
BluetoothClassicMedium();
BluetoothClassicMedium(BluetoothClassicMedium const&) noexcept = default;
BluetoothClassicMedium(BluetoothClassicMedium&&) noexcept = default;
BluetoothClassicMedium& operator=(BluetoothClassicMedium const&) & noexcept = default;
BluetoothClassicMedium& operator=(BluetoothClassicMedium&&) & noexcept = default;
};
}
#endif
@@ -1,44 +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.
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.210505.3
#ifndef WINRT_location_nearby_windows_H
#define WINRT_location_nearby_windows_H
#include "winrt/base.h"
static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.210505.3"), "Mismatched C++/WinRT headers.");
#define CPPWINRT_VERSION "2.0.210505.3"
#include "winrt/impl/location.nearby.windows.2.h"
namespace winrt::impl
{
template <typename D>
struct produce<D, winrt::location::nearby::windows::IBluetoothClassicMedium> : produce_base<D, winrt::location::nearby::windows::IBluetoothClassicMedium>
{
};
}
WINRT_EXPORT namespace winrt::location::nearby::windows
{
inline BluetoothClassicMedium::BluetoothClassicMedium() :
BluetoothClassicMedium(impl::call_factory_cast<BluetoothClassicMedium(*)(winrt::Windows::Foundation::IActivationFactory const&), BluetoothClassicMedium>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<BluetoothClassicMedium>(); }))
{
}
}
namespace std
{
#ifndef WINRT_LEAN_AND_MEAN
template<> struct hash<winrt::location::nearby::windows::IBluetoothClassicMedium> : winrt::impl::hash_base {};
template<> struct hash<winrt::location::nearby::windows::BluetoothClassicMedium> : winrt::impl::hash_base {};
#endif
}
#endif