1 /* 2 * Copyright (c) 2023 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 REQUEST_C_ENUMRATION_H 17 #define REQUEST_C_ENUMRATION_H 18 #include <cstdint> 19 20 enum class Network : uint8_t { 21 ANY, 22 WIFI, 23 CELLULAR, 24 }; 25 26 enum class Action : uint8_t { 27 DOWNLOAD, 28 UPLOAD, 29 ANY, 30 }; 31 32 enum class Mode : uint8_t { 33 BACKGROUND, 34 FOREGROUND, 35 ANY, 36 }; 37 38 enum class State : uint8_t { 39 INITIALIZED = 0x00, 40 WAITING = 0x10, 41 RUNNING = 0x20, 42 RETRYING = 0x21, 43 PAUSED = 0x30, 44 STOPPED = 0x31, 45 COMPLETED = 0x40, 46 FAILED = 0x41, 47 REMOVED = 0x50, 48 DEFAULT = 0x60, 49 ANY = 0x61, 50 }; 51 #endif // REQUEST_C_ENUMRATION_H 52