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 
     44 // Attributes used to match a carrier.
     45 // For each field within this message:
     46 //   - if not set, the attribute is ignored;
     47 //   - if set, the device must have one of the specified values to match.
     48 // Match is based on AND between any field that is set and OR for values within a repeated field.
     49 message CarrierAttribute {
     50   // [Optional] The MCC and MNC that map to this carrier. At least one value is required.
     51   repeated string mccmnc_tuple = 1;
     52 
     53   // [Optional] Prefix of IMSI (International Mobile Subscriber Identity) in
     54   // decimal format. Some digits can be replaced with "x" symbols matching any digit.
     55   // Sample values: 20404794, 21670xx2xxx.
     56   repeated string imsi_prefix_xpattern = 2;
     57 
     58   // [Optional] The Service Provider Name. Read from subscription EF_SPN.
     59   // Sample values: C Spire, LeclercMobile
     60   repeated string spn = 3;
     61 
     62   // [Optional] PLMN network name. Read from subscription EF_PNN.
     63   // Sample values:
     64   repeated string plmn = 4;
     65 
     66   // [Optional] Group Identifier Level1 for a GSM phone. Read from subscription EF_GID1.
     67   // Sample values: 6D, BAE0000000000000
     68   repeated string gid1 = 5;
     69 
     70   // [Optional] Group Identifier Level2 for a GSM phone. Read from subscription EF_GID2.
     71   // Sample values: 6D, BAE0000000000000
     72   repeated string gid2 = 6;
     73 
     74   // [Optional] The Access Point Name, corresponding to "apn" field returned by
     75   // "content://telephony/carriers/preferapn" on device.
     76   // Sample values: fast.t-mobile.com, internet
     77   repeated string preferred_apn = 7;
     78 
     79   // [Optional] Prefix of Integrated Circuit Card Identifier. Read from subscription EF_ICCID.
     80   // Sample values: 894430, 894410
     81   repeated string iccid_prefix = 8;
     82 };
     83 
     84