Cannot get GetDevices ( ) method to work.

Iraq Ja deadpixel01 at gmail.com
Thu Oct 6 05:02:44 PDT 2011


Thanks for the help guys,
sorry if my code is a bit tedious, I'm new to glib and dbus.

Mikkel - I looked into the dbus-monitor tool you mentioned, am I right in
assuming that you used dbus-monitor with arguments like this:

 dbus-monitor
"type='method_return',
sender='org.freedesktop.NetworkManager',
interface='org.freedesktop.NetworkManager',
path='/org/freedesktop/NetworkManager',
member='GetDevices'"

to monitor the result for the call "GetDevices" from the code? I can't seem
to get it to work for me.

Also, with regards to what you said about the error message

** ERROR **: Error calling GetDevices: Unregistered object at path
'/org/freedesktop/NetworkManager/Devices/0'

and your comment on it, I'm not familiar with the concept "registering an
object", do you know of any documentation that talks about it?


On Thu, Oct 6, 2011 at 8:28 AM, Mikkel Kamstrup Erlandsen <
mikkel.kamstrup at canonical.com> wrote:

> On 10/06/2011 09:25 AM, Mikkel Kamstrup Erlandsen wrote:
>
>> <snip>
>>
>> I applied these fixes to your code and attached it, ...
>>
>
> Ahem. Even though Thunderbird gently reminded me that I wanted to add an
> attachment I forgot it anyway :-) Second time's a charm.
>
>
> Cheers,
> Mikkel
>
>
>>  On Wed, Oct 5, 2011 at 7:10 PM, Thiago Macieira<thiago at kde.org>  wrote:
>>>
>>>> On Wednesday, 5 de October de 2011 18:45:52 Iraq Ja wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> In my program attached, the method call (line 50):
>>>>>
>>>>>
>>>>>     if (dbus_g_proxy_call(proxy, "GetDevices",&error, G_TYPE_INVALID,
>>>>> DBUS_TYPE_G_OBJECT_ARRAY, name_list_ptr, G_TYPE_INVALID))
>>>>>     {
>>>>>               printf("Success\n");
>>>>>               g_printerr("List: %S \n", name_list_ptr);
>>>>>     }
>>>>>     else
>>>>>     {
>>>>>       printf("Fail\n");
>>>>>               g_printerr(" 1 %S\n", error->message);
>>>>>               g_printerr(" 1 %S\n", name_list_ptr);
>>>>>       exit(1);
>>>>>     }
>>>>>
>>>>> does not return true, I think I've done everything correct as far as
>>>>> the parameters to dbus_g_proxy_call(), and setting everything up, but
>>>>> for whatever reason it won't return true.
>>>>>
>>>> If it doesn't return true, it prints an error message. What was it?
>>>>
>>>> --
>>>> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>>>>   Software Architect - Intel Open Source Technology Center
>>>>      PGP/GPG: 0x6EF45358; fingerprint:
>>>>      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>>>>
>>>> ______________________________**_________________
>>>> dbus mailing list
>>>> dbus at lists.freedesktop.org
>>>> http://lists.freedesktop.org/**mailman/listinfo/dbus<http://lists.freedesktop.org/mailman/listinfo/dbus>
>>>>
>>>>
>>>>  ______________________________**_________________
>>> dbus mailing list
>>> dbus at lists.freedesktop.org
>>> http://lists.freedesktop.org/**mailman/listinfo/dbus<http://lists.freedesktop.org/mailman/listinfo/dbus>
>>>
>>
>> ______________________________**_________________
>> dbus mailing list
>> dbus at lists.freedesktop.org
>> http://lists.freedesktop.org/**mailman/listinfo/dbus<http://lists.freedesktop.org/mailman/listinfo/dbus>
>>
>
>
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20111006/ce812a0a/attachment.htm>


More information about the dbus mailing list