blob: a2ab0740fa47524ffdf359a74250048f09954b49 [file] [log] [blame]
Chris Masone3bd3c8c2011-06-13 08:20:26 -07001// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
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_
6#define SHILL_CELLULAR_
7
8#include <string>
9
10#include <base/basictypes.h>
Darin Petkovc5f56562011-08-06 16:40:05 -070011#include <base/task.h>
Darin Petkove9d12e02011-07-27 15:09:37 -070012#include <gtest/gtest_prod.h> // for FRIEND_TEST
Chris Masone3bd3c8c2011-06-13 08:20:26 -070013
Darin Petkovc5f56562011-08-06 16:40:05 -070014#include "shill/dbus_properties.h"
Chris Masone3bd3c8c2011-06-13 08:20:26 -070015#include "shill/device.h"
Paul Stewart26b327e2011-10-19 11:38:09 -070016#include "shill/event_dispatcher.h"
Darin Petkovd9661952011-08-03 16:25:42 -070017#include "shill/modem_cdma_proxy_interface.h"
Darin Petkov975b5e72011-08-30 11:48:08 -070018#include "shill/modem_gsm_card_proxy_interface.h"
Darin Petkova1e0a1c2011-08-25 15:08:33 -070019#include "shill/modem_gsm_network_proxy_interface.h"
Darin Petkovc5f56562011-08-06 16:40:05 -070020#include "shill/modem_proxy_interface.h"
Chris Masone2b105542011-06-22 10:58:09 -070021#include "shill/refptr_types.h"
Chris Masone3bd3c8c2011-06-13 08:20:26 -070022
Darin Petkov137884a2011-10-26 18:52:47 +020023struct mobile_provider_db;
24
Chris Masone3bd3c8c2011-06-13 08:20:26 -070025namespace shill {
26
Darin Petkovdaf43862011-10-27 11:37:28 +020027class CellularCapability;
Darin Petkov4d6d9412011-08-24 13:19:54 -070028class Error;
Darin Petkove604f702011-07-28 15:51:17 -070029class ModemSimpleProxyInterface;
Darin Petkovab565bb2011-10-06 02:55:51 -070030class ProxyFactory;
Darin Petkove9d12e02011-07-27 15:09:37 -070031
Darin Petkovd9661952011-08-03 16:25:42 -070032class Cellular : public Device,
Darin Petkov580c7af2011-10-24 12:32:50 +020033 public ModemCDMAProxyDelegate,
34 public ModemGSMCardProxyDelegate,
35 public ModemGSMNetworkProxyDelegate,
36 public ModemProxyDelegate {
Chris Masone3bd3c8c2011-06-13 08:20:26 -070037 public:
Darin Petkove9d12e02011-07-27 15:09:37 -070038 enum Type {
39 kTypeGSM,
40 kTypeCDMA
41 };
42
Darin Petkov0828f5f2011-08-11 10:18:52 -070043 // The device states progress linearly from Disabled to Linked.
Darin Petkove9d12e02011-07-27 15:09:37 -070044 enum State {
Darin Petkov0828f5f2011-08-11 10:18:52 -070045 // This is the initial state of the modem and indicates that the modem radio
46 // is not turned on.
Darin Petkove9d12e02011-07-27 15:09:37 -070047 kStateDisabled,
Darin Petkov0828f5f2011-08-11 10:18:52 -070048 // This state indicates that the modem radio is turned on, and it should be
49 // possible to measure signal strength.
Darin Petkove9d12e02011-07-27 15:09:37 -070050 kStateEnabled,
Darin Petkov0828f5f2011-08-11 10:18:52 -070051 // The modem has registered with a network and has signal quality
Darin Petkov51489002011-08-18 13:13:20 -070052 // measurements. A cellular service object is created.
Darin Petkove9d12e02011-07-27 15:09:37 -070053 kStateRegistered,
Darin Petkov0828f5f2011-08-11 10:18:52 -070054 // The modem has connected to a network.
Darin Petkove9d12e02011-07-27 15:09:37 -070055 kStateConnected,
Darin Petkov0828f5f2011-08-11 10:18:52 -070056 // The network interface is UP.
57 kStateLinked,
Darin Petkove9d12e02011-07-27 15:09:37 -070058 };
59
Darin Petkovbac96002011-08-09 13:22:00 -070060 // These should be kept in sync with ModemManager's mm-modem.h:MMModemState.
61 enum ModemState {
62 kModemStateUnknown = 0,
63 kModemStateDisabled = 10,
64 kModemStateDisabling = 20,
65 kModemStateEnabling = 30,
66 kModemStateEnabled = 40,
67 kModemStateSearching = 50,
68 kModemStateRegistered = 60,
69 kModemStateDisconnecting = 70,
70 kModemStateConnecting = 80,
71 kModemStateConnected = 90,
72 };
73
Darin Petkov3335b372011-08-22 11:05:32 -070074 class Operator {
75 public:
76 Operator();
77 ~Operator();
78
79 void CopyFrom(const Operator &oper);
80
81 const std::string &GetName() const;
82 void SetName(const std::string &name);
83
84 const std::string &GetCode() const;
85 void SetCode(const std::string &code);
86
87 const std::string &GetCountry() const;
88 void SetCountry(const std::string &country);
89
90 const Stringmap &ToDict() const;
91
92 private:
93 Stringmap dict_;
94
95 DISALLOW_COPY_AND_ASSIGN(Operator);
96 };
97
Chris Masone889666b2011-07-03 12:58:50 -070098 struct SimLockStatus {
99 public:
Darin Petkove9d12e02011-07-27 15:09:37 -0700100 SimLockStatus() : retries_left(0) {}
Darin Petkov48a511a2011-09-15 10:33:37 -0700101 SimLockStatus(const std::string &in_lock_type, uint32 in_retries_left)
102 : lock_type(in_lock_type),
103 retries_left(in_retries_left) {}
Darin Petkove9d12e02011-07-27 15:09:37 -0700104
Chris Masone889666b2011-07-03 12:58:50 -0700105 std::string lock_type;
106 uint32 retries_left;
107 };
108
Darin Petkovc5f56562011-08-06 16:40:05 -0700109 static const char kConnectPropertyPhoneNumber[];
110
Darin Petkove9d12e02011-07-27 15:09:37 -0700111 // |owner| is the ModemManager DBus service owner (e.g., ":1.17"). |path| is
112 // the ModemManager.Modem DBus object path (e.g.,
113 // "/org/chromium/ModemManager/Gobi/0").
Chris Masone3bd3c8c2011-06-13 08:20:26 -0700114 Cellular(ControlInterface *control_interface,
115 EventDispatcher *dispatcher,
116 Manager *manager,
Darin Petkove9d12e02011-07-27 15:09:37 -0700117 const std::string &link_name,
Chris Masone626719f2011-08-18 16:58:48 -0700118 const std::string &address,
Darin Petkove9d12e02011-07-27 15:09:37 -0700119 int interface_index,
120 Type type,
121 const std::string &owner,
Darin Petkov137884a2011-10-26 18:52:47 +0200122 const std::string &path,
123 mobile_provider_db *provider_db);
Darin Petkove9d12e02011-07-27 15:09:37 -0700124 virtual ~Cellular();
125
Darin Petkov4d6d9412011-08-24 13:19:54 -0700126 // Asynchronously connects the modem to the network. Populates |error| on
127 // failure, leaves it unchanged otherwise.
128 void Connect(Error *error);
Darin Petkovc5f56562011-08-06 16:40:05 -0700129
Darin Petkovb100ae72011-08-24 16:19:45 -0700130 // Asynchronously activates the modem. Populates |error| on failure, leaves it
131 // unchanged otherwise.
132 void Activate(const std::string &carrier, Error *error);
Darin Petkovc408e692011-08-17 13:47:15 -0700133
Darin Petkovbac96002011-08-09 13:22:00 -0700134 void set_modem_state(ModemState state) { modem_state_ = state; }
135 ModemState modem_state() const { return modem_state_; }
136
Darin Petkov48a511a2011-09-15 10:33:37 -0700137 const SimLockStatus &sim_lock_status() const { return sim_lock_status_; }
138 void set_sim_lock_status(const SimLockStatus &s) { sim_lock_status_ = s; }
139
Darin Petkovdaf43862011-10-27 11:37:28 +0200140 const std::string &dbus_owner() const { return dbus_owner_; }
141 const std::string &dbus_path() const { return dbus_path_; }
142
143 ProxyFactory *proxy_factory() const { return proxy_factory_; }
144
145 void set_modem_cdma_proxy(ModemCDMAProxyInterface *proxy) {
146 cdma_proxy_.reset(proxy);
147 }
148 void set_modem_gsm_card_proxy(ModemGSMCardProxyInterface *proxy) {
149 gsm_card_proxy_.reset(proxy);
150 }
151 void set_modem_gsm_network_proxy(ModemGSMNetworkProxyInterface *proxy) {
152 gsm_network_proxy_.reset(proxy);
153 }
154
Darin Petkov48a511a2011-09-15 10:33:37 -0700155 void SetGSMAccessTechnology(uint32 access_technology);
156
Darin Petkove9d12e02011-07-27 15:09:37 -0700157 // Inherited from Device.
158 virtual void Start();
159 virtual void Stop();
Paul Stewartfdd16072011-09-16 12:41:35 -0700160 virtual bool TechnologyIs(Technology::Identifier type) const;
Darin Petkov0828f5f2011-08-11 10:18:52 -0700161 virtual void LinkEvent(unsigned int flags, unsigned int change);
Darin Petkovc0865312011-09-16 15:31:20 -0700162 virtual void Scan(Error *error);
Darin Petkov9ae310f2011-08-30 15:41:13 -0700163 virtual void RegisterOnNetwork(const std::string &network_id, Error *error);
Darin Petkove42e1012011-08-31 12:35:04 -0700164 virtual void RequirePIN(const std::string &pin, bool require, Error *error);
165 virtual void EnterPIN(const std::string &pin, Error *error);
166 virtual void UnblockPIN(const std::string &unblock_code,
167 const std::string &pin,
168 Error *error);
169 virtual void ChangePIN(const std::string &old_pin,
170 const std::string &new_pin,
171 Error *error);
Chris Masone3bd3c8c2011-06-13 08:20:26 -0700172
173 private:
Darin Petkovab565bb2011-10-06 02:55:51 -0700174 friend class CellularTest;
Darin Petkovc408e692011-08-17 13:47:15 -0700175 FRIEND_TEST(CellularTest, Activate);
Darin Petkov51489002011-08-18 13:13:20 -0700176 FRIEND_TEST(CellularTest, ActivateError);
Darin Petkov3335b372011-08-22 11:05:32 -0700177 FRIEND_TEST(CellularTest, CreateService);
Darin Petkove42e1012011-08-31 12:35:04 -0700178 FRIEND_TEST(CellularTest, ChangePIN);
179 FRIEND_TEST(CellularTest, ChangePINError);
Darin Petkovc5f56562011-08-06 16:40:05 -0700180 FRIEND_TEST(CellularTest, Connect);
Darin Petkovc408e692011-08-17 13:47:15 -0700181 FRIEND_TEST(CellularTest, GetCDMAActivationStateString);
Darin Petkov51489002011-08-18 13:13:20 -0700182 FRIEND_TEST(CellularTest, GetCDMAActivationErrorString);
Darin Petkov975b5e72011-08-30 11:48:08 -0700183 FRIEND_TEST(CellularTest, GetCDMAIdentifiers);
Darin Petkov9bac6fe2011-08-26 12:49:05 -0700184 FRIEND_TEST(CellularTest, GetCDMANetworkTechnologyString);
Darin Petkovbec79a22011-08-01 14:47:17 -0700185 FRIEND_TEST(CellularTest, GetCDMARegistrationState);
Darin Petkov9bac6fe2011-08-26 12:49:05 -0700186 FRIEND_TEST(CellularTest, GetCDMARoamingStateString);
Darin Petkovd9661952011-08-03 16:25:42 -0700187 FRIEND_TEST(CellularTest, GetCDMASignalQuality);
Darin Petkov975b5e72011-08-30 11:48:08 -0700188 FRIEND_TEST(CellularTest, GetGSMIdentifiers);
Darin Petkov9bac6fe2011-08-26 12:49:05 -0700189 FRIEND_TEST(CellularTest, GetGSMNetworkTechnologyString);
190 FRIEND_TEST(CellularTest, GetGSMRoamingStateString);
Darin Petkov22b72bf2011-08-29 14:01:20 -0700191 FRIEND_TEST(CellularTest, GetGSMSignalQuality);
Darin Petkovceb68172011-07-29 14:47:48 -0700192 FRIEND_TEST(CellularTest, GetModemInfo);
193 FRIEND_TEST(CellularTest, GetModemStatus);
Darin Petkove9d12e02011-07-27 15:09:37 -0700194 FRIEND_TEST(CellularTest, GetStateString);
195 FRIEND_TEST(CellularTest, GetTypeString);
Darin Petkove42e1012011-08-31 12:35:04 -0700196 FRIEND_TEST(CellularTest, EnterPIN);
197 FRIEND_TEST(CellularTest, EnterPINError);
Darin Petkovbec79a22011-08-01 14:47:17 -0700198 FRIEND_TEST(CellularTest, InitProxiesCDMA);
199 FRIEND_TEST(CellularTest, InitProxiesGSM);
Darin Petkovc0865312011-09-16 15:31:20 -0700200 FRIEND_TEST(CellularTest, ParseScanResult);
Darin Petkov137884a2011-10-26 18:52:47 +0200201 FRIEND_TEST(CellularTest, ParseScanResultProviderLookup);
Darin Petkov9ae310f2011-08-30 15:41:13 -0700202 FRIEND_TEST(CellularTest, RegisterOnNetwork);
203 FRIEND_TEST(CellularTest, RegisterOnNetworkError);
Darin Petkove42e1012011-08-31 12:35:04 -0700204 FRIEND_TEST(CellularTest, RequirePIN);
205 FRIEND_TEST(CellularTest, RequirePINError);
Darin Petkov48a511a2011-09-15 10:33:37 -0700206 FRIEND_TEST(CellularTest, SetGSMAccessTechnology);
Darin Petkovc0865312011-09-16 15:31:20 -0700207 FRIEND_TEST(CellularTest, Scan);
Darin Petkovbac96002011-08-09 13:22:00 -0700208 FRIEND_TEST(CellularTest, StartConnected);
Darin Petkova1e0a1c2011-08-25 15:08:33 -0700209 FRIEND_TEST(CellularTest, StartCDMARegister);
Darin Petkov9bac6fe2011-08-26 12:49:05 -0700210 FRIEND_TEST(CellularTest, StartGSMRegister);
Darin Petkov0828f5f2011-08-11 10:18:52 -0700211 FRIEND_TEST(CellularTest, StartLinked);
Darin Petkove42e1012011-08-31 12:35:04 -0700212 FRIEND_TEST(CellularTest, UnblockPIN);
213 FRIEND_TEST(CellularTest, UnblockPINError);
Darin Petkov137884a2011-10-26 18:52:47 +0200214 FRIEND_TEST(CellularTest, UpdateGSMOperatorInfo);
Darin Petkovbac96002011-08-09 13:22:00 -0700215
Darin Petkov9bac6fe2011-08-26 12:49:05 -0700216 struct CDMA {
217 CDMA();
218
219 uint32 registration_state_evdo;
220 uint32 registration_state_1x;
221 uint32 activation_state;
222
223 uint16 prl_version;
224 std::string payment_url;
225 std::string usage_url;
226 };
227
228 struct GSM {
229 GSM();
230
231 uint32 registration_state;
232 uint32 access_technology;
233 std::string network_id;
234 std::string operator_name;
Darin Petkov137884a2011-10-26 18:52:47 +0200235 std::string operator_country;
Darin Petkov975b5e72011-08-30 11:48:08 -0700236 std::string spn;
Darin Petkov9bac6fe2011-08-26 12:49:05 -0700237 };
238
Darin Petkovc0865312011-09-16 15:31:20 -0700239 static const char kNetworkPropertyAccessTechnology[];
240 static const char kNetworkPropertyID[];
241 static const char kNetworkPropertyLongName[];
242 static const char kNetworkPropertyShortName[];
243 static const char kNetworkPropertyStatus[];
Darin Petkovbac96002011-08-09 13:22:00 -0700244 static const char kPhoneNumberCDMA[];
245 static const char kPhoneNumberGSM[];
Darin Petkove9d12e02011-07-27 15:09:37 -0700246
Darin Petkov0828f5f2011-08-11 10:18:52 -0700247 void SetState(State state);
248
Darin Petkovc5f56562011-08-06 16:40:05 -0700249 void ConnectTask(const DBusPropertiesMap &properties);
Darin Petkovc0865312011-09-16 15:31:20 -0700250 void ScanTask();
Darin Petkovc408e692011-08-17 13:47:15 -0700251 void ActivateTask(const std::string &carrier);
Darin Petkov9ae310f2011-08-30 15:41:13 -0700252 void RegisterOnNetworkTask(const std::string &network_id);
Darin Petkove42e1012011-08-31 12:35:04 -0700253 void RequirePINTask(const std::string &pin, bool require);
254 void EnterPINTask(const std::string &pin);
255 void UnblockPINTask(const std::string &unblock_code, const std::string &pin);
256 void ChangePINTask(const std::string &old_pin, const std::string &new_pin);
Darin Petkovc5f56562011-08-06 16:40:05 -0700257
Darin Petkovbac96002011-08-09 13:22:00 -0700258 // Invoked when the modem is connected to the cellular network to transition
259 // to the network-connected state and bring the network interface up.
260 void EstablishLink();
261
Chris Masone889666b2011-07-03 12:58:50 -0700262 StrIntPair SimLockStatusToProperty();
Darin Petkov48a511a2011-09-15 10:33:37 -0700263
mukesh agrawalffa3d042011-10-06 15:26:10 -0700264 void HelpRegisterDerivedStrIntPair(
265 const std::string &name,
266 StrIntPair(Cellular::*get)(void),
267 void(Cellular::*set)(const StrIntPair&, Error *));
Chris Masone889666b2011-07-03 12:58:50 -0700268
Darin Petkovdaf43862011-10-27 11:37:28 +0200269 void InitCapability();
Darin Petkovbec79a22011-08-01 14:47:17 -0700270 void InitProxies();
271
Darin Petkovcc044422011-08-17 13:30:06 -0700272 std::string GetTypeString() const;
273 static std::string GetStateString(State state);
Darin Petkove9d12e02011-07-27 15:09:37 -0700274
Darin Petkovd2045802011-08-23 11:09:25 -0700275 // Returns an empty string if the network technology is unknown.
276 std::string GetNetworkTechnologyString() const;
277
278 std::string GetRoamingStateString() const;
279
Darin Petkovc408e692011-08-17 13:47:15 -0700280 static std::string GetCDMAActivationStateString(uint32 state);
Darin Petkov51489002011-08-18 13:13:20 -0700281 static std::string GetCDMAActivationErrorString(uint32 error);
Darin Petkovc408e692011-08-17 13:47:15 -0700282
Darin Petkovf5f61e02011-07-29 11:35:40 -0700283 void EnableModem();
284 void GetModemStatus();
Darin Petkovceb68172011-07-29 14:47:48 -0700285 void GetGSMProperties();
286 void RegisterGSMModem();
Darin Petkovceb68172011-07-29 14:47:48 -0700287
288 // Obtains the modem identifiers: MEID for CDMA; IMEI, IMSI, SPN and MSISDN
289 // for GSM.
290 void GetModemIdentifiers();
Darin Petkov975b5e72011-08-30 11:48:08 -0700291 void GetCDMAIdentifiers();
292 void GetGSMIdentifiers();
Darin Petkovceb68172011-07-29 14:47:48 -0700293
Darin Petkovd9661952011-08-03 16:25:42 -0700294 // Obtains modem's manufacturer, model ID, and hardware revision.
Darin Petkovceb68172011-07-29 14:47:48 -0700295 void GetModemInfo();
Darin Petkovf5f61e02011-07-29 11:35:40 -0700296
Darin Petkovbec79a22011-08-01 14:47:17 -0700297 void GetModemRegistrationState();
298 void GetCDMARegistrationState();
299 void GetGSMRegistrationState();
300
Darin Petkovd9661952011-08-03 16:25:42 -0700301 // Processes a change in the modem registration state, possibly creating,
302 // destroying or updating the CellularService.
303 void HandleNewRegistrationState();
Darin Petkov0828f5f2011-08-11 10:18:52 -0700304 void HandleNewRegistrationStateTask();
Darin Petkovd9661952011-08-03 16:25:42 -0700305
306 void CreateService();
307
308 void GetModemSignalQuality();
309 uint32 GetCDMASignalQuality();
310 uint32 GetGSMSignalQuality();
311
312 void HandleNewSignalQuality(uint32 strength);
313
Darin Petkovc408e692011-08-17 13:47:15 -0700314 void HandleNewCDMAActivationState(uint32 error);
315
Darin Petkov137884a2011-10-26 18:52:47 +0200316 // Updates the GSM operator name and country based on a newly obtained network
317 // id.
318 void UpdateGSMOperatorInfo();
319
320 // Updates the serving operator on the active service.
321 void UpdateServingOperator();
322
Darin Petkovc0865312011-09-16 15:31:20 -0700323 Stringmap ParseScanResult(
324 const ModemGSMNetworkProxyInterface::ScanResult &result);
325
Darin Petkov580c7af2011-10-24 12:32:50 +0200326 // Signal callbacks inherited from ModemCDMAProxyDelegate.
Darin Petkovb27e5442011-08-16 14:36:45 -0700327 virtual void OnCDMAActivationStateChanged(
328 uint32 activation_state,
329 uint32 activation_error,
330 const DBusPropertiesMap &status_changes);
Darin Petkovd9661952011-08-03 16:25:42 -0700331 virtual void OnCDMARegistrationStateChanged(uint32 state_1x,
332 uint32 state_evdo);
333 virtual void OnCDMASignalQualityChanged(uint32 strength);
334
Darin Petkov580c7af2011-10-24 12:32:50 +0200335 // Signal callbacks inherited from ModemGSMNetworkProxyDelegate.
Darin Petkova1e0a1c2011-08-25 15:08:33 -0700336 virtual void OnGSMNetworkModeChanged(uint32 mode);
337 virtual void OnGSMRegistrationInfoChanged(uint32 status,
338 const std::string &operator_code,
339 const std::string &operator_name);
340 virtual void OnGSMSignalQualityChanged(uint32 quality);
341
Darin Petkov580c7af2011-10-24 12:32:50 +0200342 // Signal callbacks inherited from ModemProxyDelegate.
Darin Petkovc5f56562011-08-06 16:40:05 -0700343 virtual void OnModemStateChanged(uint32 old_state,
344 uint32 new_state,
345 uint32 reason);
346
Darin Petkovab565bb2011-10-06 02:55:51 -0700347 // Store cached copies of singletons for speed/ease of testing.
348 ProxyFactory *proxy_factory_;
349
Darin Petkove9d12e02011-07-27 15:09:37 -0700350 Type type_;
351 State state_;
Darin Petkovbac96002011-08-09 13:22:00 -0700352 ModemState modem_state_;
Darin Petkove9d12e02011-07-27 15:09:37 -0700353
Darin Petkovdaf43862011-10-27 11:37:28 +0200354 scoped_ptr<CellularCapability> capability_;
355
Darin Petkove9d12e02011-07-27 15:09:37 -0700356 const std::string dbus_owner_; // ModemManager.Modem
357 const std::string dbus_path_; // ModemManager.Modem
358 scoped_ptr<ModemProxyInterface> proxy_;
Darin Petkove604f702011-07-28 15:51:17 -0700359 scoped_ptr<ModemSimpleProxyInterface> simple_proxy_;
Darin Petkovbec79a22011-08-01 14:47:17 -0700360 scoped_ptr<ModemCDMAProxyInterface> cdma_proxy_;
Darin Petkov975b5e72011-08-30 11:48:08 -0700361 scoped_ptr<ModemGSMCardProxyInterface> gsm_card_proxy_;
Darin Petkova1e0a1c2011-08-25 15:08:33 -0700362 scoped_ptr<ModemGSMNetworkProxyInterface> gsm_network_proxy_;
Darin Petkovbec79a22011-08-01 14:47:17 -0700363
Darin Petkov137884a2011-10-26 18:52:47 +0200364 mobile_provider_db *provider_db_;
365
Darin Petkovbec79a22011-08-01 14:47:17 -0700366 CDMA cdma_;
Darin Petkov9bac6fe2011-08-26 12:49:05 -0700367 GSM gsm_;
Darin Petkove9d12e02011-07-27 15:09:37 -0700368
Darin Petkovd9661952011-08-03 16:25:42 -0700369 CellularServiceRefPtr service_;
Chris Masone853b81b2011-06-24 14:11:41 -0700370
Darin Petkovc5f56562011-08-06 16:40:05 -0700371 ScopedRunnableMethodFactory<Cellular> task_factory_;
372
Chris Masoneb925cc82011-06-22 15:39:57 -0700373 // Properties
374 bool allow_roaming_;
375 std::string carrier_;
376 std::string meid_;
377 std::string imei_;
378 std::string imsi_;
379 std::string esn_;
380 std::string mdn_;
381 std::string min_;
382 std::string model_id_;
383 std::string manufacturer_;
384 std::string firmware_revision_;
385 std::string hardware_revision_;
Chris Masoneb925cc82011-06-22 15:39:57 -0700386 bool scanning_;
387 uint16 scan_interval_;
Darin Petkova1e0a1c2011-08-25 15:08:33 -0700388 std::string selected_network_;
Darin Petkovc0865312011-09-16 15:31:20 -0700389 Stringmaps found_networks_;
Chris Masone889666b2011-07-03 12:58:50 -0700390 SimLockStatus sim_lock_status_;
Darin Petkov3335b372011-08-22 11:05:32 -0700391 Operator home_provider_;
Chris Masoneb925cc82011-06-22 15:39:57 -0700392
Chris Masone3bd3c8c2011-06-13 08:20:26 -0700393 DISALLOW_COPY_AND_ASSIGN(Cellular);
394};
395
396} // namespace shill
397
398#endif // SHILL_CELLULAR_