Darin Petkov | c64fe5e | 2012-01-11 12:46:13 +0100 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef SHILL_CELLULAR_CAPABILITY_GSM_ |
| 6 | #define SHILL_CELLULAR_CAPABILITY_GSM_ |
| 7 | |
Eric Shienbrood | 30bc0ec | 2012-03-21 18:19:46 -0400 | [diff] [blame] | 8 | #include <deque> |
Jason Glasgow | 82f9ab3 | 2012-04-04 14:27:19 -0400 | [diff] [blame] | 9 | #include <string> |
Jason Glasgow | 4c0724a | 2012-04-17 15:47:40 -0400 | [diff] [blame] | 10 | #include <vector> |
Eric Shienbrood | 30bc0ec | 2012-03-21 18:19:46 -0400 | [diff] [blame] | 11 | |
Darin Petkov | cb54773 | 2011-11-09 13:55:26 +0100 | [diff] [blame] | 12 | #include <base/memory/scoped_ptr.h> |
Eric Shienbrood | 3e20a23 | 2012-02-16 11:35:56 -0500 | [diff] [blame] | 13 | #include <base/memory/weak_ptr.h> |
Jason Glasgow | 9f09aef | 2012-05-08 16:26:55 -0400 | [diff] [blame] | 14 | #include <chromeos/dbus/service_constants.h> |
Darin Petkov | 1272a43 | 2011-11-10 15:53:37 +0100 | [diff] [blame] | 15 | #include <gtest/gtest_prod.h> // for FRIEND_TEST |
Darin Petkov | b05315f | 2011-11-07 10:14:25 +0100 | [diff] [blame] | 16 | |
Darin Petkov | 1272a43 | 2011-11-10 15:53:37 +0100 | [diff] [blame] | 17 | #include "shill/accessor_interface.h" |
Darin Petkov | 0a4dfeb | 2011-11-18 19:36:13 +0100 | [diff] [blame] | 18 | #include "shill/cellular.h" |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 19 | #include "shill/cellular_capability.h" |
Jason Glasgow | 82f9ab3 | 2012-04-04 14:27:19 -0400 | [diff] [blame] | 20 | #include "shill/cellular_capability_classic.h" |
Darin Petkov | cb54773 | 2011-11-09 13:55:26 +0100 | [diff] [blame] | 21 | #include "shill/modem_gsm_card_proxy_interface.h" |
Darin Petkov | 1272a43 | 2011-11-10 15:53:37 +0100 | [diff] [blame] | 22 | #include "shill/modem_gsm_network_proxy_interface.h" |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 23 | |
Darin Petkov | 0a4dfeb | 2011-11-18 19:36:13 +0100 | [diff] [blame] | 24 | struct mobile_provider; |
| 25 | |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 26 | namespace shill { |
| 27 | |
Prathmesh Prabhu | 27526f1 | 2013-03-25 19:42:18 -0700 | [diff] [blame] | 28 | class ModemInfo; |
| 29 | |
Jason Glasgow | 82f9ab3 | 2012-04-04 14:27:19 -0400 | [diff] [blame] | 30 | class CellularCapabilityGSM : public CellularCapabilityClassic { |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 31 | public: |
Thieu Le | ce4483e | 2013-01-23 15:12:03 -0800 | [diff] [blame] | 32 | CellularCapabilityGSM(Cellular *cellular, |
| 33 | ProxyFactory *proxy_factory, |
Prathmesh Prabhu | 27526f1 | 2013-03-25 19:42:18 -0700 | [diff] [blame] | 34 | ModemInfo *modem_info); |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 35 | |
Darin Petkov | b05315f | 2011-11-07 10:14:25 +0100 | [diff] [blame] | 36 | // Inherited from CellularCapability. |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 37 | virtual void StartModem(Error *error, const ResultCallback &callback); |
Darin Petkov | 5f316f6 | 2011-11-18 12:10:26 +0100 | [diff] [blame] | 38 | virtual void OnServiceCreated(); |
Darin Petkov | ae0c64e | 2011-11-15 15:50:27 +0100 | [diff] [blame] | 39 | virtual void SetupConnectProperties(DBusPropertiesMap *properties); |
Nathan Williams | b54974f | 2012-04-19 11:16:30 -0400 | [diff] [blame] | 40 | virtual void Connect(const DBusPropertiesMap &properties, Error *error, |
| 41 | const ResultCallback &callback); |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 42 | // The following two methods never need to report results |
| 43 | // via callbacks, which is why they don't take callbacks |
| 44 | // as arguments. |
Darin Petkov | 3e50924 | 2011-11-10 14:46:44 +0100 | [diff] [blame] | 45 | virtual void GetSignalQuality(); |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 46 | virtual void GetRegistrationState(); |
| 47 | // The following six methods are only ever called as |
| 48 | // callbacks (from the main loop), which is why they |
| 49 | // don't take an Error * argument. |
| 50 | virtual void GetProperties(const ResultCallback &callback); |
| 51 | virtual void GetIMEI(const ResultCallback &callback); |
| 52 | virtual void GetIMSI(const ResultCallback &callback); |
| 53 | virtual void GetSPN(const ResultCallback &callback); |
| 54 | virtual void GetMSISDN(const ResultCallback &callback); |
| 55 | virtual void Register(const ResultCallback &callback); |
| 56 | |
Eric Shienbrood | 5de44ab | 2011-12-05 10:46:27 -0500 | [diff] [blame] | 57 | virtual void RegisterOnNetwork(const std::string &network_id, |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 58 | Error *error, |
| 59 | const ResultCallback &callback); |
Ben Chan | 31ce564 | 2013-11-14 13:37:40 -0800 | [diff] [blame] | 60 | virtual bool IsRegistered() const; |
Eric Shienbrood | 7fce52c | 2012-04-13 19:11:02 -0400 | [diff] [blame] | 61 | virtual void SetUnregistered(bool searching); |
Darin Petkov | ac635a8 | 2012-01-10 16:51:58 +0100 | [diff] [blame] | 62 | virtual std::string CreateFriendlyServiceName(); |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 63 | virtual void RequirePIN(const std::string &pin, bool require, |
| 64 | Error *error, const ResultCallback &callback); |
| 65 | virtual void EnterPIN(const std::string &pin, |
| 66 | Error *error, const ResultCallback &callback); |
Darin Petkov | b05315f | 2011-11-07 10:14:25 +0100 | [diff] [blame] | 67 | virtual void UnblockPIN(const std::string &unblock_code, |
| 68 | const std::string &pin, |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 69 | Error *error, const ResultCallback &callback); |
Darin Petkov | b05315f | 2011-11-07 10:14:25 +0100 | [diff] [blame] | 70 | virtual void ChangePIN(const std::string &old_pin, |
| 71 | const std::string &new_pin, |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 72 | Error *error, const ResultCallback &callback); |
Prathmesh Prabhu | 49ffffd | 2014-01-09 18:28:55 -0800 | [diff] [blame] | 73 | virtual void Scan(Error *error, const ResultStringmapsCallback &callback); |
Darin Petkov | 20c13ec | 2011-11-09 15:07:15 +0100 | [diff] [blame] | 74 | virtual std::string GetNetworkTechnologyString() const; |
| 75 | virtual std::string GetRoamingStateString() const; |
Jason Glasgow | 9f09aef | 2012-05-08 16:26:55 -0400 | [diff] [blame] | 76 | virtual std::string GetTypeString() const { |
Ben Chan | 7ea768e | 2013-09-20 15:08:40 -0700 | [diff] [blame] | 77 | return kTechnologyFamilyGsm; |
Jason Glasgow | 9f09aef | 2012-05-08 16:26:55 -0400 | [diff] [blame] | 78 | } |
Jason Glasgow | 4c0724a | 2012-04-17 15:47:40 -0400 | [diff] [blame] | 79 | virtual void OnDBusPropertiesChanged( |
| 80 | const std::string &interface, |
| 81 | const DBusPropertiesMap &properties, |
| 82 | const std::vector<std::string> &invalidated_properties); |
| 83 | virtual bool AllowRoaming(); |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 84 | |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 85 | protected: |
| 86 | virtual void InitProxies(); |
| 87 | virtual void ReleaseProxies(); |
Ben Chan | 3ecdf82 | 2012-08-06 12:29:23 -0700 | [diff] [blame] | 88 | |
| 89 | // Initializes properties, such as IMSI, which are required before the device |
| 90 | // is enabled. |
| 91 | virtual void InitProperties(); |
| 92 | |
Jason Glasgow | 4380f0d | 2012-05-03 18:05:04 -0400 | [diff] [blame] | 93 | virtual void UpdateStatus(const DBusPropertiesMap &properties); |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 94 | |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 95 | private: |
Eric Shienbrood | 5de44ab | 2011-12-05 10:46:27 -0500 | [diff] [blame] | 96 | friend class CellularTest; |
Darin Petkov | cb54773 | 2011-11-09 13:55:26 +0100 | [diff] [blame] | 97 | friend class CellularCapabilityGSMTest; |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 98 | friend class CellularCapabilityTest; |
Darin Petkov | f508c82 | 2012-09-21 13:43:17 +0200 | [diff] [blame] | 99 | FRIEND_TEST(CellularCapabilityGSMTest, AllowRoaming); |
Darin Petkov | 63138a9 | 2012-02-06 14:09:15 +0100 | [diff] [blame] | 100 | FRIEND_TEST(CellularCapabilityGSMTest, CreateDeviceFromProperties); |
Darin Petkov | ac635a8 | 2012-01-10 16:51:58 +0100 | [diff] [blame] | 101 | FRIEND_TEST(CellularCapabilityGSMTest, CreateFriendlyServiceName); |
Eric Shienbrood | 5de44ab | 2011-12-05 10:46:27 -0500 | [diff] [blame] | 102 | FRIEND_TEST(CellularCapabilityGSMTest, GetIMEI); |
| 103 | FRIEND_TEST(CellularCapabilityGSMTest, GetIMSI); |
Gary Morain | 82a31a0 | 2012-08-02 18:03:32 -0700 | [diff] [blame] | 104 | FRIEND_TEST(CellularCapabilityGSMTest, GetIMSIFails); |
Eric Shienbrood | 5de44ab | 2011-12-05 10:46:27 -0500 | [diff] [blame] | 105 | FRIEND_TEST(CellularCapabilityGSMTest, GetMSISDN); |
| 106 | FRIEND_TEST(CellularCapabilityGSMTest, GetSPN); |
| 107 | FRIEND_TEST(CellularCapabilityGSMTest, RequirePIN); |
| 108 | FRIEND_TEST(CellularCapabilityGSMTest, EnterPIN); |
| 109 | FRIEND_TEST(CellularCapabilityGSMTest, UnblockPIN); |
| 110 | FRIEND_TEST(CellularCapabilityGSMTest, ChangePIN); |
Darin Petkov | 3cfbf21 | 2011-11-21 16:02:09 +0100 | [diff] [blame] | 111 | FRIEND_TEST(CellularCapabilityGSMTest, InitAPNList); |
Darin Petkov | 1272a43 | 2011-11-10 15:53:37 +0100 | [diff] [blame] | 112 | FRIEND_TEST(CellularCapabilityGSMTest, ParseScanResult); |
| 113 | FRIEND_TEST(CellularCapabilityGSMTest, ParseScanResultProviderLookup); |
Darin Petkov | 184c54e | 2011-11-15 12:44:39 +0100 | [diff] [blame] | 114 | FRIEND_TEST(CellularCapabilityGSMTest, RegisterOnNetwork); |
Darin Petkov | ae0c64e | 2011-11-15 15:50:27 +0100 | [diff] [blame] | 115 | FRIEND_TEST(CellularCapabilityGSMTest, SetAccessTechnology); |
Jason Glasgow | 4380f0d | 2012-05-03 18:05:04 -0400 | [diff] [blame] | 116 | FRIEND_TEST(CellularCapabilityGSMTest, UpdateStatus); |
Darin Petkov | 0a4dfeb | 2011-11-18 19:36:13 +0100 | [diff] [blame] | 117 | FRIEND_TEST(CellularCapabilityGSMTest, SetHomeProvider); |
Darin Petkov | ae0c64e | 2011-11-15 15:50:27 +0100 | [diff] [blame] | 118 | FRIEND_TEST(CellularCapabilityGSMTest, UpdateOperatorInfo); |
Eric Shienbrood | 5de44ab | 2011-12-05 10:46:27 -0500 | [diff] [blame] | 119 | FRIEND_TEST(CellularCapabilityGSMTest, GetRegistrationState); |
Jason Glasgow | 4c0724a | 2012-04-17 15:47:40 -0400 | [diff] [blame] | 120 | FRIEND_TEST(CellularCapabilityGSMTest, OnDBusPropertiesChanged); |
Eric Shienbrood | 30bc0ec | 2012-03-21 18:19:46 -0400 | [diff] [blame] | 121 | FRIEND_TEST(CellularCapabilityGSMTest, SetupApnTryList); |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 122 | FRIEND_TEST(CellularCapabilityTest, AllowRoaming); |
Eric Shienbrood | 30bc0ec | 2012-03-21 18:19:46 -0400 | [diff] [blame] | 123 | FRIEND_TEST(CellularCapabilityTest, TryApns); |
Prathmesh Prabhu | 49ffffd | 2014-01-09 18:28:55 -0800 | [diff] [blame] | 124 | FRIEND_TEST(CellularTest, ScanAsynchronousFailure); |
| 125 | FRIEND_TEST(CellularTest, ScanImmediateFailure); |
| 126 | FRIEND_TEST(CellularTest, ScanSuccess); |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 127 | FRIEND_TEST(CellularTest, StartGSMRegister); |
Darin Petkov | 63138a9 | 2012-02-06 14:09:15 +0100 | [diff] [blame] | 128 | FRIEND_TEST(ModemTest, CreateDeviceFromProperties); |
Darin Petkov | 1272a43 | 2011-11-10 15:53:37 +0100 | [diff] [blame] | 129 | |
Arman Uguray | c7e63af | 2013-06-13 17:07:32 -0700 | [diff] [blame] | 130 | // SimLockStatus represents the fields in the Cellular.SIMLockStatus |
| 131 | // DBUS property of the shill device. |
Darin Petkov | 721ac93 | 2011-11-16 15:43:09 +0100 | [diff] [blame] | 132 | struct SimLockStatus { |
| 133 | public: |
Darin Petkov | 63138a9 | 2012-02-06 14:09:15 +0100 | [diff] [blame] | 134 | SimLockStatus() : enabled(false), retries_left(0) {} |
Darin Petkov | 721ac93 | 2011-11-16 15:43:09 +0100 | [diff] [blame] | 135 | |
Darin Petkov | 63138a9 | 2012-02-06 14:09:15 +0100 | [diff] [blame] | 136 | bool enabled; |
Darin Petkov | 721ac93 | 2011-11-16 15:43:09 +0100 | [diff] [blame] | 137 | std::string lock_type; |
| 138 | uint32 retries_left; |
| 139 | }; |
| 140 | |
Darin Petkov | 1272a43 | 2011-11-10 15:53:37 +0100 | [diff] [blame] | 141 | static const char kNetworkPropertyAccessTechnology[]; |
| 142 | static const char kNetworkPropertyID[]; |
| 143 | static const char kNetworkPropertyLongName[]; |
| 144 | static const char kNetworkPropertyShortName[]; |
| 145 | static const char kNetworkPropertyStatus[]; |
Darin Petkov | ae0c64e | 2011-11-15 15:50:27 +0100 | [diff] [blame] | 146 | static const char kPhoneNumber[]; |
| 147 | static const char kPropertyAccessTechnology[]; |
Darin Petkov | 63138a9 | 2012-02-06 14:09:15 +0100 | [diff] [blame] | 148 | static const char kPropertyEnabledFacilityLocks[]; |
| 149 | static const char kPropertyUnlockRequired[]; |
| 150 | static const char kPropertyUnlockRetries[]; |
| 151 | |
Gary Morain | 82a31a0 | 2012-08-02 18:03:32 -0700 | [diff] [blame] | 152 | // Calls to the proxy's GetIMSI() will be retried this many times. |
| 153 | static const int kGetIMSIRetryLimit; |
| 154 | |
| 155 | // This much time will pass between retries of GetIMSI(). |
| 156 | static const int64 kGetIMSIRetryDelayMilliseconds; |
Darin Petkov | cb54773 | 2011-11-09 13:55:26 +0100 | [diff] [blame] | 157 | |
Darin Petkov | ae0c64e | 2011-11-15 15:50:27 +0100 | [diff] [blame] | 158 | void SetAccessTechnology(uint32 access_technology); |
| 159 | |
Darin Petkov | 0a4dfeb | 2011-11-18 19:36:13 +0100 | [diff] [blame] | 160 | // Sets the upper level information about the home cellular provider from the |
| 161 | // modem's IMSI and SPN. |
| 162 | void SetHomeProvider(); |
| 163 | |
Darin Petkov | ae0c64e | 2011-11-15 15:50:27 +0100 | [diff] [blame] | 164 | // Updates the GSM operator name and country based on a newly obtained network |
| 165 | // id. |
| 166 | void UpdateOperatorInfo(); |
| 167 | |
| 168 | // Updates the serving operator on the active service. |
| 169 | void UpdateServingOperator(); |
| 170 | |
Prathmesh Prabhu | 9f06c87 | 2013-11-21 14:08:23 -0800 | [diff] [blame] | 171 | // Initializes the |apn_list| property based on the current |
Prathmesh Prabhu | 99ec94d | 2013-11-22 10:43:37 -0800 | [diff] [blame] | 172 | // |home_provider_info_|. |
Darin Petkov | 3cfbf21 | 2011-11-21 16:02:09 +0100 | [diff] [blame] | 173 | void InitAPNList(); |
| 174 | |
Eric Shienbrood | 5de44ab | 2011-12-05 10:46:27 -0500 | [diff] [blame] | 175 | Stringmap ParseScanResult(const GSMScanResult &result); |
Darin Petkov | b05315f | 2011-11-07 10:14:25 +0100 | [diff] [blame] | 176 | |
Darin Petkov | 63138a9 | 2012-02-06 14:09:15 +0100 | [diff] [blame] | 177 | KeyValueStore SimLockStatusToProperty(Error *error); |
Darin Petkov | 721ac93 | 2011-11-16 15:43:09 +0100 | [diff] [blame] | 178 | |
Eric Shienbrood | 30bc0ec | 2012-03-21 18:19:46 -0400 | [diff] [blame] | 179 | void SetupApnTryList(); |
| 180 | void FillConnectPropertyMap(DBusPropertiesMap *properties); |
| 181 | |
mukesh agrawal | bebf1b8 | 2013-04-23 15:06:33 -0700 | [diff] [blame] | 182 | void HelpRegisterConstDerivedKeyValueStore( |
Darin Petkov | 721ac93 | 2011-11-16 15:43:09 +0100 | [diff] [blame] | 183 | const std::string &name, |
mukesh agrawal | bebf1b8 | 2013-04-23 15:06:33 -0700 | [diff] [blame] | 184 | KeyValueStore(CellularCapabilityGSM::*get)(Error *error)); |
Darin Petkov | 721ac93 | 2011-11-16 15:43:09 +0100 | [diff] [blame] | 185 | |
Eric Shienbrood | 7fce52c | 2012-04-13 19:11:02 -0400 | [diff] [blame] | 186 | bool IsUnderlyingDeviceRegistered() const; |
| 187 | |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 188 | // Signal callbacks |
Nathan Williams | 3022be5 | 2012-04-19 17:40:49 -0400 | [diff] [blame] | 189 | void OnNetworkModeSignal(uint32 mode); |
| 190 | void OnRegistrationInfoSignal(uint32 status, |
| 191 | const std::string &operator_code, |
| 192 | const std::string &operator_name); |
| 193 | void OnSignalQualitySignal(uint32 quality); |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 194 | |
| 195 | // Method callbacks |
Nathan Williams | 3022be5 | 2012-04-19 17:40:49 -0400 | [diff] [blame] | 196 | void OnGetRegistrationInfoReply(uint32 status, |
| 197 | const std::string &operator_code, |
| 198 | const std::string &operator_name, |
| 199 | const Error &error); |
| 200 | void OnGetSignalQualityReply(uint32 quality, const Error &error); |
| 201 | void OnRegisterReply(const ResultCallback &callback, |
| 202 | const Error &error); |
| 203 | void OnGetIMEIReply(const ResultCallback &callback, |
| 204 | const std::string &imei, |
| 205 | const Error &error); |
| 206 | void OnGetIMSIReply(const ResultCallback &callback, |
| 207 | const std::string &imsi, |
| 208 | const Error &error); |
| 209 | void OnGetSPNReply(const ResultCallback &callback, |
| 210 | const std::string &spn, |
| 211 | const Error &error); |
| 212 | void OnGetMSISDNReply(const ResultCallback &callback, |
| 213 | const std::string &msisdn, |
| 214 | const Error &error); |
Prathmesh Prabhu | 49ffffd | 2014-01-09 18:28:55 -0800 | [diff] [blame] | 215 | void OnScanReply(const ResultStringmapsCallback &callback, |
Nathan Williams | 3022be5 | 2012-04-19 17:40:49 -0400 | [diff] [blame] | 216 | const GSMScanResults &results, |
| 217 | const Error &error); |
Nathan Williams | b54974f | 2012-04-19 11:16:30 -0400 | [diff] [blame] | 218 | void OnConnectReply(const ResultCallback &callback, const Error &error); |
Darin Petkov | 184c54e | 2011-11-15 12:44:39 +0100 | [diff] [blame] | 219 | |
Darin Petkov | cb54773 | 2011-11-09 13:55:26 +0100 | [diff] [blame] | 220 | scoped_ptr<ModemGSMCardProxyInterface> card_proxy_; |
Darin Petkov | 184c54e | 2011-11-15 12:44:39 +0100 | [diff] [blame] | 221 | scoped_ptr<ModemGSMNetworkProxyInterface> network_proxy_; |
Eric Shienbrood | 3e20a23 | 2012-02-16 11:35:56 -0500 | [diff] [blame] | 222 | base::WeakPtrFactory<CellularCapabilityGSM> weak_ptr_factory_; |
Darin Petkov | b05315f | 2011-11-07 10:14:25 +0100 | [diff] [blame] | 223 | |
Darin Petkov | 184c54e | 2011-11-15 12:44:39 +0100 | [diff] [blame] | 224 | uint32 registration_state_; |
Darin Petkov | ae0c64e | 2011-11-15 15:50:27 +0100 | [diff] [blame] | 225 | uint32 access_technology_; |
Darin Petkov | 0a4dfeb | 2011-11-18 19:36:13 +0100 | [diff] [blame] | 226 | Cellular::Operator serving_operator_; |
Darin Petkov | ae0c64e | 2011-11-15 15:50:27 +0100 | [diff] [blame] | 227 | std::string spn_; |
Prathmesh Prabhu | 99ec94d | 2013-11-22 10:43:37 -0800 | [diff] [blame] | 228 | mobile_provider *home_provider_info_; |
Eric Shienbrood | 5de44ab | 2011-12-05 10:46:27 -0500 | [diff] [blame] | 229 | std::string desired_network_; |
Darin Petkov | 184c54e | 2011-11-15 12:44:39 +0100 | [diff] [blame] | 230 | |
Gary Morain | 82a31a0 | 2012-08-02 18:03:32 -0700 | [diff] [blame] | 231 | // The number of times GetIMSI() has been retried. |
| 232 | int get_imsi_retries_; |
| 233 | |
| 234 | // Amount of time to wait between retries of GetIMSI. Defaults to |
| 235 | // kGetIMSIRetryDelayMilliseconds, but can be altered by a unit test. |
| 236 | int64 get_imsi_retry_delay_milliseconds_; |
| 237 | |
Darin Petkov | 1272a43 | 2011-11-10 15:53:37 +0100 | [diff] [blame] | 238 | // Properties. |
Eric Shienbrood | 30bc0ec | 2012-03-21 18:19:46 -0400 | [diff] [blame] | 239 | std::deque<Stringmap> apn_try_list_; |
Darin Petkov | 721ac93 | 2011-11-16 15:43:09 +0100 | [diff] [blame] | 240 | SimLockStatus sim_lock_status_; |
Darin Petkov | 1272a43 | 2011-11-10 15:53:37 +0100 | [diff] [blame] | 241 | |
Darin Petkov | ac635a8 | 2012-01-10 16:51:58 +0100 | [diff] [blame] | 242 | static unsigned int friendly_service_name_id_; |
| 243 | |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 244 | DISALLOW_COPY_AND_ASSIGN(CellularCapabilityGSM); |
| 245 | }; |
| 246 | |
| 247 | } // namespace shill |
| 248 | |
| 249 | #endif // SHILL_CELLULAR_CAPABILITY_GSM_ |