1 // 2 // Copyright (C) 2014 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 #ifndef SHILL_MOBILE_OPERATOR_DB_TEST_PROTOS_DATA_TEST_H_ 18 #define SHILL_MOBILE_OPERATOR_DB_TEST_PROTOS_DATA_TEST_H_ 19 20 #ifndef IN_MOBILE_OPERATOR_INFO_UNITTEST_CC 21 #error "Must be included only from mobile_operator_info_unittest.cc." 22 #endif 23 24 // Following is the binary protobuf for the following (text representation) 25 // protobuf: 26 // # Test[200] MobileOperatorInfoDataTest.* 27 // # Test[200] MobileOperatorInfoObserverTest.* 28 // mno { 29 // data { 30 // uuid: "uuid200001" 31 // country: "us" 32 // localized_name { 33 // name: "name200001" 34 // language: "en" 35 // } 36 // localized_name { 37 // name: "name200002" 38 // } 39 // requires_roaming: true 40 // olp { 41 // method: POST 42 // url: "some@random.com" 43 // post_data: "random_data" 44 // } 45 // olp { 46 // olp_filter { 47 // type: MCCMNC 48 // regex: "200003" 49 // } 50 // method: POST 51 // url: "olp@mccmnc" 52 // post_data: "post_data" 53 // } 54 // olp { 55 // olp_filter { 56 // type: SID 57 // regex: "200345" 58 // } 59 // method: POST 60 // url: "olp@sid" 61 // post_data: "post_data" 62 // } 63 // mccmnc: "200001" 64 // mccmnc: "200002" 65 // mccmnc: "200003" # Used in FilteredOLP 66 // mobile_apn { 67 // apn: "test@test.com" 68 // localized_name { 69 // name: "name200003" 70 // language: "hi" 71 // } 72 // username: "testuser" 73 // password: "is_public_boohoohoo" 74 // } 75 // sid: "200123" 76 // sid: "200234" 77 // sid: "200345" # Used in FilteredOLP 78 // activation_code: "open sesame" 79 // } 80 // mvno { 81 // mvno_filter { 82 // type: OPERATOR_NAME 83 // regex: "name200101" 84 // } 85 // data { 86 // uuid: "uuid200101" 87 // country: "ca" 88 // localized_name { 89 // name: "name200101" 90 // language: "en" 91 // } 92 // localized_name { 93 // name: "name200102" 94 // } 95 // requires_roaming: false 96 // olp { 97 // method: GET 98 // url: "someother@random.com" 99 // } 100 // # Keep a common MCCMNC, so that it can be used to search for the MNO. 101 // mccmnc: "200001" 102 // mccmnc: "200102" 103 // mobile_apn { 104 // apn: "test2@test.com" 105 // username: "testuser2" 106 // password: "is_public_boohoohoo_too" 107 // } 108 // sid: "200345" 109 // activation_code: "khul ja sim sim" 110 // } 111 // } 112 // mvno { 113 // mvno_filter { 114 // type: OPERATOR_NAME 115 // regex: "name200201" 116 // } 117 // data { 118 // uuid: "uuid200201" 119 // # Inherit all other information from the MNO. 120 // } 121 // } 122 // } 123 // 124 // The binary data for the protobuf in this file was generated by writing the 125 // prototxt file data_test.prototxt and then: 126 // protoc --proto_path .. --encode "shill.mobile_operator_db.MobileOperatorDB" 127 // ../mobile_operator_db.proto < data_test.prototxt 128 // > data_test.h.pbf 129 // cat data_test.h.pbf | xxd -i 130 131 namespace shill { 132 namespace mobile_operator_db { 133 static const unsigned char data_test[] { 134 0x0a, 0x8f, 0x04, 0x0a, 0xa6, 0x02, 0x0a, 0x0a, 0x75, 0x75, 0x69, 0x64, 135 0x32, 0x30, 0x30, 0x30, 0x30, 0x31, 0x1a, 0x02, 0x75, 0x73, 0x22, 0x10, 136 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x30, 0x30, 0x30, 0x30, 0x31, 137 0x12, 0x02, 0x65, 0x6e, 0x22, 0x0c, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 138 0x32, 0x30, 0x30, 0x30, 0x30, 0x32, 0x28, 0x01, 0x32, 0x20, 0x10, 0x02, 139 0x1a, 0x0f, 0x73, 0x6f, 0x6d, 0x65, 0x40, 0x72, 0x61, 0x6e, 0x64, 0x6f, 140 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x0b, 0x72, 0x61, 0x6e, 0x64, 0x6f, 141 0x6d, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x32, 0x25, 0x0a, 0x0a, 0x08, 0x05, 142 0x12, 0x06, 0x32, 0x30, 0x30, 0x30, 0x30, 0x33, 0x10, 0x02, 0x1a, 0x0a, 143 0x6f, 0x6c, 0x70, 0x40, 0x6d, 0x63, 0x63, 0x6d, 0x6e, 0x63, 0x22, 0x09, 144 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x32, 0x22, 0x0a, 145 0x0a, 0x08, 0x03, 0x12, 0x06, 0x32, 0x30, 0x30, 0x33, 0x34, 0x35, 0x10, 146 0x02, 0x1a, 0x07, 0x6f, 0x6c, 0x70, 0x40, 0x73, 0x69, 0x64, 0x22, 0x09, 147 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0xaa, 0x01, 0x06, 148 0x32, 0x30, 0x30, 0x30, 0x30, 0x31, 0xaa, 0x01, 0x06, 0x32, 0x30, 0x30, 149 0x30, 0x30, 0x32, 0xaa, 0x01, 0x06, 0x32, 0x30, 0x30, 0x30, 0x30, 0x33, 150 0xb2, 0x01, 0x40, 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x40, 0x74, 0x65, 151 0x73, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x1a, 0x10, 0x0a, 0x0a, 0x6e, 0x61, 152 0x6d, 0x65, 0x32, 0x30, 0x30, 0x30, 0x30, 0x33, 0x12, 0x02, 0x68, 0x69, 153 0x2a, 0x08, 0x74, 0x65, 0x73, 0x74, 0x75, 0x73, 0x65, 0x72, 0x32, 0x13, 154 0x69, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x62, 0x6f, 155 0x6f, 0x68, 0x6f, 0x6f, 0x68, 0x6f, 0x6f, 0xca, 0x02, 0x06, 0x32, 0x30, 156 0x30, 0x31, 0x32, 0x33, 0xca, 0x02, 0x06, 0x32, 0x30, 0x30, 0x32, 0x33, 157 0x34, 0xca, 0x02, 0x06, 0x32, 0x30, 0x30, 0x33, 0x34, 0x35, 0xda, 0x02, 158 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x73, 0x61, 0x6d, 0x65, 159 0x12, 0xc3, 0x01, 0x0a, 0x0e, 0x08, 0x04, 0x12, 0x0a, 0x6e, 0x61, 0x6d, 160 0x65, 0x32, 0x30, 0x30, 0x31, 0x30, 0x31, 0x12, 0xb0, 0x01, 0x0a, 0x0a, 161 0x75, 0x75, 0x69, 0x64, 0x32, 0x30, 0x30, 0x31, 0x30, 0x31, 0x1a, 0x02, 162 0x63, 0x61, 0x22, 0x10, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x30, 163 0x30, 0x31, 0x30, 0x31, 0x12, 0x02, 0x65, 0x6e, 0x22, 0x0c, 0x0a, 0x0a, 164 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x30, 0x30, 0x31, 0x30, 0x32, 0x28, 0x00, 165 0x32, 0x18, 0x10, 0x01, 0x1a, 0x14, 0x73, 0x6f, 0x6d, 0x65, 0x6f, 0x74, 166 0x68, 0x65, 0x72, 0x40, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x2e, 0x63, 167 0x6f, 0x6d, 0xaa, 0x01, 0x06, 0x32, 0x30, 0x30, 0x30, 0x30, 0x31, 0xaa, 168 0x01, 0x06, 0x32, 0x30, 0x30, 0x31, 0x30, 0x32, 0xb2, 0x01, 0x34, 0x0a, 169 0x0e, 0x74, 0x65, 0x73, 0x74, 0x32, 0x40, 0x74, 0x65, 0x73, 0x74, 0x2e, 170 0x63, 0x6f, 0x6d, 0x2a, 0x09, 0x74, 0x65, 0x73, 0x74, 0x75, 0x73, 0x65, 171 0x72, 0x32, 0x32, 0x17, 0x69, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 172 0x63, 0x5f, 0x62, 0x6f, 0x6f, 0x68, 0x6f, 0x6f, 0x68, 0x6f, 0x6f, 0x5f, 173 0x74, 0x6f, 0x6f, 0xca, 0x02, 0x06, 0x32, 0x30, 0x30, 0x33, 0x34, 0x35, 174 0xda, 0x02, 0x0f, 0x6b, 0x68, 0x75, 0x6c, 0x20, 0x6a, 0x61, 0x20, 0x73, 175 0x69, 0x6d, 0x20, 0x73, 0x69, 0x6d, 0x12, 0x1e, 0x0a, 0x0e, 0x08, 0x04, 176 0x12, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x30, 0x30, 0x32, 0x30, 0x31, 177 0x12, 0x0c, 0x0a, 0x0a, 0x75, 0x75, 0x69, 0x64, 0x32, 0x30, 0x30, 0x32, 178 0x30, 0x31 179 }; 180 } // namespace mobile_operator_db 181 } // namespace shill 182 183 #endif // SHILL_MOBILE_OPERATOR_DB_TEST_PROTOS_DATA_TEST_H_ 184