Home | History | Annotate | Download | only in src
      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 syntax = "proto2";
     18 
     19 package carrierIdentification;
     20 
     21 option java_package = "com.android.internal.telephony";
     22 option java_outer_classname = "CarrierIdProto";
     23 
     24 // A complete list of carriers
     25 message CarrierList {
     26   // A collection of carriers. one entry for one carrier.
     27   repeated CarrierId carrier_id = 1;
     28   // Version number of current carrier list
     29   optional int32 version = 2;
     30 };
     31 
     32 // CarrierId is the unique representation of a carrier in CID table.
     33 message CarrierId {
     34   // [Optional] A unique canonical number designated to a carrier.
     35   optional int32 canonical_id = 1;
     36 
     37   // [Optional] A user-friendly carrier name (not localized).
     38   optional string carrier_name = 2;
     39 
     40   // [Optional] Carrier attributes to match a carrier. At least one value is required.
     41   repeated CarrierAttribute carrier_attribute = 3;
     42 
     43   // [Optional] A unique canonical number to represent its parent carrier. The parent-child
     44   // relationship can be used to differentiate a single carrier by different networks,
     45   // by prepaid v.s. postpaid  or even by 4G v.s. 3G plan.
     46   optional int32 parent_canonical_id = 4;
     47 };
     48 
     49 // Attributes used to match a carrier.
     50 // For each field within this message:
     51 //   - if not set, the attribute is ignored;
     52 //   - if set, the device must have one of the specified values to match.
     53 // Match is based on AND between any field that is set and OR for values within a repeated field.
     54 message CarrierAttribute {
     55   // [Optional] The MCC and MNC that map to this carrier. At least one value is required.
     56   repeated string mccmnc_tuple = 1;
     57 
     58   // [Optional] Prefix of IMSI (International Mobile Subscriber Identity) in
     59   // decimal format. Some digits can be replaced with "x" symbols matching any digit.
     60   // Sample values: 20404794, 21670xx2xxx.
     61   repeated string imsi_prefix_xpattern = 2;
     62 
     63   // [Optional] The Service Provider Name. Read from subscription EF_SPN.
     64   // Sample values: C Spire, LeclercMobile
     65   repeated string spn = 3;
     66 
     67   // [Optional] PLMN network name. Read from subscription EF_PNN.
     68   // Sample values:
     69   repeated string plmn = 4;
     70 
     71   // [Optional] Group Identifier Level1 for a GSM phone. Read from subscription EF_GID1.
     72   // Sample values: 6D, BAE0000000000000
     73   repeated string gid1 = 5;
     74 
     75   // [Optional] Group Identifier Level2 for a GSM phone. Read from subscription EF_GID2.
     76   // Sample values: 6D, BAE0000000000000
     77   repeated string gid2 = 6;
     78 
     79   // [Optional] The Access Point Name, corresponding to "apn" field returned by
     80   // "content://telephony/carriers/preferapn" on device.
     81   // Sample values: fast.t-mobile.com, internet
     82   repeated string preferred_apn = 7;
     83 
     84   // [Optional] Prefix of Integrated Circuit Card Identifier. Read from subscription EF_ICCID.
     85   // Sample values: 894430, 894410
     86   repeated string iccid_prefix = 8;
     87 
     88   // [Optional] Carrier Privilege Access Rule in hex string.
     89   // Sample values: 61ed377e85d386a8dfee6b864bd85b0bfaa5af88
     90   repeated string privilege_access_rule = 9;
     91 };
     92 
     93