Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 1 | // 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_CAPABILITY_GSM_ |
| 6 | #define SHILL_CELLULAR_CAPABILITY_GSM_ |
| 7 | |
Darin Petkov | cb54773 | 2011-11-09 13:55:26 +0100 | [diff] [blame] | 8 | #include <base/memory/scoped_ptr.h> |
Darin Petkov | b05315f | 2011-11-07 10:14:25 +0100 | [diff] [blame] | 9 | #include <base/task.h> |
| 10 | |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 11 | #include "shill/cellular_capability.h" |
Darin Petkov | cb54773 | 2011-11-09 13:55:26 +0100 | [diff] [blame] | 12 | #include "shill/modem_gsm_card_proxy_interface.h" |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 13 | |
| 14 | namespace shill { |
| 15 | |
Darin Petkov | cb54773 | 2011-11-09 13:55:26 +0100 | [diff] [blame] | 16 | class CellularCapabilityGSM : public CellularCapability, |
| 17 | public ModemGSMCardProxyDelegate { |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 18 | public: |
| 19 | CellularCapabilityGSM(Cellular *cellular); |
| 20 | |
Darin Petkov | b05315f | 2011-11-07 10:14:25 +0100 | [diff] [blame] | 21 | // Inherited from CellularCapability. |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 22 | virtual void InitProxies(); |
Darin Petkov | b05315f | 2011-11-07 10:14:25 +0100 | [diff] [blame] | 23 | virtual void RequirePIN(const std::string &pin, bool require, Error *error); |
| 24 | virtual void EnterPIN(const std::string &pin, Error *error); |
| 25 | virtual void UnblockPIN(const std::string &unblock_code, |
| 26 | const std::string &pin, |
| 27 | Error *error); |
| 28 | virtual void ChangePIN(const std::string &old_pin, |
| 29 | const std::string &new_pin, |
| 30 | Error *error); |
Darin Petkov | 20c13ec | 2011-11-09 15:07:15 +0100 | [diff] [blame^] | 31 | virtual std::string GetNetworkTechnologyString() const; |
| 32 | virtual std::string GetRoamingStateString() const; |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 33 | |
Darin Petkov | cb54773 | 2011-11-09 13:55:26 +0100 | [diff] [blame] | 34 | // Obtains the IMEI, IMSI, SPN and MSISDN. |
| 35 | virtual void GetIdentifiers(); |
| 36 | |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 37 | private: |
Darin Petkov | cb54773 | 2011-11-09 13:55:26 +0100 | [diff] [blame] | 38 | friend class CellularCapabilityGSMTest; |
| 39 | |
Darin Petkov | b05315f | 2011-11-07 10:14:25 +0100 | [diff] [blame] | 40 | void RequirePINTask(const std::string &pin, bool require); |
| 41 | void EnterPINTask(const std::string &pin); |
| 42 | void UnblockPINTask(const std::string &unblock_code, const std::string &pin); |
| 43 | void ChangePINTask(const std::string &old_pin, const std::string &new_pin); |
| 44 | |
Darin Petkov | cb54773 | 2011-11-09 13:55:26 +0100 | [diff] [blame] | 45 | scoped_ptr<ModemGSMCardProxyInterface> card_proxy_; |
| 46 | |
Darin Petkov | b05315f | 2011-11-07 10:14:25 +0100 | [diff] [blame] | 47 | ScopedRunnableMethodFactory<CellularCapabilityGSM> task_factory_; |
| 48 | |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 49 | DISALLOW_COPY_AND_ASSIGN(CellularCapabilityGSM); |
| 50 | }; |
| 51 | |
| 52 | } // namespace shill |
| 53 | |
| 54 | #endif // SHILL_CELLULAR_CAPABILITY_GSM_ |