1 /* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef SYSTEM_PROPERTIES_ADAPTER_IMPL_H 17 #define SYSTEM_PROPERTIES_ADAPTER_IMPL_H 18 19 #include "system_properties_adapter.h" 20 21 namespace OHOS::NWeb { 22 23 class SystemPropertiesAdapterImpl : public SystemPropertiesAdapter { 24 public: 25 static SystemPropertiesAdapterImpl& GetInstance(); 26 27 ~SystemPropertiesAdapterImpl() override = default; 28 29 bool GetResourceUseHapPathEnable() const override; 30 31 std::string GetDeviceInfoProductModel() const override; 32 33 std::string GetDeviceInfoBrand() const override; 34 35 int32_t GetDeviceInfoMajorVersion() const override; 36 37 ProductDeviceType GetProductDeviceType() const override; 38 39 private: 40 SystemPropertiesAdapterImpl() = default; 41 42 SystemPropertiesAdapterImpl(const SystemPropertiesAdapterImpl& other) = delete; 43 44 SystemPropertiesAdapterImpl& operator=(const SystemPropertiesAdapterImpl&) = delete; 45 }; 46 47 } // namespace OHOS::NWeb 48 49 #endif // SYSTEM_PROPERTIES_ADAPTER_IMPL_H