1syntax = "proto2";
2
3package ecc;
4
5option java_package = "com.android.phone.ecc";
6option java_outer_classname = "ProtobufEccData";
7
8// EccInfo represents an Emergency Call Code (i.e. an emergency phone
9// number such as 911, 112, ...)
10message EccInfo {
11    enum Type {
12        TYPE_UNSPECIFIED = 0;
13        POLICE = 1;
14        AMBULANCE = 2;
15        FIRE = 3;
16        MARINE_GUARD = 4;
17        MOUNTAIN_RESCUE = 5;
18        MIEC = 6;
19        AIEC = 7;
20    }
21
22    // Required: Every EccInfo shall contain a phone number.
23    optional string phone_number = 1;
24
25    // Extra rules: Every Ecc should have at least 1 valid type.
26    repeated Type types = 2 [packed=true];
27}
28
29// CountryInfo represents available ECCs of a country/region, recognized
30// with ISO country code.
31message CountryInfo {
32    // Required: Every CountryInfo shall contain a ISO country code.
33    optional string iso_code = 1;
34
35    // Extra rules: There should be at least one EccInfo in this list.
36    repeated EccInfo eccs = 2;
37
38    // Required: Every CountryInfo shall contain a fallback number, shall
39    // be either 112 or 911.
40    //
41    // If an emergency number in EccInfo is declined by ril.ecclist, this
42    // fallback number may take the place.
43    //
44    // Per http://www.etsi.org/deliver/etsi_ts/122100_122199/122101/09.01.00_60/ts_122101v090100p.pdf,
45    // 112 and 911 shall always be available.
46    optional string ecc_fallback = 3;
47}
48
49message AllInfo {
50    // The revision value in ecc/input/eccdata.json should be increased
51    // before releasing a new content.
52    //
53    // This field is not used to compare data revision for online updating.
54    // It's reserved for identifying ecc info problems.
55    optional int32 revision = 1;
56
57    // Extra rules: There should be at least one CountryInfo in this list.
58    repeated CountryInfo countries = 2;
59}
60
61