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 #ifndef UI_APPEARANCE_ABILITY_PROXY_H 16 #define UI_APPEARANCE_ABILITY_PROXY_H 17 18 #include "iremote_proxy.h" 19 #include "ui_appearance_ability_interface.h" 20 21 namespace OHOS { 22 namespace ArkUi::UiAppearance { 23 class UiAppearanceAbilityProxy : public IRemoteProxy<UiAppearanceAbilityInterface> { 24 public: 25 int32_t SetDarkMode(DarkMode mode) override; 26 int32_t GetDarkMode() override; 27 int32_t SetFontScale(std::string& fontScale) override; 28 int32_t GetFontScale(std::string& fontScale) override; 29 int32_t SetFontWeightScale(std::string& fontWeightScale) override; 30 int32_t GetFontWeightScale(std::string& fontWeightScale) override; 31 UiAppearanceAbilityProxy(const sptr<IRemoteObject> & impl)32 explicit UiAppearanceAbilityProxy(const sptr<IRemoteObject>& impl) 33 : IRemoteProxy<UiAppearanceAbilityInterface>(impl) 34 {} 35 ~UiAppearanceAbilityProxy() = default; 36 37 private: 38 static inline BrokerDelegator<UiAppearanceAbilityProxy> delegator_; 39 }; 40 } // namespace ArkUi::UiAppearance 41 } // namespace OHOS 42 #endif // UI_APPEARANCE_ABILITY_PROXY_H