From: Denis Kenzior <denkenz@gmail.com>
To: ell@lists.01.org
Subject: Re: [PATCH 4/9] dbus: Separate interface registration from instantiation
Date: Thu, 11 Feb 2016 13:52:29 -0600 [thread overview]
Message-ID: <56BCE67D.8000803@gmail.com> (raw)
In-Reply-To: <1455101156-3587-5-git-send-email-andrew.zaborowski@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1918 bytes --]
Hi Andrew,
On 02/10/2016 04:45 AM, Andrew Zaborowski wrote:
> Currently l_dbus_register_interface performs three related actions:
> * if needed, creates a new object node in the dbus object tree
> * if needed, sets up internal structs for the new interface
> * adds the interface to the object
>
> With this patch these are three spearate calls, although the first
> is still performed automatically by l_dbus_add_interface if
> l_dbus_register_object wasn't called first. This is in preparation for
> ObjectManager support. With this the setup_func parameter and new
> interface parameters don't need to be passed every time an interface is
> instiated, only when it's being registered/created.
>
> Note that while the client doesn't need to call l_dbus_register_object,
> they still need to call l_dbus_unregister_object to free the object
> because it's not freed automatically when the last interface gets
> removed. But they can skip the l_dbus_remove_interface calls
> because the interfaces will be removed either way.
> ---
> ell/dbus-private.h | 22 ++++--
> ell/dbus-service.c | 192 ++++++++++++++++++++++++++++++++++++++++-------------
> ell/dbus.c | 147 ++++++++++++++++++++++++++++++++++++++--
> ell/dbus.h | 19 ++++--
> 4 files changed, 318 insertions(+), 62 deletions(-)
>
<snip>
> diff --git a/ell/dbus.c b/ell/dbus.c
> index 14849e8..796240f 100644
> --- a/ell/dbus.c
> +++ b/ell/dbus.c
<snip>
> +
> +LIB_EXPORT bool l_dbus_object_remove_interface(struct l_dbus *dbus,
> + const char *object,
> + const char *interface)
You forgot to add documentation for this one :)
> +{
> + if (unlikely(!dbus))
> + return false;
> +
> + if (unlikely(!dbus->tree))
> + return false;
> +
> + return _dbus_object_tree_remove_interface(dbus->tree, object,
> + interface);
> }
>
Regards,
-Denis
next prev parent reply other threads:[~2016-02-11 19:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 10:45 [PATCH] dbus: Fix read after free during cleanup Andrew Zaborowski
2016-02-10 10:45 ` [PATCH 1/9] dbus: Message builder function to copy from an iter Andrew Zaborowski
2016-02-11 19:50 ` Denis Kenzior
2016-02-10 10:45 ` [PATCH 2/9] dbus: Private function to retrieve the tree for a connection Andrew Zaborowski
2016-02-10 10:45 ` [PATCH 3/9] dbus: setters and getters API for properties Andrew Zaborowski
2016-02-10 10:45 ` [PATCH 4/9] dbus: Separate interface registration from instantiation Andrew Zaborowski
2016-02-11 19:52 ` Denis Kenzior [this message]
2016-02-10 10:45 ` [PATCH 5/9] dbus: Handle legacy GetProperties and SetProperty automatically Andrew Zaborowski
2016-02-10 10:45 ` [PATCH 6/9] dbus: Implement org.freedesktop.DBus.Properties Andrew Zaborowski
2016-02-10 10:45 ` [PATCH 7/9] dbus: Implement org.freedesktop.DBus.ObjectManager Andrew Zaborowski
2016-02-10 10:45 ` [PATCH 8/9] examples: update dbus-service to new API Andrew Zaborowski
2016-02-10 10:45 ` [PATCH 9/9] test: update to new dbus API Andrew Zaborowski
2016-02-11 19:50 ` [PATCH] dbus: Fix read after free during cleanup Denis Kenzior
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=56BCE67D.8000803@gmail.com \
--to=denkenz@gmail.com \
--cc=ell@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.