1 /*
2  * Copyright (c) 2023 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_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PROXY_H
17 #define INTERFACES_INNER_API_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PROXY_H
18 #include "enterprise_device_mgr_proxy.h"
19 
20 namespace OHOS {
21 namespace EDM {
22 class ApplicationManagerProxy {
23 public:
24     static std::shared_ptr<ApplicationManagerProxy> GetApplicationManagerProxy();
25     int32_t AddDisallowedRunningBundles(AppExecFwk::ElementName &admin, std::vector<std::string> &bundles,
26         int32_t userId, bool isSync = false);
27     int32_t RemoveDisallowedRunningBundles(AppExecFwk::ElementName &admin, std::vector<std::string> &bundles,
28         int32_t userId, bool isSync = false);
29     int32_t GetDisallowedRunningBundles(AppExecFwk::ElementName &admin, int32_t userId,
30         std::vector<std::string> &bundles, bool isSync = false);
31     int32_t AddAutoStartApps(const AppExecFwk::ElementName &admin,
32         const std::vector<AppExecFwk::ElementName> &autoStartApps);
33     int32_t RemoveAutoStartApps(const AppExecFwk::ElementName &admin,
34         const std::vector<AppExecFwk::ElementName> &autoStartApps);
35     int32_t GetAutoStartApps(const AppExecFwk::ElementName &admin, std::vector<AppExecFwk::ElementName> &autoStartApps);
36 
37 private:
38     static std::shared_ptr<ApplicationManagerProxy> instance_;
39     static std::mutex mutexLock_;
40 };
41 } // namespace EDM
42 } // namespace OHOS
43 #endif // INTERFACES_INNER_API_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PROXY_H