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 | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 31 | |
Darin Petkov | cb54773 | 2011-11-09 13:55:26 +0100 | [diff] [blame^] | 32 | // Obtains the IMEI, IMSI, SPN and MSISDN. |
| 33 | virtual void GetIdentifiers(); |
| 34 | |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 35 | private: |
Darin Petkov | cb54773 | 2011-11-09 13:55:26 +0100 | [diff] [blame^] | 36 | friend class CellularCapabilityGSMTest; |
| 37 | |
Darin Petkov | b05315f | 2011-11-07 10:14:25 +0100 | [diff] [blame] | 38 | void RequirePINTask(const std::string &pin, bool require); |
| 39 | void EnterPINTask(const std::string &pin); |
| 40 | void UnblockPINTask(const std::string &unblock_code, const std::string &pin); |
| 41 | void ChangePINTask(const std::string &old_pin, const std::string &new_pin); |
| 42 | |
Darin Petkov | cb54773 | 2011-11-09 13:55:26 +0100 | [diff] [blame^] | 43 | scoped_ptr<ModemGSMCardProxyInterface> card_proxy_; |
| 44 | |
Darin Petkov | b05315f | 2011-11-07 10:14:25 +0100 | [diff] [blame] | 45 | ScopedRunnableMethodFactory<CellularCapabilityGSM> task_factory_; |
| 46 | |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 47 | DISALLOW_COPY_AND_ASSIGN(CellularCapabilityGSM); |
| 48 | }; |
| 49 | |
| 50 | } // namespace shill |
| 51 | |
| 52 | #endif // SHILL_CELLULAR_CAPABILITY_GSM_ |