D-BUS 0.23 to 0.30 porting quickref
John (J5) Palmieri
johnp at redhat.com
Mon Jan 31 14:39:42 PST 2005
On Mon, 2005-01-31 at 17:07 -0500, Havoc Pennington wrote:
> arg_type = dbus_message_iter_open_container (&main_iter,
> DBUS_TYPE_ARRAY,
> DBUS_TYPE_STRING_TO_STRING,
> &array_iter);
>
> It returns bool for out-of-memory rather than arg_type I think,
Ya, don't know why I put arg_type there.
> and the signature would be: DBUS_TYPE_ARRAY_AS_STRING DBUS_TYPE_STRING_AS_STRING
> Which after preprocessing is: "a" "s" and gets concatenated to "as"
According to the docs the second parameter is an int which is the type
of the container we are opening so my code is correct. The third
parameter needs to be a string because certain container types have more
than one type code. Fixed the TO to AS.
> This is why you have to use AS_STRING so they get concatenated.
>
> Havoc
Thanks for the corrections. All fixed.
--
John (J5) Palmieri
Associate Software Engineer
Desktop Group
Red Hat, Inc.
Blog: http://martianrock.com
More information about the dbus
mailing list