1 /** 2 * Copyright (C) 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef _ANDROID_SERVER_BROADCASTRADIO_TYPES_H 18 #define _ANDROID_SERVER_BROADCASTRADIO_TYPES_H 19 20 #include <jni.h> 21 22 namespace android { 23 namespace server { 24 namespace BroadcastRadio { 25 26 /* Most of these enums are dereived from Java code, based at 27 * frameworks/base/core/java/android/hardware/radio/RadioManager.java. 28 */ 29 30 enum class HalRevision : jint { 31 V1_0, 32 V1_1, 33 }; 34 35 // Keep in sync with STATUS_* constants from RadioManager.java. 36 enum class Status : jint { 37 OK = 0, 38 ERROR = -0x80000000ll, // Integer.MIN_VALUE 39 PERMISSION_DENIED = -1, // -EPERM 40 NO_INIT = -19, // -ENODEV 41 BAD_VALUE = -22, // -EINVAL 42 DEAD_OBJECT = -32, // -EPIPE 43 INVALID_OPERATION = -38, // -ENOSYS 44 TIMED_OUT = -110, // -ETIMEDOUT 45 }; 46 47 // Keep in sync with REGION_* constants from RadioManager.java. 48 enum class Region : jint { 49 ITU_1 = 0, 50 ITU_2 = 1, 51 OIRT = 2, 52 JAPAN = 3, 53 KOREA = 4, 54 }; 55 56 } // namespace BroadcastRadio 57 } // namespace server 58 } // namespace android 59 60 #endif // _ANDROID_SERVER_RADIO_TYPES_H 61