• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 SERVICES_INCLUDE_WALLPAPER_DATA_H
17 #define SERVICES_INCLUDE_WALLPAPER_DATA_H
18 #include <vector>
19 #include "wallpaper_manager_common_info.h"
20 #include "i_wallpaper_manager_callback.h"
21 #include "component_name.h"
22 
23 namespace OHOS {
24 namespace WallpaperMgrService {
25 class WallpaperData {
26 public:
27     int userId_;
28     std::string wallpaperFile_; // source image
29     std::string cropFile_;      // eventual destination
30     IWallpaperManagerCallback* setComplete;
31     std::string name_;
32     int wallpaperId_;
33     std::vector<RgbaColor> mMainColors_;
34     bool allowBackup;
35     /**
36      * The component name of the currently set live wallpaper.
37      */
38     ComponentName wallpaperComponent;
39 
40 public:
41     WallpaperData(int userId,  std::string wallpaperFileName, std::string cropFileName);
42     // Called during initialization of a given user's wallpaper bookkeeping
43     bool cropExists();
44     /* {
45         return cropFile.exists();
46     } */
47 
48     bool sourceExists();
49     /* {
50         return wallpaperFile.exists();
51     } */
52 private:
53 };
54 }
55 } // namespace OHOS
56 #endif // SERVICES_INCLUDE_WALLPAPER_DATA_H
57