summaryrefslogtreecommitdiffstats
path: root/dbus/values_util.h
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-16 23:08:42 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-16 23:08:42 +0000
commita5aae12d00dd5efc48921d180e94208841a49f35 (patch)
treeb3b6e326e7b3cdcb73b378940ef0364ff496d6df /dbus/values_util.h
parent275c245cea2d44f7d90b2b4d17ed2c79bc6eb661 (diff)
downloadchromium_src-a5aae12d00dd5efc48921d180e94208841a49f35.zip
chromium_src-a5aae12d00dd5efc48921d180e94208841a49f35.tar.gz
chromium_src-a5aae12d00dd5efc48921d180e94208841a49f35.tar.bz2
Add dbus::PopDataAsValue
BUG=chromium-os:16557 TEST=dbus_unittests --gtest_filter="ValuesUtilTest.*" Review URL: http://codereview.chromium.org/9702094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127287 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus/values_util.h')
-rw-r--r--dbus/values_util.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/dbus/values_util.h b/dbus/values_util.h
new file mode 100644
index 0000000..cfb31a5
--- /dev/null
+++ b/dbus/values_util.h
@@ -0,0 +1,25 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DBUS_VALUES_UTIL_H_
+#define DBUS_VALUES_UTIL_H_
+#pragma once
+
+namespace base {
+class Value;
+}
+
+namespace dbus {
+
+class MessageReader;
+
+// Pops a value from |reader| as a base::Value.
+// Returns NULL if an error occurs.
+// Note: Integer values larger than int32 (including uint32) are converted to
+// double. Non-string diciontary keys are converted to strings.
+base::Value* PopDataAsValue(MessageReader* reader);
+
+} // namespace dbus
+
+#endif // DBUS_VALUES_UTIL_H_