Re: [PATCH BlueZ 1/5] gdbus: Add skeleton of DBus.Properties interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 19, 2012 at 5:03 AM, Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote:
> Hi Lucas,
>
>> This interface is responsible for handling properties of all objects in
>> a given path. Right now it only registers itself, doing nothing useful.
>> A conversion to this new layout will be done by subsequent patches.
>>
>> org.freedesktop.org.DBus.Properties spec can be found at
>> http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties
>> ---
>>  gdbus/object.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 48 insertions(+)
>>
>> diff --git a/gdbus/object.c b/gdbus/object.c
>> index 900e7ab..72f77d4 100644
>> --- a/gdbus/object.c
>> +++ b/gdbus/object.c
>> @@ -491,6 +491,50 @@ static const GDBusMethodTable introspect_methods[] = {
>>       { }
>>  };
>>
>> +static DBusMessage *properties_get(DBusConnection *connection,
>> +                                     DBusMessage *message, void *user_data)
>> +{
>> +     return NULL;
>> +}
>> +
>> +static DBusMessage *properties_get_all(DBusConnection *connection,
>> +                                     DBusMessage *message, void *user_data)
>> +{
>> +     return NULL;
>> +}
>> +
>> +static DBusMessage *properties_set(DBusConnection *connection,
>> +                                     DBusMessage *message, void *user_data)
>> +{
>> +     return NULL;
>> +}
>> +
>> +static const GDBusMethodTable properties_methods[] = {
>> +     { GDBUS_METHOD("Get",
>> +                     GDBUS_ARGS({ "interface_name", "s" },
>> +                                             { "property_name", "s" }),
>
> this should be "interface" and "name". Why are we so verbose here?

I put the same name as in spec:
http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties

>
>> +                     GDBUS_ARGS({ "value", "v" }),
>> +                     properties_get) },
>> +     { GDBUS_METHOD("Set", NULL,
>> +                     GDBUS_ARGS({ "interface_name", "s" },
>> +                                     { "property_name", "s" },
>> +                                     { "value", "v" }),
>> +                     properties_set) },
>> +     { GDBUS_METHOD("GetAll",
>> +                     GDBUS_ARGS({ "interface_name", "s" }),
>> +                     GDBUS_ARGS({ "props", "a{sv}" }),
>
> And this should be "properties". Here you are trying to be super short.

same here.


should I change or let as is?

Lucas De  Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux