Hi Inaky,

> +static DBusMessage *dbus_sms_msg_get_properties(
> +     DBusConnection * conn, DBusMessage *dbus_msg, void *_sms_msg)
> +{
> +     struct tx_queue_entry *sms_msg = _sms_msg;
> +     DBusMessage *reply;
> +     DBusMessageIter iter;
> +     DBusMessageIter dict;
> +     const char *str;
> +
> +     reply = dbus_message_new_method_return(dbus_msg);
> +     if (!reply)
> +             return NULL;

Empty line here

> +     dbus_message_iter_init_append(reply, &iter);
> +     dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY,
> +                                      OFONO_PROPERTIES_ARRAY_SIGNATURE,
> +                                      &dict);

Empty line here

> +     str = ofono_sms_tx_state_to_string(sms_msg->state);
> +     ofono_dbus_dict_append(&dict, "TXState", DBUS_TYPE_STRING, &str);

Empty line here
> +     dbus_message_iter_close_container(&iter, &dict);

And one more here

Also, you might want to think about what other properties would be
useful here.  E.g. perhaps queue time, submission time, To address,
contents?

> +     return reply;
> +}
> +
> +

No double empty lines allowed.

>  /*
>   * Note that the D-Bus specific cleanups are taken care by the
>   * sms_msg_dbus_destroy() callback passed in dbus_sms_msg_send().
> @@ -564,6 +587,8 @@ static DBusMessage *dbus_sms_msg_cancel(
>  
>  static
>  GDBusMethodTable sms_msg_methods[] = {
> +     { "GetProperties",      "",     "a{sv}",
> +       dbus_sms_msg_get_properties, G_DBUS_METHOD_FLAG_ASYNC },

Why exactly is this method ASYNC?

>       { "Cancel",             DBUS_TYPE_BOOLEAN_AS_STRING,    "",
>         dbus_sms_msg_cancel, 0 },
>       { }

Regards,
-Denis
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to