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    }
17
18    // Required: Every EccInfo shall contain a phone number.
19    optional string phone_number = 1;
20
21    // Extra rules: Every Ecc should have at least 1 valid type.
22    repeated Type types = 2 [packed=true];
23}
24
25// CountryInfo represents available ECCs of a country/region, recognized
26// with ISO country code.
27message CountryInfo {
28    // Required: Every CountryInfo shall contain a ISO country code.
29    optional string iso_code = 1;
30
31    // Extra rules: There should be at least one EccInfo in this list.
32    repeated EccInfo eccs = 2;
33
34    // Required: Every CountryInfo shall contain a fallback number, shall
35    // be either 112 or 911.
36    //
37    // If an emergency number in EccInfo is declined by ril.ecclist, this
38    // fallback number may take the place.
39    //
40    // Per http://www.etsi.org/deliver/etsi_ts/122100_122199/122101/09.01.00_60/ts_122101v090100p.pdf,
41    // 112 and 911 shall always be available.
42    optional string ecc_fallback = 3;
43}
44
45message AllInfo {
46    // The revision value in ecc/input/eccdata.json should be increased
47    // before releasing a new content.
48    //
49    // This field is not used to compare data revision for online updating.
50    // It's reserved for identifying ecc info problems.
51    optional int32 revision = 1;
52
53    // Extra rules: There should be at least one CountryInfo in this list.
54    repeated CountryInfo countries = 2;
55}
56
57