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