• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 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 #include "hilog_wrapper.h"
17 #include "wallpaper_manager.h"
18 #include "wallpaper_manager_client.h"
19 
20 namespace OHOS {
21 namespace WallpaperMgrService {
WallpaperManagerClient()22 WallpaperManagerClient::WallpaperManagerClient()
23 {
24 }
~WallpaperManagerClient()25 WallpaperManagerClient::~WallpaperManagerClient()
26 {
27 }
GetInstance()28 WallpaperManagerClient &WallpaperManagerClient::GetInstance()
29 {
30     static WallpaperManagerClient client;
31     return client;
32 }
IsDefaultWallpaperResource(int32_t userId,int32_t wallpaperType)33 bool WallpaperManagerClient::IsDefaultWallpaperResource(int32_t userId, int32_t wallpaperType)
34 {
35     HILOG_DEBUG("WallpaperManagerClient IsDefaultResource.");
36     return WallpaperManager::GetInstance().IsDefaultWallpaperResource(userId, wallpaperType);
37 }
38 
SetAllWallpapers(std::vector<WallpaperInfo> allWallpaperInfos,int32_t wallpaperType)39 int32_t WallpaperManagerClient::SetAllWallpapers(std::vector<WallpaperInfo> allWallpaperInfos, int32_t wallpaperType)
40 {
41     HILOG_DEBUG("WallpaperManagerClient SetAllWallpapers.");
42     ErrorCode wallpaperErrorCode = WallpaperManager::GetInstance().SetAllWallpapers(allWallpaperInfos, wallpaperType);
43     return static_cast<int32_t>(wallpaperErrorCode);
44 }
45 
46 } // namespace WallpaperMgrService
47 } // namespace OHOS