// Copyright (C) Explorer++ Project // SPDX-License-Identifier: GPL-3.0-only // See LICENSE in the top level directory #pragma once #include #include namespace std { template<> struct hash { size_t operator()(const GUID& guid) const noexcept { const std::uint64_t* p = reinterpret_cast(&guid); std::hash hash; return hash(p[0]) ^ hash(p[1]); } }; } class ServiceProviderBase { public: void RegisterService(REFGUID guidService, IUnknown* service); HRESULT QueryService(REFGUID guidService, REFIID riid, void** ppv); protected: ServiceProviderBase() = default; private: std::unordered_map> m_services; };