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 #include "dir_asset.h" 17 18 #include "medialibrary_type_const.h" 19 20 using namespace std; 21 22 namespace OHOS { 23 namespace Media { DirAsset()24DirAsset::DirAsset() 25 { 26 dirType_ = DEFAULT_DIR_TYPE; 27 mediaTypes_ = DEFAULT_STRING_MEDIA_TYPE; 28 directory_ = DEFAULT_DIRECTORY; 29 extensions_ = DEFAULT_EXTENSION; 30 }; 31 DirAsset::~DirAsset() = default; 32 SetDirType(const int32_t dirtype)33void DirAsset::SetDirType(const int32_t dirtype) 34 { 35 dirType_ = dirtype; 36 } 37 SetDirectory(const string directory)38void DirAsset::SetDirectory(const string directory) 39 { 40 directory_ = directory; 41 } 42 SetExtensions(const string extensions)43void DirAsset::SetExtensions(const string extensions) 44 { 45 extensions_ = extensions; 46 } 47 SetMediaTypes(const string mediaTypes)48void DirAsset::SetMediaTypes(const string mediaTypes) 49 { 50 mediaTypes_ = mediaTypes; 51 } 52 GetDirType() const53int32_t DirAsset::GetDirType() const 54 { 55 return dirType_; 56 } 57 GetMediaTypes() const58string DirAsset::GetMediaTypes() const 59 { 60 return mediaTypes_; 61 } 62 GetDirectory() const63string DirAsset::GetDirectory() const 64 { 65 return directory_; 66 } 67 GetExtensions() const68string DirAsset::GetExtensions() const 69 { 70 return extensions_; 71 } 72 } // namespace Media 73 } // namespace OHOS 74