cellular_capability_universal.h revision 4c0724af38d0eaf7155bb789280940a41ef9f08c
182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow// Use of this source code is governed by a BSD-style license that can be
382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow// found in the LICENSE file.
482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#ifndef SHILL_CELLULAR_CAPABILITY_UNIVERSAL_
682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#define SHILL_CELLULAR_CAPABILITY_UNIVERSAL_
782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include <deque>
982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include <string>
1082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include <vector>
1182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
1282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include <base/memory/scoped_ptr.h>
1382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include <base/memory/weak_ptr.h>
1482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include <gtest/gtest_prod.h>  // for FRIEND_TEST
1582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include <mm/ModemManager-enums.h>
1682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
1782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/accessor_interface.h"
1882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/cellular.h"
1982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/cellular_capability.h"
2082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/mm1_modem_modem3gpp_proxy_interface.h"
2182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/mm1_modem_modemcdma_proxy_interface.h"
2282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/mm1_modem_proxy_interface.h"
2382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/mm1_modem_simple_proxy_interface.h"
2482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/mm1_sim_proxy_interface.h"
2582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
2682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
2782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgowstruct mobile_provider;
2882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
2982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgownamespace shill {
3082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
3182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow// CellularCapabilityUniversal handles modems using the
3282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow// org.chromium.ModemManager1 DBUS interface.  This class is used for
3382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow// all types of modems, i.e. CDMA, GSM, and LTE modems.
3482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgowclass CellularCapabilityUniversal : public CellularCapability {
3582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow public:
3682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  typedef std::vector<DBusPropertiesMap> ScanResults;
3782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  typedef DBusPropertiesMap ScanResult;
3882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
3982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  CellularCapabilityUniversal(Cellular *cellular, ProxyFactory *proxy_factory);
4082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
4182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  // Inherited from CellularCapability.
4282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void StartModem(Error *error, const ResultCallback &callback);
4382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void StopModem(Error *error, const ResultCallback &callback);
4482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void Connect(const DBusPropertiesMap &properties, Error *error,
4582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                       const ResultCallback &callback);
4682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void Disconnect(Error *error, const ResultCallback &callback);
4782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void Activate(const std::string &carrier,
4882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                        Error *error, const ResultCallback &callback);
4982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
5082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void OnServiceCreated();
5182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void UpdateStatus(const DBusPropertiesMap &properties);
5282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void SetupConnectProperties(DBusPropertiesMap *properties);
5382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void GetRegistrationState();
54ef96556fff984bbc79597669af2465905666ed09Jason Glasgow  virtual void GetProperties();
5582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void Register(const ResultCallback &callback);
5682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
5782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void RegisterOnNetwork(const std::string &network_id,
5882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                                 Error *error,
5982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                                 const ResultCallback &callback);
6082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual bool IsRegistered();
6182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual std::string CreateFriendlyServiceName();
6282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void RequirePIN(const std::string &pin, bool require,
6382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                          Error *error, const ResultCallback &callback);
6482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void EnterPIN(const std::string &pin,
6582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                        Error *error, const ResultCallback &callback);
6682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void UnblockPIN(const std::string &unblock_code,
6782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                          const std::string &pin,
6882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                          Error *error, const ResultCallback &callback);
6982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void ChangePIN(const std::string &old_pin,
7082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                         const std::string &new_pin,
7182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                         Error *error, const ResultCallback &callback);
7282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
7382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void Scan(Error *error, const ResultCallback &callback);
7482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual std::string GetNetworkTechnologyString() const;
7582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual std::string GetRoamingStateString() const;
7682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void GetSignalQuality();
774c0724af38d0eaf7155bb789280940a41ef9f08cJason Glasgow  virtual std::string GetTypeString() const { return "Universal"; }
7882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void OnDBusPropertiesChanged(
7982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow      const std::string &interface,
8082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow      const DBusPropertiesMap &changed_properties,
8182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow      const std::vector<std::string> &invalidated_properties);
8282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void OnModem3GPPPropertiesChanged(
8382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow      const DBusPropertiesMap &properties);
8482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
8582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow protected:
8682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void InitProxies();
8782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void ReleaseProxies();
8882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  // Override OnConnectReply in order to handle the possibility of
8982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  // retrying the Connect operation.
9082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void OnConnectReply(const ResultCallback &callback,
9182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                              const Error &error);
9282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
9382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual bool AllowRoaming();
9482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
9582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow private:
9682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  friend class CellularTest;
9782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  friend class CellularCapabilityUniversalTest;
9882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  friend class CellularCapabilityTest;
9982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, CreateDeviceFromProperties);
10082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, CreateFriendlyServiceName);
10182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, GetIMEI);
10282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, GetIMSI);
10382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, GetMSISDN);
10482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, GetSPN);
10582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, RequirePIN);
10682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, EnterPIN);
10782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, UnblockPIN);
10882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, ChangePIN);
10982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, InitAPNList);
11082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, ParseScanResult);
11182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, ParseScanResultProviderLookup);
11282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, RegisterOnNetwork);
11382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, Scan);
11482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, SetAccessTechnologies);
11582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, SetHomeProvider);
11682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, UpdateOperatorInfo);
11782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, GetRegistrationState);
1184c0724af38d0eaf7155bb789280940a41ef9f08cJason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, OnDBusPropertiesChanged);
11982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityUniversalTest, SetupApnTryList);
12082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityTest, AllowRoaming);
12182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularCapabilityTest, TryApns);
12282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(CellularTest, StartUniversalRegister);
12382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  FRIEND_TEST(ModemTest, CreateDeviceFromProperties);
12482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
125ef96556fff984bbc79597669af2465905666ed09Jason Glasgow  // Methods used in starting a modem
126ef96556fff984bbc79597669af2465905666ed09Jason Glasgow  void Start_EnableModemCompleted(const ResultCallback &callback,
127ef96556fff984bbc79597669af2465905666ed09Jason Glasgow                                  const Error &error);
128ef96556fff984bbc79597669af2465905666ed09Jason Glasgow  void Start_RegisterCompleted(const ResultCallback &callback,
129ef96556fff984bbc79597669af2465905666ed09Jason Glasgow                               const Error &error);
130ef96556fff984bbc79597669af2465905666ed09Jason Glasgow
131ef96556fff984bbc79597669af2465905666ed09Jason Glasgow  // Methods used in stopping a modem
132ef96556fff984bbc79597669af2465905666ed09Jason Glasgow  void Stop_DisconnectCompleted(const ResultCallback &callback,
133ef96556fff984bbc79597669af2465905666ed09Jason Glasgow                               const Error &error);
134ef96556fff984bbc79597669af2465905666ed09Jason Glasgow  void Stop_Disable(const ResultCallback &callback);
135ef96556fff984bbc79597669af2465905666ed09Jason Glasgow  void Stop_DisableCompleted(const ResultCallback &callback,
136ef96556fff984bbc79597669af2465905666ed09Jason Glasgow                             const Error &error);
137ef96556fff984bbc79597669af2465905666ed09Jason Glasgow
13882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  // TOOD(jglasgow): document what this does!!!!!
13982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  void SetAccessTechnologies(uint32 access_technologies);
14082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
14182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  // Sets the upper level information about the home cellular provider from the
14282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  // modem's IMSI and SPN.
14382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  void SetHomeProvider();
14482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
14582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  // Updates the Universal operator name and country based on a newly
14682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  // obtained network id.
14782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  void UpdateOperatorInfo();
14882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
14982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  // Updates the serving operator on the active service.
15082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  void UpdateServingOperator();
15182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
15282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  // Initializes the |apn_list_| property based on the current |home_provider_|.
15382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  void InitAPNList();
15482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
15582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  Stringmap ParseScanResult(const ScanResult &result);
15682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
15782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  KeyValueStore SimLockStatusToProperty(Error *error);
15882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
15982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  void SetupApnTryList();
16082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  void FillConnectPropertyMap(DBusPropertiesMap *properties);
16182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
16282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  void HelpRegisterDerivedKeyValueStore(
16382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow      const std::string &name,
16482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow      KeyValueStore(CellularCapabilityUniversal::*get)(Error *error),
16582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow      void(CellularCapabilityUniversal::*set)(
16682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow          const KeyValueStore &value, Error *error));
16782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
16882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  // Signal callbacks
16982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void OnNetworkModeSignal(uint32 mode);
17082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
17182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  // Property Change notification handlers
1724c0724af38d0eaf7155bb789280940a41ef9f08cJason Glasgow  virtual void OnModemPropertiesChanged(
1734c0724af38d0eaf7155bb789280940a41ef9f08cJason Glasgow      const DBusPropertiesMap &properties,
1744c0724af38d0eaf7155bb789280940a41ef9f08cJason Glasgow      const std::vector<std::string> &invalidated_properties);
1754c0724af38d0eaf7155bb789280940a41ef9f08cJason Glasgow
17682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  // TODO(jglasgow): install generic property change notification handler
17782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void On3GPPRegistrationChanged(MMModem3gppRegistrationState state,
17882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                                        const std::string &operator_code,
17982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                                        const std::string &operator_name);
18082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void OnSignalQualityChanged(uint32 quality);
18182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
182ef96556fff984bbc79597669af2465905666ed09Jason Glasgow  // Updates the sim_path_ variable and creates a new proxy to the
183ef96556fff984bbc79597669af2465905666ed09Jason Glasgow  // DBUS ModemManager1.Sim interface
184ef96556fff984bbc79597669af2465905666ed09Jason Glasgow  virtual void OnSimPathChanged(const std::string &sim_path);
185ef96556fff984bbc79597669af2465905666ed09Jason Glasgow
18682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  // Method callbacks
18782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void OnRegisterReply(const ResultCallback &callback,
18882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                               const Error &error);
18982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  virtual void OnScanReply(const ResultCallback &callback,
19082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                           const ScanResults &results,
19182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow                           const Error &error);
19282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
19382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  scoped_ptr<mm1::ModemModem3gppProxyInterface> modem_3gpp_proxy_;
19482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  scoped_ptr<mm1::ModemModemCdmaProxyInterface> modem_cdma_proxy_;
19582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  scoped_ptr<mm1::ModemProxyInterface> modem_proxy_;
19682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  scoped_ptr<mm1::ModemSimpleProxyInterface> modem_simple_proxy_;
19782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  scoped_ptr<mm1::SimProxyInterface> sim_proxy_;
19882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
19982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  base::WeakPtrFactory<CellularCapabilityUniversal> weak_ptr_factory_;
20082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
20182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  MMModem3gppRegistrationState registration_state_;
20282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  MMModemCdmaRegistrationState cdma_registration_state_;
20382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  uint32 access_technologies_;  // Bits based on MMModemAccessTechnology
20482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  Cellular::Operator serving_operator_;
20582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  std::string spn_;
20682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  mobile_provider *home_provider_;
20782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  std::string desired_network_;
20882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
20982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  // Properties.
21082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  std::string carrier_;
21182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  std::string esn_;
21282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  std::string firmware_revision_;
21382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  std::string hardware_revision_;
21482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  std::string imei_;
21582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  std::string imsi_;
21682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  std::string manufacturer_;
21782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  std::string mdn_;
21882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  std::string meid_;
21982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  std::string min_;
22082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  std::string model_id_;
22182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  std::string selected_network_;
22282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  Stringmaps found_networks_;
22382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  std::deque<Stringmap> apn_try_list_;
22482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  bool scanning_supported_;
22582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  bool scanning_;
22682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  uint16 scan_interval_;
22782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  SimLockStatus sim_lock_status_;
22882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  Stringmaps apn_list_;
229ef96556fff984bbc79597669af2465905666ed09Jason Glasgow  std::string sim_path_;
23082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
23182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  static unsigned int friendly_service_name_id_;
23282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
23382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow  DISALLOW_COPY_AND_ASSIGN(CellularCapabilityUniversal);
23482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow};
23582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
23682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow}  // namespace shill
23782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow
23882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#endif  // SHILL_CELLULAR_CAPABILITY_UNIVERSAL_
239