1 /* 2 * Copyright (C) 2025 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 "photo_asset_custom_record.h" 17 18 #include "media_file_utils.h" 19 #include "medialibrary_type_const.h" 20 21 namespace OHOS { 22 namespace Media { PhotoAssetCustomRecord()23PhotoAssetCustomRecord::PhotoAssetCustomRecord() 24 { 25 fileId_ = DEFAULT_FILE_ID; 26 shareCount_ = DEFAULT_SHARE_COUNT; 27 lcdJumpCount_ = DEFAULT_LCD_JUMO_COUNT; 28 resultNapiType_ = ResultNapiType::TYPE_PHOTOACCESS_HELPER; 29 count_ = DEFAULT_COUNT; 30 } 31 32 PhotoAssetCustomRecord::~PhotoAssetCustomRecord() = default; 33 SetFileId(const int32_t fileId)34void PhotoAssetCustomRecord::SetFileId(const int32_t fileId) 35 { 36 fileId_ = fileId; 37 } 38 SetShareCount(const int32_t shareCount)39void PhotoAssetCustomRecord::SetShareCount(const int32_t shareCount) 40 { 41 shareCount_ = shareCount; 42 } 43 SetLcdJumpCount(const int32_t lcdJumpCount)44void PhotoAssetCustomRecord::SetLcdJumpCount(const int32_t lcdJumpCount) 45 { 46 lcdJumpCount_ = lcdJumpCount; 47 } 48 SetResultNapiType(const ResultNapiType type)49void PhotoAssetCustomRecord::SetResultNapiType(const ResultNapiType type) 50 { 51 resultNapiType_ = type; 52 } 53 GetFileId() const54int32_t PhotoAssetCustomRecord::GetFileId() const 55 { 56 return fileId_; 57 } 58 GetShareCount() const59int32_t PhotoAssetCustomRecord::GetShareCount() const 60 { 61 return shareCount_; 62 } 63 GetLcdJumpCount() const64int32_t PhotoAssetCustomRecord::GetLcdJumpCount() const 65 { 66 return lcdJumpCount_; 67 } 68 GetResultNapiType() const69ResultNapiType PhotoAssetCustomRecord::GetResultNapiType() const 70 { 71 return resultNapiType_; 72 } 73 GetCount() const74int32_t PhotoAssetCustomRecord::GetCount() const 75 { 76 return count_; 77 } 78 } // namespace Media 79 } // namespace OHOS