diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-22 18:28:42 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-22 18:28:42 +0000 |
commit | 090d8e51bb768c3c4ecd30a81b3285fc6ddff9e2 (patch) | |
tree | f393d869c901f3e5958dcd3077d715f096b8bbb9 /dbus/message.cc | |
parent | 9b8aa5b5adf8aa3f005876fdbcc5120099073604 (diff) | |
download | chromium_src-090d8e51bb768c3c4ecd30a81b3285fc6ddff9e2.zip chromium_src-090d8e51bb768c3c4ecd30a81b3285fc6ddff9e2.tar.gz chromium_src-090d8e51bb768c3c4ecd30a81b3285fc6ddff9e2.tar.bz2 |
Add AppendArrayOfObjectPaths, which was missing.
It was an oversight not to have this function.
BUG=90036
TEST=dbus_unittests
Review URL: http://codereview.chromium.org/7686013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97689 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus/message.cc')
-rw-r--r-- | dbus/message.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dbus/message.cc b/dbus/message.cc index 79c1b77..9216515 100644 --- a/dbus/message.cc +++ b/dbus/message.cc @@ -512,6 +512,17 @@ void MessageWriter::AppendArrayOfBytes(const uint8* values, size_t length) { CloseContainer(&array_writer); } +void MessageWriter::AppendArrayOfObjectPaths( + const std::vector<std::string>& object_paths) { + DCHECK(!container_is_open_); + MessageWriter array_writer(message_); + OpenArray("o", &array_writer); + for (size_t i = 0; i < object_paths.size(); ++i) { + array_writer.AppendObjectPath(object_paths[i]); + } + CloseContainer(&array_writer); +} + void MessageWriter::AppendVariantOfByte(uint8 value) { AppendVariantOfBasic(DBUS_TYPE_BYTE, &value); } |