Linux: add two new DBus client library utility functions, to be used by KWallet.
The new functions are AppendArrayOfStrings and PopArrayOfStrings, which have
self-explanatory names. Currently the KWallet code does this looping itself.
Review URL: http://codereview.chromium.org/7941009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101781 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/dbus/message.h b/dbus/message.h
index 72200fc..ceeb0ed 100644
--- a/dbus/message.h
+++ b/dbus/message.h
@@ -284,8 +284,13 @@
// function.
void AppendArrayOfBytes(const uint8* values, size_t length);
+ // Appends the array of strings. Arrays of strings are often used for
+ // exchanging lists of names hence it's worth having a specialized
+ // function.
+ void AppendArrayOfStrings(const std::vector<std::string>& strings);
+
// Appends the array of object paths. Arrays of object paths are often
- // used to exchanging object paths, hence it's worth having a
+ // used when exchanging object paths, hence it's worth having a
// specialized function.
void AppendArrayOfObjectPaths(const std::vector<std::string>& object_paths);
@@ -371,6 +376,14 @@
// MessageReader is destroyed.
bool PopArrayOfBytes(uint8** bytes, size_t* length);
+ // Gets the array of strings at the current iterator position.
+ // Returns true and advances the iterator on success.
+ //
+ // Arrays of strings are often used to communicate with D-Bus
+ // services like KWallet, hence it's worth having a specialized
+ // function.
+ bool PopArrayOfStrings(std::vector<std::string>* strings);
+
// Gets the array of object paths at the current iterator position.
// Returns true and advances the iterator on success.
//