1 /* 2 * Copyright (c) 2023-2024 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 INTERFACES_INNER_API_SYSTEM_MANAGER_INCLUDE_SYSTEM_MANAGER_PROXY_H 17 #define INTERFACES_INNER_API_SYSTEM_MANAGER_INCLUDE_SYSTEM_MANAGER_PROXY_H 18 19 #include "enterprise_device_mgr_proxy.h" 20 21 #include "update_policy_utils.h" 22 23 namespace OHOS { 24 namespace EDM { 25 class SystemManagerProxy { 26 public: 27 static std::shared_ptr<SystemManagerProxy> GetSystemManagerProxy(); 28 int32_t SetNTPServer(MessageParcel &data); 29 int32_t GetNTPServer(MessageParcel &data, std::string &value); 30 int32_t SetOTAUpdatePolicy(MessageParcel &data, std::string &errorMsg); 31 int32_t GetOTAUpdatePolicy(MessageParcel &data, UpdatePolicy &updatePolicy); 32 int32_t NotifyUpdatePackages(const AppExecFwk::ElementName &admin, UpgradePackageInfo &packageInfo, 33 std::string &errMsg); 34 int32_t GetUpgradeResult(const AppExecFwk::ElementName &admin, const std::string &version, 35 UpgradeResult &upgradeResult); 36 int32_t GetUpdateAuthData(MessageParcel &data, std::string &authData); 37 38 private: 39 static std::shared_ptr<SystemManagerProxy> instance_; 40 static std::once_flag flag_; 41 }; 42 } // namespace EDM 43 } // namespace OHOS 44 45 #endif // INTERFACES_INNER_API_SYSTEM_MANAGER_INCLUDE_SYSTEM_MANAGER_PROXY_H 46