blob: a0e7693e6e570118ad7f3cb0612aba5448558286 [file] [log] [blame]
Darin Petkov394b7d42011-11-03 15:48:02 +01001// 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/power_manager_proxy.h"
6
7#include <base/logging.h>
8#include <chromeos/dbus/service_constants.h>
9
10namespace shill {
11
12PowerManagerProxy::PowerManagerProxy(PowerManagerProxyDelegate *delegate,
13 DBus::Connection *connection)
14 : proxy_(delegate, connection) {}
15
16PowerManagerProxy::~PowerManagerProxy() {}
17
18void PowerManagerProxy::RegisterSuspendDelay(uint32 delay_ms) {
19 proxy_.RegisterSuspendDelay(delay_ms);
20}
21
22PowerManagerProxy::Proxy::Proxy(PowerManagerProxyDelegate *delegate,
23 DBus::Connection *connection)
24 : DBus::ObjectProxy(*connection,
25 power_manager::kPowerManagerServicePath,
26 power_manager::kPowerManagerServiceName),
27 delegate_(delegate) {}
28
29PowerManagerProxy::Proxy::~Proxy() {}
30
31void PowerManagerProxy::Proxy::SuspendDelay(const uint32_t &sequence_number) {
32 VLOG(2) << __func__ << "(" << sequence_number << ")";
33 delegate_->OnSuspendDelay(sequence_number);
34}
35
36} // namespace shill