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 OHOS_CLOUD_MEDIA_ASSET_TYPES_H 17 #define OHOS_CLOUD_MEDIA_ASSET_TYPES_H 18 19 #include <iostream> 20 #include <atomic> 21 #include <chrono> 22 #include <string> 23 #include <map> 24 namespace OHOS { 25 namespace Media { 26 #define EXPORT __attribute__ ((visibility ("default"))) 27 enum class CloudMediaDownloadType : int32_t { 28 DOWNLOAD_FORCE = 0, 29 DOWNLOAD_GENTLE, 30 }; 31 32 enum class CloudMediaAssetTaskStatus : int32_t { 33 DOWNLOADING = 0, 34 PAUSED, 35 IDLE, 36 }; 37 38 enum class CloudMediaRetainType : int32_t { 39 RETAIN_FORCE = 0, 40 }; 41 42 enum class CloudMediaTaskPauseCause : int32_t { 43 NO_PAUSE = 0, 44 TEMPERATURE_LIMIT, 45 ROM_LIMIT, 46 NETWORK_FLOW_LIMIT, 47 WIFI_UNAVAILABLE, 48 POWER_LIMIT, 49 BACKGROUND_TASK_UNAVAILABLE, 50 FREQUENT_USER_REQUESTS, 51 CLOUD_ERROR, 52 USER_PAUSED, 53 }; 54 55 enum class CloudMediaTaskRecoverCause : int32_t { 56 FOREGROUND_TEMPERATURE_PROPER = 1, 57 NETWORK_FLOW_UNLIMIT, 58 NETWORK_NORMAL, 59 BACKGROUND_TASK_AVAILABLE, 60 RETRY_FOR_FREQUENT_REQUESTS, 61 RETRY_FOR_CLOUD_ERROR, 62 }; 63 } // namespace Media 64 } // namespace OHOS 65 #endif // OHOS_CLOUD_MEDIA_ASSET_TYPES_H