Darin Petkov | 975b5e7 | 2011-08-30 11:48:08 -0700 | [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 | #include "shill/modem_gsm_card_proxy.h" |
| 6 | |
| 7 | using std::string; |
| 8 | |
| 9 | namespace shill { |
| 10 | |
| 11 | ModemGSMCardProxy::ModemGSMCardProxy(ModemGSMCardProxyListener *listener, |
| 12 | DBus::Connection *connection, |
| 13 | const string &path, |
| 14 | const string &service) |
| 15 | : proxy_(listener, connection, path, service) {} |
| 16 | |
| 17 | ModemGSMCardProxy::~ModemGSMCardProxy() {} |
| 18 | |
| 19 | string ModemGSMCardProxy::GetIMEI() { |
| 20 | return proxy_.GetImei(); |
| 21 | } |
| 22 | |
| 23 | string ModemGSMCardProxy::GetIMSI() { |
| 24 | return proxy_.GetImsi(); |
| 25 | } |
| 26 | |
| 27 | string ModemGSMCardProxy::GetSPN() { |
| 28 | return proxy_.GetSpn(); |
| 29 | } |
| 30 | |
| 31 | string ModemGSMCardProxy::GetMSISDN() { |
| 32 | return proxy_.GetMsIsdn(); |
| 33 | } |
| 34 | |
Darin Petkov | e42e101 | 2011-08-31 12:35:04 -0700 | [diff] [blame] | 35 | void ModemGSMCardProxy::EnablePIN(const string &pin, bool enabled) { |
| 36 | proxy_.EnablePin(pin, enabled); |
| 37 | } |
| 38 | |
| 39 | void ModemGSMCardProxy::SendPIN(const string &pin) { |
| 40 | proxy_.SendPin(pin); |
| 41 | } |
| 42 | |
| 43 | void ModemGSMCardProxy::SendPUK(const string &puk, const string &pin) { |
| 44 | proxy_.SendPuk(puk, pin); |
| 45 | } |
| 46 | |
| 47 | void ModemGSMCardProxy::ChangePIN(const string &old_pin, |
| 48 | const string &new_pin) { |
| 49 | proxy_.ChangePin(old_pin, new_pin); |
| 50 | } |
| 51 | |
Darin Petkov | 975b5e7 | 2011-08-30 11:48:08 -0700 | [diff] [blame] | 52 | ModemGSMCardProxy::Proxy::Proxy(ModemGSMCardProxyListener *listener, |
| 53 | DBus::Connection *connection, |
| 54 | const string &path, |
| 55 | const string &service) |
| 56 | : DBus::ObjectProxy(*connection, path, service.c_str()), |
| 57 | listener_(listener) {} |
| 58 | |
| 59 | ModemGSMCardProxy::Proxy::~Proxy() {} |
| 60 | |
| 61 | } // namespace shill |