| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chromeos_network.h" // NOLINT | 5 #include "chromeos_network.h" // NOLINT |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 #include <cstring> | 9 #include <cstring> |
| 10 | 10 |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 default_bool = false; | 346 default_bool = false; |
| 347 properties.Retrieve(kAutoConnectProperty, &default_bool); | 347 properties.Retrieve(kAutoConnectProperty, &default_bool); |
| 348 info->auto_connect = default_bool; | 348 info->auto_connect = default_bool; |
| 349 | 349 |
| 350 // Device | 350 // Device |
| 351 glib::Value val; | 351 glib::Value val; |
| 352 if (properties.Retrieve(kDeviceProperty, &val)) { | 352 if (properties.Retrieve(kDeviceProperty, &val)) { |
| 353 const gchar* path = static_cast<const gchar*>(g_value_get_boxed (&val)); | 353 const gchar* path = static_cast<const gchar*>(g_value_get_boxed (&val)); |
| 354 info->device_path = NewStringCopy(path); | 354 info->device_path = NewStringCopy(path); |
| 355 } else { | 355 } else { |
| 356 info->device_path = NewStringCopy(kUnknownString); | 356 info->device_path = NULL; |
| 357 } | 357 } |
| 358 } | 358 } |
| 359 | 359 |
| 360 // Returns a ServiceInfo object populated with data from a | 360 // Returns a ServiceInfo object populated with data from a |
| 361 // given DBus object path. | 361 // given DBus object path. |
| 362 // | 362 // |
| 363 // returns true on success. | 363 // returns true on success. |
| 364 bool ParseServiceInfo(const char* path, ServiceInfo *info) { | 364 bool ParseServiceInfo(const char* path, ServiceInfo *info) { |
| 365 dbus::Proxy service_proxy(dbus::GetSystemBusConnection(), | 365 dbus::Proxy service_proxy(dbus::GetSystemBusConnection(), |
| 366 kConnmanServiceName, | 366 kConnmanServiceName, |
| (...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 } | 1268 } |
| 1269 | 1269 |
| 1270 extern "C" | 1270 extern "C" |
| 1271 bool ChromeOSSetCertPath(const char* service_path, const char* cert_path) { | 1271 bool ChromeOSSetCertPath(const char* service_path, const char* cert_path) { |
| 1272 return SetServiceStringProperty(service_path, kCertPathProperty, cert_path); | 1272 return SetServiceStringProperty(service_path, kCertPathProperty, cert_path); |
| 1273 } | 1273 } |
| 1274 | 1274 |
| 1275 | 1275 |
| 1276 | 1276 |
| 1277 } // namespace chromeos | 1277 } // namespace chromeos |
| OLD | NEW |