blob: 0a290ef550a3256dc139ca6a2848b8e8f851690a [file] [log] [blame]
Darin Petkove0a312e2011-07-20 13:45:28 -07001// 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
14namespace shill {
15
16typedef std::map<std::string, DBus::Variant> DBusPropertiesMap;
17
18class 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 Petkovceb68172011-07-29 14:47:48 -070028 static bool GetUint16(const DBusPropertiesMap &properties,
29 const std::string &key,
30 uint16 *value);
31
Darin Petkove0a312e2011-07-20 13:45:28 -070032 private:
33 DISALLOW_COPY_AND_ASSIGN(DBusProperties);
34};
35
36} // namespace shill
37
38#endif // SHILL_DBUS_PROPERTIES_