Darin Petkov | e0a312e | 2011-07-20 13:45:28 -0700 | [diff] [blame] | 1 | // 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 | #ifndef SHILL_DBUS_PROPERTIES_ |
| 6 | #define SHILL_DBUS_PROPERTIES_ |
| 7 | |
| 8 | #include <map> |
| 9 | #include <string> |
| 10 | |
| 11 | #include <base/basictypes.h> |
| 12 | #include <dbus-c++/types.h> |
| 13 | |
| 14 | namespace shill { |
| 15 | |
| 16 | typedef std::map<std::string, DBus::Variant> DBusPropertiesMap; |
| 17 | |
| 18 | class DBusProperties { |
| 19 | public: |
| 20 | static bool GetString(const DBusPropertiesMap &properties, |
| 21 | const std::string &key, |
| 22 | std::string *value); |
| 23 | |
| 24 | static bool GetUint32(const DBusPropertiesMap &properties, |
| 25 | const std::string &key, |
| 26 | uint32 *value); |
| 27 | |
Darin Petkov | ceb6817 | 2011-07-29 14:47:48 -0700 | [diff] [blame] | 28 | static bool GetUint16(const DBusPropertiesMap &properties, |
| 29 | const std::string &key, |
| 30 | uint16 *value); |
| 31 | |
Darin Petkov | e0a312e | 2011-07-20 13:45:28 -0700 | [diff] [blame] | 32 | private: |
| 33 | DISALLOW_COPY_AND_ASSIGN(DBusProperties); |
| 34 | }; |
| 35 | |
| 36 | } // namespace shill |
| 37 | |
| 38 | #endif // SHILL_DBUS_PROPERTIES_ |