blob: 1a120b721a55cec3250741c93db05f85be824f1c [file] [log] [blame]
Gilad Arnold55f39b72014-01-28 12:51:45 -08001// Copyright (c) 2014 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 CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_SHILL_PROVIDER_H
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_SHILL_PROVIDER_H
7
8#include "update_engine/policy_manager/shill_provider.h"
9
10using base::Time;
11
12namespace chromeos_policy_manager {
13
14// ShillProvider concrete implementation.
15//
16// TODO(garnold) Much of the functionality in this module was adapted from
17// connection_manager, with slight changes (annotated inline). We need to make
18// sure to deprecate use of connection manager when the time comes.
19class RealShillProvider : public ShillProvider {
20 public:
21 // TODO(garnold) This should take a DBus object for communicating with shill.
22 RealShillProvider()
23 : is_connected_(false), conn_type_(kShillConnTypeUnknown),
24 conn_last_changed_(Time::Now()) {}
25
26 protected:
27 virtual bool DoInit();
28
29 private:
30 // Whether we have network connectivity.
31 bool is_connected_;
32
33 // The current network connection type as reported by shill.
34 ShillConnType conn_type_;
35
36 // The time when the connection type last changed.
37 Time conn_last_changed_;
38
39 DISALLOW_COPY_AND_ASSIGN(RealShillProvider);
40};
41
42} // namespace chromeos_policy_manager
43
44#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_SHILL_PROVIDER_H