Support passing dict by reference for dbus messages
Currently DBus dict values must be passed inline
virDBusMessageEncode("a{ss}",
3,
"key1", "val1",
"key2", "val2",
"key3", "val3");
virDBusMessageDecode("a{ss}",
3,
&key1, &val1,
&key2, &val2,
&key3, &val3);
This allows them to be passed by reference
const char **dictin = {
"key1", "val1",
"key2", "val2",
"key3", "val3"
};
char **dictout;
size_t ndictout;
virDBusMessageEncode("a&{ss}",
ARRAY_CARDINALITY(dict) / 2,
dictin);
virDBusMessageDecode("a&{ss}",
&ndictout,
&dictout);
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
Showing
此差异已折叠。
想要评论请 注册 或 登录