Open Source Telephony
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [PATCH] Add send_method_call to g_dbus
Date: Tue, 27 Apr 2010 04:33:36 +0200	[thread overview]
Message-ID: <1272335616.22838.121.camel@localhost.localdomain> (raw)
In-Reply-To: <1271746281-26784-1-git-send-email-gustavo@padovan.org>

[-- Attachment #1: Type: text/plain, Size: 2347 bytes --]

Hi Gustavo,

> Puting send_method_call and send_method_call_with_reply on g_dbus will
> avoid some code duplication and will make things easier mainly for the
> Bluetooth plugins (HFP, DUN, SAP) inside oFono.
> ---
>  gdbus/gdbus.h  |   12 ++++
>  gdbus/object.c |   81 +++++++++++++++++++++++++++++
>  plugins/hfp.c  |  154 +++++++++++++------------------------------------------
>  3 files changed, 130 insertions(+), 117 deletions(-)

first of all, we don't intermix gdbus patches with other changes.
Remember that these commits have to be applied to BlueZ and ConnMan as
well.

> diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
> index 47e18cf..ac488c5 100644
> --- a/gdbus/gdbus.h
> +++ b/gdbus/gdbus.h
> @@ -106,12 +106,24 @@ DBusMessage *g_dbus_create_error_valist(DBusMessage *message, const char *name,
>  DBusMessage *g_dbus_create_reply(DBusMessage *message, int type, ...);
>  DBusMessage *g_dbus_create_reply_valist(DBusMessage *message,
>  						int type, va_list args);
> +DBusMessage *g_dbus_create_method_call(const char *dest, const char *path,
> +				const char *interface, const char *method,
> +				int type, va_list args);
>  
>  gboolean g_dbus_send_message(DBusConnection *connection, DBusMessage *message);
>  gboolean g_dbus_send_reply(DBusConnection *connection,
>  				DBusMessage *message, int type, ...);
>  gboolean g_dbus_send_reply_valist(DBusConnection *connection,
>  				DBusMessage *message, int type, va_list args);
> +gboolean g_dbus_send_method_call(DBusConnection *connection, const char *dest,
> +				const char *path, const char *interface,
> +				const char *method, int type, ...);
> +gboolean g_dbus_send_method_call_with_reply(DBusConnection *connection,
> +				const char *dest, const char *path,
> +				const char *interface, const char *method,
> +				DBusPendingCallNotifyFunction cb,
> +				void *user_data, DBusFreeFunction free_func,
> +				int timeout, int type, ...);

Is there any real reason to export send_method_call and
create_method_call? What are these good for and what are your expected
users of these?

I think that a g_dbus_method_call which is always async and take a
pending call notifier is just enough.

All the other helpers are more for callbacks that have to respond to
messages than for client usage.

Regards

Marcel



  parent reply	other threads:[~2010-04-27  2:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20  6:51 [PATCH] Add send_method_call to g_dbus Gustavo F. Padovan
2010-04-20  9:32 ` Kalle Valo
2010-04-20  9:41   ` Zhenhua Zhang
2010-04-20 16:20   ` Denis Kenzior
2010-04-21  6:51     ` Kalle Valo
2010-04-27  2:33 ` Marcel Holtmann [this message]
2010-04-27 11:14   ` Johan Hedberg
2010-04-30 23:40   ` Gustavo F. Padovan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1272335616.22838.121.camel@localhost.localdomain \
    --to=marcel@holtmann.org \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox