i have solved the problem about how to receive an ARRAY via dbus_message_get_args interface

Wang, Songyue songyue.wang at intel.com
Thu May 26 17:50:14 PDT 2011


Hi Mike:
Sincerely thanks very much.
Your method is ok.
i have solved the problem about how to receive an ARRAY via dbus_message_get_args interface

BRs,
Songyue Wang 王松月
Tel: 86-10-5751-1739
iNet: 8751-1739
Mobile: 15710026726
mailto:songyue.wang at intel.com
DRD Atom/Meego Platform Enabling Team


-----Original Message-----
From: Mike Gorse [mailto:mgorse at novell.com] 
Sent: Thursday, May 26, 2011 9:49 PM
To: Wang, Songyue
Cc: dbus at lists.freedesktop.org
Subject: RE: how can I receive an ARRAY via dbus_message_get_args interface?

Hi Songyue,

On Thu, 26 May 2011, Wang, Songyue wrote:

> Mike:
> Sincerely thanks very much!
> But I am still puzzled.
> when I changed to
> dbus_message_get_args (message, &dberr,DBUS_TYPE_ARRAY,3,&v_ARRAY, DBUS_TYPE_INVALID);
> still not ok!

You need to do something like:

dbus_int32_t *v_array;
dbus_int32_t count;

dbus_message_get_args (message, &dberr, DBUS_TYPE_ARRAY, DBUS_TYPE_INT32, 
&v_array, &count, DBUS_TYPE_INVALID);

I think this should work, although I haven't tested.  v_array now points 
into the message, and the value of count should be set to 3.

-Mike


More information about the dbus mailing list