cellular_capability_universal.h revision d42d8ec85a9a1bdc406870b75d1b9e266fbaaa02
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 5145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow#ifndef SHILL_CELLULAR_CAPABILITY_UNIVERSAL_H_ 6145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow#define SHILL_CELLULAR_CAPABILITY_UNIVERSAL_H_ 782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include <deque> 9af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow#include <map> 1082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include <string> 1182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include <vector> 1282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 1382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include <base/memory/scoped_ptr.h> 1482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include <base/memory/weak_ptr.h> 1582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include <gtest/gtest_prod.h> // for FRIEND_TEST 165c853ef21b9247d2ad3d60736b3dea77b8681ed8Ben Chan#include <ModemManager/ModemManager.h> 1782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 1882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/accessor_interface.h" 1982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/cellular.h" 2082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/cellular_capability.h" 216e5639f9ef54db278c5f2265d5364e5994966f4aArman Uguray#include "shill/mm1_bearer_proxy_interface.h" 2282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/mm1_modem_modem3gpp_proxy_interface.h" 2382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/mm1_modem_modemcdma_proxy_interface.h" 2482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/mm1_modem_proxy_interface.h" 2582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/mm1_modem_simple_proxy_interface.h" 2682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow#include "shill/mm1_sim_proxy_interface.h" 2782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 2882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 2982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgowstruct mobile_provider; 3082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 3182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgownamespace shill { 3282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 3327526f1dad75e135f437e023cb34b0919d9a981fPrathmesh Prabhuclass ModemInfo; 34c7b1560b03c070fad239767f868322e6b3bdd932Arman Uguray 3582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow// CellularCapabilityUniversal handles modems using the 3682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow// org.chromium.ModemManager1 DBUS interface. This class is used for 3782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow// all types of modems, i.e. CDMA, GSM, and LTE modems. 3882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgowclass CellularCapabilityUniversal : public CellularCapability { 3982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow public: 4082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow typedef std::vector<DBusPropertiesMap> ScanResults; 4182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow typedef DBusPropertiesMap ScanResult; 42af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow typedef std::map< uint32_t, uint32_t > LockRetryData; 4382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 44145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow // Constants used in connect method call. Make available to test matchers. 45145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow // TODO(jglasgow): Generate from modem manager into 46145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow // ModemManager-names.h. 47145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow // See http://crosbug.com/30551. 48145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow static const char kConnectPin[]; 49145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow static const char kConnectOperatorId[]; 50145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow static const char kConnectBands[]; 51145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow static const char kConnectAllowedModes[]; 52145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow static const char kConnectPreferredMode[]; 53145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow static const char kConnectApn[]; 54145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow static const char kConnectIPType[]; 55145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow static const char kConnectUser[]; 56145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow static const char kConnectPassword[]; 57145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow static const char kConnectNumber[]; 58145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow static const char kConnectAllowRoaming[]; 59145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow static const char kConnectRMProtocol[]; 60145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow 61ce4483e054058ab3f6d940c7aa2e7b5697af325aThieu Le CellularCapabilityUniversal(Cellular *cellular, 62ce4483e054058ab3f6d940c7aa2e7b5697af325aThieu Le ProxyFactory *proxy_factory, 6327526f1dad75e135f437e023cb34b0919d9a981fPrathmesh Prabhu ModemInfo *modem_info); 6482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 6582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow // Inherited from CellularCapability. 66e285a84b38b81f5557b576da187d037ad24ae4afGary Morain // Checks the modem state. If the state is kModemStateDisabled, then the 67e285a84b38b81f5557b576da187d037ad24ae4afGary Morain // modem is enabled. Otherwise, the enable command is buffered until the 68e285a84b38b81f5557b576da187d037ad24ae4afGary Morain // modem becomes disabled. ModemManager rejects the enable command if the 69e285a84b38b81f5557b576da187d037ad24ae4afGary Morain // modem is not disabled, for exmaple, if it is initializing insted. 7082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void StartModem(Error *error, const ResultCallback &callback); 7182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void StopModem(Error *error, const ResultCallback &callback); 7282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void Connect(const DBusPropertiesMap &properties, Error *error, 7382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow const ResultCallback &callback); 7482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void Disconnect(Error *error, const ResultCallback &callback); 758a46890363301a4e28fe3175e194703409e344dcChristopher Wiley virtual void DisconnectCleanup(); 7682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void Activate(const std::string &carrier, 7782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow Error *error, const ResultCallback &callback); 78c7b1560b03c070fad239767f868322e6b3bdd932Arman Uguray virtual void CompleteActivation(Error *error); 7982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 8082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void OnServiceCreated(); 8182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void SetupConnectProperties(DBusPropertiesMap *properties); 82ef96556fff984bbc79597669af2465905666ed09Jason Glasgow virtual void GetProperties(); 8315786033dc85e3dd7fea18ba936957b8b2c34e29Ben Chan virtual bool IsServiceActivationRequired() const; 8482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void Register(const ResultCallback &callback); 8582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 8682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void RegisterOnNetwork(const std::string &network_id, 8782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow Error *error, 8882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow const ResultCallback &callback); 8982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual bool IsRegistered(); 907fce52c4afdc5e73a9e740dc9b90f1e61ae8cea4Eric Shienbrood virtual void SetUnregistered(bool searching); 9182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual std::string CreateFriendlyServiceName(); 9282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void RequirePIN(const std::string &pin, bool require, 9382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow Error *error, const ResultCallback &callback); 9482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void EnterPIN(const std::string &pin, 9582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow Error *error, const ResultCallback &callback); 9682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void UnblockPIN(const std::string &unblock_code, 9782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow const std::string &pin, 9882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow Error *error, const ResultCallback &callback); 9982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void ChangePIN(const std::string &old_pin, 10082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow const std::string &new_pin, 10182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow Error *error, const ResultCallback &callback); 1025d0d32c1b5e2370ff0739f7a2dbb641726d4bf87Ben Chan virtual void Reset(Error *error, const ResultCallback &callback); 10382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 10482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void Scan(Error *error, const ResultCallback &callback); 10582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual std::string GetNetworkTechnologyString() const; 10682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual std::string GetRoamingStateString() const; 10782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void GetSignalQuality(); 1089f09aeffcd088960c5b1a7d507c3705ce14b2b0dJason Glasgow virtual std::string GetTypeString() const; 10982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void OnDBusPropertiesChanged( 11082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow const std::string &interface, 11182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow const DBusPropertiesMap &changed_properties, 11282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow const std::vector<std::string> &invalidated_properties); 113af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow virtual bool AllowRoaming(); 114d42d8ec85a9a1bdc406870b75d1b9e266fbaaa02Arman Uguray virtual bool ShouldEnableTrafficMonitoring() const; 115145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow 11682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow protected: 11782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void InitProxies(); 11882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow virtual void ReleaseProxies(); 11982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 12082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow private: 121cd0349c9bafcb5c250da25691ada7fcc3752e145Jason Glasgow // Constants used in scan results. Make available to unit tests. 122cd0349c9bafcb5c250da25691ada7fcc3752e145Jason Glasgow // TODO(jglasgow): Generate from modem manager into ModemManager-names.h. 123cd0349c9bafcb5c250da25691ada7fcc3752e145Jason Glasgow // See http://crosbug.com/30551. 124cd0349c9bafcb5c250da25691ada7fcc3752e145Jason Glasgow static const char kStatusProperty[]; 125cd0349c9bafcb5c250da25691ada7fcc3752e145Jason Glasgow static const char kOperatorLongProperty[]; 126cd0349c9bafcb5c250da25691ada7fcc3752e145Jason Glasgow static const char kOperatorShortProperty[]; 127cd0349c9bafcb5c250da25691ada7fcc3752e145Jason Glasgow static const char kOperatorCodeProperty[]; 128cd0349c9bafcb5c250da25691ada7fcc3752e145Jason Glasgow static const char kOperatorAccessTechnologyProperty[]; 129cd0349c9bafcb5c250da25691ada7fcc3752e145Jason Glasgow 130145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow // Modem Model ID strings. From modem firmware via modemmanager. 131145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow static const char kE362ModelId[]; 132145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow 1332717a10096e12e46413adf47b39c5b19cd33bce7Arman Uguray // Generic service name prefix, shown when the correct carrier name is 1342717a10096e12e46413adf47b39c5b19cd33bce7Arman Uguray // unknown. 1352717a10096e12e46413adf47b39c5b19cd33bce7Arman Uguray static const char kGenericServiceNamePrefix[]; 1362717a10096e12e46413adf47b39c5b19cd33bce7Arman Uguray 1371361c0366043f3d2628dc7c339339116ce31085eArman Uguray static const unsigned int kDefaultScanningOrSearchingTimeoutMilliseconds; 1382cac294eff9415574cb9066e88f5cf43180a5092Thieu Le static const int kSetPowerStateTimeoutMilliseconds; 139ee464d3c77dc7662973bfa5cb3c6eeb207366eacArman Uguray 1401361c0366043f3d2628dc7c339339116ce31085eArman Uguray 1416552f8c74196782e9adf09f4fea01c836f551255Arman Uguray // Root path. The SIM path is reported by ModemManager to be the root path 1426552f8c74196782e9adf09f4fea01c836f551255Arman Uguray // when no SIM is present. 1436552f8c74196782e9adf09f4fea01c836f551255Arman Uguray static const char kRootPath[]; 1446552f8c74196782e9adf09f4fea01c836f551255Arman Uguray 14582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow friend class CellularTest; 14682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow friend class CellularCapabilityTest; 1473d27539b13590e0b149440ce017fdc401ef6e735Thieu Le friend class CellularCapabilityUniversalTest; 1481361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, AllowRoaming); 149efea6e0f28c3270038914e80166702d5ac23095eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, CompleteActivation); 1501361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, Connect); 1511361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, ConnectApns); 1521361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, CreateFriendlyServiceName); 1531361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, DisconnectNoProxy); 1547af0fac103deceec063554ef5705901d6d82d42fArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, 1557af0fac103deceec063554ef5705901d6d82d42fArman Uguray GetNetworkTechnologyStringOnE362); 1561361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, GetTypeString); 157c7b1560b03c070fad239767f868322e6b3bdd932Arman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, IsMdnValid); 1581361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, IsServiceActivationRequired); 1596552f8c74196782e9adf09f4fea01c836f551255Arman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, IsValidSimPath); 160d759252158ec07b4a9edbcfdfb265f010b3e7e13Ben Chan FRIEND_TEST(CellularCapabilityUniversalMainTest, NormalizeMdn); 1611361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, OnListBearersReply); 1621361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, 163fcca27bd166ce485d9ef8afce5e060be935ece97Ben Chan OnModemCurrentCapabilitiesChanged); 1641361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, PropertiesChanged); 1651361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, Reset); 1661361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, Scan); 1671361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, ScanFailure); 1681361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, SetHomeProvider); 169d42d8ec85a9a1bdc406870b75d1b9e266fbaaa02Arman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, 170d42d8ec85a9a1bdc406870b75d1b9e266fbaaa02Arman Uguray ShouldEnableTrafficMonitoring); 1711361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, SimLockStatusChanged); 1721361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, SimPathChanged); 1731361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, SimPropertiesChanged); 1741361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, StartModem); 1751361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, StopModem); 1761361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, StopModemConnected); 177c7b1560b03c070fad239767f868322e6b3bdd932Arman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, UpdateIccidActivationState); 178efea6e0f28c3270038914e80166702d5ac23095eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, 179efea6e0f28c3270038914e80166702d5ac23095eArman Uguray UpdateServiceActivationState); 1801361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, UpdateServiceName); 1811361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, UpdateStorageIdentifier); 1821361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, UpdateOLP); 1831361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, UpdateOperatorInfo); 1841361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, 1851361c0366043f3d2628dc7c339339116ce31085eArman Uguray UpdateOperatorInfoViaOperatorId); 1861361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalMainTest, UpdateScanningProperty); 1871361c0366043f3d2628dc7c339339116ce31085eArman Uguray FRIEND_TEST(CellularCapabilityUniversalTimerTest, 1881361c0366043f3d2628dc7c339339116ce31085eArman Uguray UpdateScanningPropertyTimeout); 189d42d8ec85a9a1bdc406870b75d1b9e266fbaaa02Arman Uguray FRIEND_TEST(CellularTest, EnableTrafficMonitor); 19009fa2a0e9c0feed7b3ca23fc7d8ad59783f4c6a7Ben Chan FRIEND_TEST(CellularTest, 19109fa2a0e9c0feed7b3ca23fc7d8ad59783f4c6a7Ben Chan HandleNewRegistrationStateForServiceRequiringActivation); 1925218cf2bb1301197e0e3c9381bc4c66e8adf80b0Thieu Le FRIEND_TEST(CellularTest, ModemStateChangeLostRegistration); 19382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 194ef96556fff984bbc79597669af2465905666ed09Jason Glasgow // Methods used in starting a modem 195e285a84b38b81f5557b576da187d037ad24ae4afGary Morain void EnableModem(Error *error, const ResultCallback &callback); 196b9c05e082cf4afc03dc4d0748a08feb2340ded92Thieu Le void Start_ModemAlreadyEnabled(const ResultCallback &callback); 197ef96556fff984bbc79597669af2465905666ed09Jason Glasgow void Start_EnableModemCompleted(const ResultCallback &callback, 198ef96556fff984bbc79597669af2465905666ed09Jason Glasgow const Error &error); 199ef96556fff984bbc79597669af2465905666ed09Jason Glasgow 200ef96556fff984bbc79597669af2465905666ed09Jason Glasgow // Methods used in stopping a modem 201ef96556fff984bbc79597669af2465905666ed09Jason Glasgow void Stop_DisconnectCompleted(const ResultCallback &callback, 202ef96556fff984bbc79597669af2465905666ed09Jason Glasgow const Error &error); 203ef96556fff984bbc79597669af2465905666ed09Jason Glasgow void Stop_Disable(const ResultCallback &callback); 204ef96556fff984bbc79597669af2465905666ed09Jason Glasgow void Stop_DisableCompleted(const ResultCallback &callback, 205ef96556fff984bbc79597669af2465905666ed09Jason Glasgow const Error &error); 206ee464d3c77dc7662973bfa5cb3c6eeb207366eacArman Uguray void Stop_PowerDown(const ResultCallback &callback); 207ee464d3c77dc7662973bfa5cb3c6eeb207366eacArman Uguray void Stop_PowerDownCompleted(const ResultCallback &callback, 208ee464d3c77dc7662973bfa5cb3c6eeb207366eacArman Uguray const Error &error); 209ef96556fff984bbc79597669af2465905666ed09Jason Glasgow 2102717a10096e12e46413adf47b39c5b19cd33bce7Arman Uguray // Updates the name property that is exposed by the service to Chrome. 2112717a10096e12e46413adf47b39c5b19cd33bce7Arman Uguray void UpdateServiceName(); 2122717a10096e12e46413adf47b39c5b19cd33bce7Arman Uguray 2138a2c01e2d7fb27724f529adc3a0aa2daba9b1b44Ben Chan void UpdateScanningProperty(); 2148a2c01e2d7fb27724f529adc3a0aa2daba9b1b44Ben Chan 215d73783fb016a4c9d7d8644db83c8caeb447b0063Arman Uguray // Methods used in acquiring information related to the carrier; 216d73783fb016a4c9d7d8644db83c8caeb447b0063Arman Uguray 2176d0d1e7f24c2c3ad491392997cd2b05cc0460ea1Ben Chan // Updates the online payment portal information, if any, for the cellular 2186d0d1e7f24c2c3ad491392997cd2b05cc0460ea1Ben Chan // provider. 2196d0d1e7f24c2c3ad491392997cd2b05cc0460ea1Ben Chan void UpdateOLP(); 2206d0d1e7f24c2c3ad491392997cd2b05cc0460ea1Ben Chan 22182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow // Updates the Universal operator name and country based on a newly 22282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow // obtained network id. 22382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow void UpdateOperatorInfo(); 22482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 225d73783fb016a4c9d7d8644db83c8caeb447b0063Arman Uguray // Sets the upper level information about the home cellular provider from the 226d73783fb016a4c9d7d8644db83c8caeb447b0063Arman Uguray // modem's IMSI and SPN. 227d73783fb016a4c9d7d8644db83c8caeb447b0063Arman Uguray void SetHomeProvider(); 228d73783fb016a4c9d7d8644db83c8caeb447b0063Arman Uguray 22982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow // Updates the serving operator on the active service. 23082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow void UpdateServingOperator(); 23182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 232d73783fb016a4c9d7d8644db83c8caeb447b0063Arman Uguray // Initializes the |apn_list_| property based on the current |home_provider_|. 233d73783fb016a4c9d7d8644db83c8caeb447b0063Arman Uguray void InitAPNList(); 234d73783fb016a4c9d7d8644db83c8caeb447b0063Arman Uguray 2356e5639f9ef54db278c5f2265d5364e5994966f4aArman Uguray // Updates |bearer_path_| to match the currently active bearer. 2366e5639f9ef54db278c5f2265d5364e5994966f4aArman Uguray void UpdateBearerPath(); 2376e5639f9ef54db278c5f2265d5364e5994966f4aArman Uguray 238c953357b248a9559c95097892d1458ff1a4e43bfArman Uguray // Updates the storage identifier used for the current cellular service. 239c953357b248a9559c95097892d1458ff1a4e43bfArman Uguray void UpdateStorageIdentifier(); 240c953357b248a9559c95097892d1458ff1a4e43bfArman Uguray 24182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 24282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow Stringmap ParseScanResult(const ScanResult &result); 24382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 24482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow KeyValueStore SimLockStatusToProperty(Error *error); 24582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 24682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow void SetupApnTryList(); 24782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow void FillConnectPropertyMap(DBusPropertiesMap *properties); 24882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 24982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow void HelpRegisterDerivedKeyValueStore( 25082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow const std::string &name, 25182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow KeyValueStore(CellularCapabilityUniversal::*get)(Error *error), 25282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow void(CellularCapabilityUniversal::*set)( 25382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow const KeyValueStore &value, Error *error)); 25482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 255145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow // Returns true if a connect error should be retried. This function 256145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow // abstracts modem specific behavior for modems which do a lousy job 257145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow // of returning specific errors on connect failures. 258145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow bool RetriableConnectError(const Error &error) const; 259145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow 26082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow // Signal callbacks 2613022be5da0e7e158c7f8fc4e3f5d005eb5dde7e7Nathan Williams void OnNetworkModeSignal(uint32 mode); 2627fce52c4afdc5e73a9e740dc9b90f1e61ae8cea4Eric Shienbrood void OnModemStateChangedSignal(int32 old_state, 2637fce52c4afdc5e73a9e740dc9b90f1e61ae8cea4Eric Shienbrood int32 new_state, 2647fce52c4afdc5e73a9e740dc9b90f1e61ae8cea4Eric Shienbrood uint32 reason); 26582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 26682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow // Property Change notification handlers 2673022be5da0e7e158c7f8fc4e3f5d005eb5dde7e7Nathan Williams void OnModemPropertiesChanged( 2684c0724af38d0eaf7155bb789280940a41ef9f08cJason Glasgow const DBusPropertiesMap &properties, 2694c0724af38d0eaf7155bb789280940a41ef9f08cJason Glasgow const std::vector<std::string> &invalidated_properties); 2704c0724af38d0eaf7155bb789280940a41ef9f08cJason Glasgow 2713022be5da0e7e158c7f8fc4e3f5d005eb5dde7e7Nathan Williams void OnSignalQualityChanged(uint32 quality); 27282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 273ef96556fff984bbc79597669af2465905666ed09Jason Glasgow // Updates the sim_path_ variable and creates a new proxy to the 274ef96556fff984bbc79597669af2465905666ed09Jason Glasgow // DBUS ModemManager1.Sim interface 2753022be5da0e7e158c7f8fc4e3f5d005eb5dde7e7Nathan Williams void OnSimPathChanged(const std::string &sim_path); 276af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnModemCapabilitesChanged(uint32 capabilities); 277af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnModemCurrentCapabilitiesChanged(uint32 current_capabilities); 278af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnMdnChanged(const std::string &mdn); 279af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnModemManufacturerChanged(const std::string &manufacturer); 280af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnModemModelChanged(const std::string &model); 281af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnModemRevisionChanged(const std::string &revision); 282af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnModemStateChanged(Cellular::ModemState state); 283af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnAccessTechnologiesChanged(uint32 access_technologies); 284af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnSupportedModesChanged(uint32 supported_modes); 285af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnAllowedModesChanged(uint32 allowed_modes); 286af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnPreferredModeChanged(MMModemMode preferred_mode); 287af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnLockRetriesChanged(MMModemLock unlock_required, 288af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow const LockRetryData &lock_retries); 289af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnSimLockStatusChanged(); 290af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow 291c7b1560b03c070fad239767f868322e6b3bdd932Arman Uguray // Returns false if the MDN is empty or if the MDN consists of all 0s. 292c7b1560b03c070fad239767f868322e6b3bdd932Arman Uguray bool IsMdnValid() const; 293c7b1560b03c070fad239767f868322e6b3bdd932Arman Uguray 294af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow // 3GPP property change handlers 295af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow virtual void OnModem3GPPPropertiesChanged( 296af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow const DBusPropertiesMap &properties, 297af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow const std::vector<std::string> &invalidated_properties); 298af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnImeiChanged(const std::string &imei); 299af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void On3GPPRegistrationChanged(MMModem3gppRegistrationState state, 300af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow const std::string &operator_code, 301af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow const std::string &operator_name); 302af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnFacilityLocksChanged(uint32 locks); 303af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow 304af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow // SIM property change handlers 305af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnSimPropertiesChanged( 306af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow const DBusPropertiesMap &props, 307af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow const std::vector<std::string> &invalidated_properties); 308af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnImsiChanged(const std::string &imsi); 309d73783fb016a4c9d7d8644db83c8caeb447b0063Arman Uguray void OnSpnChanged(const std::string &spn); 310af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnSimIdentifierChanged(const std::string &id); 311af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnOperatorIdChanged(const std::string &operator_id); 312af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow void OnOperatorNameChanged(const std::string &operator_name); 313ef96556fff984bbc79597669af2465905666ed09Jason Glasgow 31482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow // Method callbacks 3153022be5da0e7e158c7f8fc4e3f5d005eb5dde7e7Nathan Williams void OnRegisterReply(const ResultCallback &callback, 3163022be5da0e7e158c7f8fc4e3f5d005eb5dde7e7Nathan Williams const Error &error); 3175d0d32c1b5e2370ff0739f7a2dbb641726d4bf87Ben Chan void OnResetReply(const ResultCallback &callback, const Error &error); 3183022be5da0e7e158c7f8fc4e3f5d005eb5dde7e7Nathan Williams void OnScanReply(const ResultCallback &callback, 3193022be5da0e7e158c7f8fc4e3f5d005eb5dde7e7Nathan Williams const ScanResults &results, 3203022be5da0e7e158c7f8fc4e3f5d005eb5dde7e7Nathan Williams const Error &error); 321b54974f033f713690135f3f3516ca14aa7ee6cfdNathan Williams void OnConnectReply(const ResultCallback &callback, 322b54974f033f713690135f3f3516ca14aa7ee6cfdNathan Williams const DBus::Path &bearer, 323b54974f033f713690135f3f3516ca14aa7ee6cfdNathan Williams const Error &error); 3246e5639f9ef54db278c5f2265d5364e5994966f4aArman Uguray void OnListBearersReply(const std::vector<DBus::Path> &paths, 3256e5639f9ef54db278c5f2265d5364e5994966f4aArman Uguray const Error &error); 32682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 3271361c0366043f3d2628dc7c339339116ce31085eArman Uguray // Timeout callback for the network scan initiated when Cellular connectivity 3281361c0366043f3d2628dc7c339339116ce31085eArman Uguray // gets enabled. 3291361c0366043f3d2628dc7c339339116ce31085eArman Uguray void OnScanningOrSearchingTimeout(); 3301361c0366043f3d2628dc7c339339116ce31085eArman Uguray 3316552f8c74196782e9adf09f4fea01c836f551255Arman Uguray // Returns true, if |sim_path| constitutes a valid SIM path. Currently, a 3326552f8c74196782e9adf09f4fea01c836f551255Arman Uguray // path is accepted to be valid, as long as it is not equal to one of "" 3336552f8c74196782e9adf09f4fea01c836f551255Arman Uguray // and "/". 3346552f8c74196782e9adf09f4fea01c836f551255Arman Uguray bool IsValidSimPath(const std::string &sim_path) const; 3356552f8c74196782e9adf09f4fea01c836f551255Arman Uguray 336d759252158ec07b4a9edbcfdfb265f010b3e7e13Ben Chan // Returns the normalized version of |mdn| by keeping only digits in |mdn| 337d759252158ec07b4a9edbcfdfb265f010b3e7e13Ben Chan // and removing other non-digit characters. 338d759252158ec07b4a9edbcfdfb265f010b3e7e13Ben Chan std::string NormalizeMdn(const std::string &mdn) const; 339d759252158ec07b4a9edbcfdfb265f010b3e7e13Ben Chan 3402717a10096e12e46413adf47b39c5b19cd33bce7Arman Uguray static std::string GenerateNewGenericServiceName(); 3412717a10096e12e46413adf47b39c5b19cd33bce7Arman Uguray 342c7b1560b03c070fad239767f868322e6b3bdd932Arman Uguray // Post-payment activation handlers. 343c7b1560b03c070fad239767f868322e6b3bdd932Arman Uguray void UpdateIccidActivationState(); 344c7b1560b03c070fad239767f868322e6b3bdd932Arman Uguray void ResetAfterActivation(); 345efea6e0f28c3270038914e80166702d5ac23095eArman Uguray void UpdateServiceActivationState(); 346c7b1560b03c070fad239767f868322e6b3bdd932Arman Uguray void OnResetAfterActivationReply(const Error &error); 347c7b1560b03c070fad239767f868322e6b3bdd932Arman Uguray 34882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow scoped_ptr<mm1::ModemModem3gppProxyInterface> modem_3gpp_proxy_; 34982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow scoped_ptr<mm1::ModemModemCdmaProxyInterface> modem_cdma_proxy_; 35082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow scoped_ptr<mm1::ModemProxyInterface> modem_proxy_; 35182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow scoped_ptr<mm1::ModemSimpleProxyInterface> modem_simple_proxy_; 35282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow scoped_ptr<mm1::SimProxyInterface> sim_proxy_; 35382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 35482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow base::WeakPtrFactory<CellularCapabilityUniversal> weak_ptr_factory_; 35582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 35682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow MMModem3gppRegistrationState registration_state_; 35782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow MMModemCdmaRegistrationState cdma_registration_state_; 358af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow 359af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow // Bits based on MMModemCapabilities 360145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow uint32 capabilities_; // technologies supported, may require reload 361145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow uint32 current_capabilities_; // technologies supportsed without a reload 362145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow uint32 access_technologies_; // Bits based on MMModemAccessTechnology 363145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow uint32 supported_modes_; // Bits based on MMModemMode 364145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow uint32 allowed_modes_; // Bits based on MMModemMode 365145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow MMModemMode preferred_mode_; // A single MMModemMode bit 366af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow 36782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow Cellular::Operator serving_operator_; 36882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow std::string spn_; 369af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow std::string sim_identifier_; 370af5832853cf49fcfa34632a736aa4763ef2347d6Jason Glasgow std::string operator_id_; 37182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow mobile_provider *home_provider_; 372f508c8273e6265599f184189a424e697598eb980Darin Petkov bool provider_requires_roaming_; 37382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow std::string desired_network_; 37482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 37582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow // Properties. 37682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow std::string carrier_; 37782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow std::string esn_; 37882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow std::string firmware_revision_; 37982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow std::string hardware_revision_; 38082f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow std::string imei_; 38182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow std::string imsi_; 38282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow std::string manufacturer_; 38382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow std::string mdn_; 38482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow std::string meid_; 38582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow std::string min_; 38682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow std::string model_id_; 38782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow std::string selected_network_; 38882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow Stringmaps found_networks_; 38982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow std::deque<Stringmap> apn_try_list_; 3905d0d32c1b5e2370ff0739f7a2dbb641726d4bf87Ben Chan bool resetting_; 39182f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow bool scanning_supported_; 39282f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow bool scanning_; 3938a2c01e2d7fb27724f529adc3a0aa2daba9b1b44Ben Chan bool scanning_or_searching_; 39482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow uint16 scan_interval_; 39582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow SimLockStatus sim_lock_status_; 39682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow Stringmaps apn_list_; 397ef96556fff984bbc79597669af2465905666ed09Jason Glasgow std::string sim_path_; 398bd3aee80be371d838863eccf708fd107153503efBen Chan bool sim_present_; 399b54974f033f713690135f3f3516ca14aa7ee6cfdNathan Williams DBus::Path bearer_path_; 400c7b1560b03c070fad239767f868322e6b3bdd932Arman Uguray bool reset_done_; 401c7b1560b03c070fad239767f868322e6b3bdd932Arman Uguray 402e285a84b38b81f5557b576da187d037ad24ae4afGary Morain // If the modem is not in a state to be enabled when StartModem is called, 403e285a84b38b81f5557b576da187d037ad24ae4afGary Morain // enabling is deferred using this callback. 404e285a84b38b81f5557b576da187d037ad24ae4afGary Morain base::Closure deferred_enable_modem_callback_; 405e285a84b38b81f5557b576da187d037ad24ae4afGary Morain 4061361c0366043f3d2628dc7c339339116ce31085eArman Uguray // Sometimes modems may be stuck in the SEARCHING state during the lack of 4071361c0366043f3d2628dc7c339339116ce31085eArman Uguray // presence of a network. During this indefinite duration of time, keeping 4081361c0366043f3d2628dc7c339339116ce31085eArman Uguray // the Device.Scanning property as |true| causes a bad user experience. 4091361c0366043f3d2628dc7c339339116ce31085eArman Uguray // This callback sets it to |false| after a timeout period has passed. 4101361c0366043f3d2628dc7c339339116ce31085eArman Uguray base::CancelableClosure scanning_or_searching_timeout_callback_; 4111361c0366043f3d2628dc7c339339116ce31085eArman Uguray unsigned int scanning_or_searching_timeout_milliseconds_; 4121361c0366043f3d2628dc7c339339116ce31085eArman Uguray 41382f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow static unsigned int friendly_service_name_id_; 41482f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 41582f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow DISALLOW_COPY_AND_ASSIGN(CellularCapabilityUniversal); 41682f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow}; 41782f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 41882f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow} // namespace shill 41982f9ab3f404c8f414348c6effdc57c4d3b9223d7Jason Glasgow 420145218710c2daa27ab55690f2ca372200d2a4cdfJason Glasgow#endif // SHILL_CELLULAR_CAPABILITY_UNIVERSAL_H_ 421