• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 // Keep in sync with STATUS_* constants from RadioManager.java.
31 enum class Status : jint {
32     OK = 0,
33     ERROR = -0x80000000ll,  // Integer.MIN_VALUE
34     PERMISSION_DENIED = -1,  // -EPERM
35     NO_INIT = -19,  // -ENODEV
36     BAD_VALUE = -22,  // -EINVAL
37     DEAD_OBJECT = -32,  // -EPIPE
38     INVALID_OPERATION = -38,  // -ENOSYS
39     TIMED_OUT = -110,  // -ETIMEDOUT
40 };
41 
42 // Keep in sync with REGION_* constants from RadioManager.java.
43 enum class Region : jint {
44     INVALID = -1,
45     ITU_1 = 0,
46     ITU_2 = 1,
47     OIRT = 2,
48     JAPAN = 3,
49     KOREA = 4,
50 };
51 
52 } // namespace BroadcastRadio
53 } // namespace server
54 } // namespace android
55 
56 #endif // _ANDROID_SERVER_RADIO_TYPES_H
57