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 | #include "shill/cellular_capability_cdma.h" |
| 6 | |
| 7 | #include <base/logging.h> |
| 8 | |
| 9 | #include "shill/cellular.h" |
| 10 | #include "shill/proxy_factory.h" |
| 11 | |
| 12 | namespace shill { |
| 13 | |
| 14 | CellularCapabilityCDMA::CellularCapabilityCDMA(Cellular *cellular) |
| 15 | : CellularCapability(cellular) {} |
| 16 | |
| 17 | void CellularCapabilityCDMA::InitProxies() { |
| 18 | VLOG(2) << __func__; |
| 19 | // TODO(petkov): Move CDMA-specific proxy ownership from Cellular to this. |
| 20 | cellular()->set_modem_cdma_proxy( |
| 21 | proxy_factory()->CreateModemCDMAProxy(cellular(), |
| 22 | cellular()->dbus_path(), |
| 23 | cellular()->dbus_owner())); |
| 24 | } |
| 25 | |
Darin Petkov | cb54773 | 2011-11-09 13:55:26 +0100 | [diff] [blame^] | 26 | void CellularCapabilityCDMA::GetIdentifiers() { |
| 27 | VLOG(2) << __func__; |
| 28 | if (cellular()->meid().empty()) { |
| 29 | // TODO(petkov): Switch to asynchronous calls (crosbug.com/17583). |
| 30 | cellular()->set_meid(cellular()->modem_cdma_proxy()->MEID()); |
| 31 | VLOG(2) << "MEID: " << cellular()->imei(); |
| 32 | } |
| 33 | } |
| 34 | |
Darin Petkov | daf4386 | 2011-10-27 11:37:28 +0200 | [diff] [blame] | 35 | } // namespace shill |