Gilad Arnold | 55f39b7 | 2014-01-28 12:51:45 -0800 | [diff] [blame] | 1 | // 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 | #include "update_engine/policy_manager/generic_variables.h" |
| 6 | #include "update_engine/policy_manager/real_shill_provider.h" |
| 7 | |
| 8 | namespace chromeos_policy_manager { |
| 9 | |
| 10 | // ShillProvider implementation. |
| 11 | |
| 12 | bool RealShillProvider::DoInit(void) { |
| 13 | // TODO(garnold) Initialize with actual (or fake) DBus connection. |
| 14 | |
| 15 | var_is_connected_.reset( |
Alex Deymo | 0e43369 | 2014-02-20 07:23:03 -0800 | [diff] [blame^] | 16 | new CopyVariable<bool>("is_connected", kVariableModeAsync, |
| 17 | is_connected_)); |
Gilad Arnold | 55f39b7 | 2014-01-28 12:51:45 -0800 | [diff] [blame] | 18 | var_conn_type_.reset( |
Alex Deymo | 0e43369 | 2014-02-20 07:23:03 -0800 | [diff] [blame^] | 19 | new CopyVariable<ShillConnType>("conn_type", kVariableModeAsync, |
| 20 | conn_type_)); |
Gilad Arnold | 55f39b7 | 2014-01-28 12:51:45 -0800 | [diff] [blame] | 21 | var_conn_last_changed_.reset( |
Alex Deymo | 0e43369 | 2014-02-20 07:23:03 -0800 | [diff] [blame^] | 22 | new CopyVariable<Time>("conn_last_changed", kVariableModeAsync, |
| 23 | conn_last_changed_)); |
Gilad Arnold | 55f39b7 | 2014-01-28 12:51:45 -0800 | [diff] [blame] | 24 | return true; |
| 25 | } |
| 26 | |
| 27 | } // namespace chromeos_policy_manager |