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 #ifndef IM_EFILTER_CACHE_CONFIG_H 17 #define IM_EFILTER_CACHE_CONFIG_H 18 19 namespace OHOS { 20 namespace Media { 21 namespace Effect { 22 enum class CacheStatus { 23 NO_CACHE = 0, 24 CACHE_START, 25 CACHE_ENABLED, 26 CACHE_USED, 27 }; 28 class EFilterCacheConfig { 29 public: 30 EFilterCacheConfig() = default; 31 32 ~EFilterCacheConfig() = default; 33 SetStatus(CacheStatus status)34 void SetStatus(CacheStatus status) 35 { 36 status_ = status; 37 } 38 GetStatus()39 CacheStatus GetStatus() 40 { 41 return status_; 42 } 43 SetIPType(IPType type)44 void SetIPType(IPType type) 45 { 46 type_ = type; 47 } 48 GetIPType()49 IPType GetIPType() 50 { 51 return type_; 52 } 53 54 private: 55 CacheStatus status_ = CacheStatus::NO_CACHE; 56 IPType type_ = IPType::DEFAULT; 57 }; 58 } // namespace Effect 59 } // namespace Media 60 } // namespace OHOS 61 #endif // IM_EFILTER_CACHE_CONFIG_H 62