From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: Date: Wed, 17 Oct 2007 09:18:27 +0530 From: "Yogesh Jagtap" To: Bluez-users@lists.sourceforge.net In-Reply-To: MIME-Version: 1.0 References: Subject: Re: [Bluez-users] Regarding GetInfo Reply-To: BlueZ users List-Id: BlueZ users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2127508697==" Sender: bluez-users-bounces@lists.sourceforge.net Errors-To: bluez-users-bounces@lists.sourceforge.net --===============2127508697== Content-Type: multipart/alternative; boundary="----=_Part_16397_31673123.1192592907516" ------=_Part_16397_31673123.1192592907516 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello Everyone, I want to get device class. But DBus API's are available for getting device Major class, Minor class and service class. But no API to get device class. To get Device class I have two options, 1. Get device class from GetInfo. 2. Get Major class, Minor class and service class and from that construct device class. So I choose first way, But I am not able to get device class. To get information about adapter, I have written code like this. msg = dbus_message_new_method_call("org.bluez", "/org/bluez/hci0", INTERFACE,"GetInfo"); reply = dbus_connection_send_with_reply_and_block (conn,msg, -1,&error); dbus_message_iter_init (reply, &iter); printf("\nSignature::%s",dbus_message_get_signature(reply)); cout<<"\nIter signature::"< wrote: > > Hello everyone, > > How can I retrive values returned by GetInfo api? > > Regards > Yogesh > ------=_Part_16397_31673123.1192592907516 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello Everyone,
I want to get device class. But DBus API's are available for getting device Major class, Minor class and service class. But no API to get device class. To get Device class I have two options,
1. Get device class from GetInfo.
2. Get Major class, Minor class and service class and from that construct device class.
So I choose first way, But I am not able to get device class.

To get information about adapter, I have written code like this.

msg = dbus_message_new_method_call("org.bluez", "/org/bluez/hci0", INTERFACE,"GetInfo");
        reply = dbus_connection_send_with_reply_and_block (conn,msg, -1,&error);
        dbus_message_iter_init (reply, &iter);
        printf("\nSignature::%s",dbus_message_get_signature(reply));
        cout<<"\nIter signature::"<<dbus_message_iter_get_signature(&iter);
        dbus_message_iter_recurse (&iter, &dict_iter);
        cout<<"\ndict_Iter signature::"<<dbus_message_iter_get_signature(&dict_iter);
        dbus_message_iter_recurse (&dict_iter, &data_iter);
        cout<<"\ndata_Iter signature::"<<dbus_message_iter_get_signature(&data_iter);
        while (dbus_message_iter_has_next(&data_iter))
        {
            cout<<"\ndata type::"<<(dbus_message_iter_get_arg_type(&data_iter));
            dbus_message_iter_next(&data_iter);
        }

But its not working. When I print signatures, it is printing like this
Signature::a{sv}
Iter signature::a{sv}
dict_Iter signature::{sv}
data_Iter signature::s
data type::115

And I found that,
 a{sv} is a dictionary with 's'tring keys and 'v'ariants as values

So does that mean GetInfo is returning only one key value pair?
Or I am missing something?

Regards
Yogesh

On 10/16/07, Yogesh Jagtap <jagtapyb@gmail.com> wrote:
Hello everyone,

How can I retrive values returned by GetInfo api?

Regards
Yogesh

------=_Part_16397_31673123.1192592907516-- --===============2127508697== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ --===============2127508697== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users --===============2127508697==--