blob: ee97e5f898012e1b99af1b3b4c5cfb4245bf5a5b [file] [log] [blame]
Darin Petkovdaf43862011-10-27 11:37:28 +02001// 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
12namespace shill {
13
14CellularCapabilityCDMA::CellularCapabilityCDMA(Cellular *cellular)
15 : CellularCapability(cellular) {}
16
17void 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 Petkovcb547732011-11-09 13:55:26 +010026void 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 Petkovdaf43862011-10-27 11:37:28 +020035} // namespace shill