summaryrefslogtreecommitdiffstats
blob: c04451f5d1a88a5bd25e9d4bd1210122c1e66003 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.radio@1.3;

import @1.2::AccessNetwork;

enum AccessNetwork : @1.2::AccessNetwork {
    /**
     * Unknown access network
     */
    UNKNOWN = 0,
};

/**
 * Emergency number contains information of number, one or more service category(s), and mobile
 * country code (mcc).
 *
 * If the source of the emergency number is associated with country, field ‘mcc’ must be
 * provided; otherwise the field ‘mcc’ must be an empty string.
 *
 * A unique EmergencyNumber has a unique combination of ‘number’ and ‘mcc’ fields.
 * Multiple @1.3::EmergencyServiceCategory should be merged into the bitfield for the same
 * EmergencyNumber.
 *
 * Reference: 3GPP TS 22.101 version 9.1.0 Release 9
 */
struct EmergencyNumber{
    /**
     * The emergency number. The character in the number string should only be the dial pad
     * character('0'-'9', '*', or '#'). For example: 911.
     */
    string number;
    /**
     * 3-digit Mobile Country Code, 0..999. Empty string if not applicable.
     */
    string mcc;
    /**
     * The bitfield of @1.3::EmergencyServiceCategory(s). See @1.3::EmergencyServiceCategory for
     * the value of each bit.
     */
    bitfield<EmergencyServiceCategory> categories;
};

/**
 * Defining Emergency Service Category as follows:
 * - General emergency call, all categories;
 * - Police;
 * - Ambulance;
 * - Fire Brigade;
 * - Marine Guard;
 * - Mountain Rescue;
 * - Manually Initiated eCall (MIeC);
 * - Automatically Initiated eCall (AIeC);
 *
 * Type GENERIC (General emergency call, all categories) is considered to use if the reported type
 * is not any of the other specific types.
 *
 * Reference: 3GPP TS 22.101 version 9.1.0 Release 9
 */
enum EmergencyServiceCategory : int32_t {
    GENERIC = 0, // General emergency call, all categories
    POLICE = 1 << 0,
    AMBULANCE = 1 << 1,
    FIRE_BRIGADE = 1 << 2,
    MARINE_GUARD = 1 << 3,
    MOUNTAIN_RESCUE = 1 << 4,
    MIEC = 1 << 5, // Manually Initiated eCall (MIeC)
    AIEC = 1 << 6, // Automatically Initiated eCall (AIeC)
};