public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] [PATCH] Make BluetoothClient work on all adapters
Date: Wed, 25 Jul 2007 08:33:23 +0100	[thread overview]
Message-ID: <1185348803.3641.213.camel@cookie.hadess.net> (raw)
In-Reply-To: <1185347068.7111.91.camel@violet>

On Wed, 2007-07-25 at 09:04 +0200, Marcel Holtmann wrote:
> Hi Bastien,
> 
> > > > However this includes that we have to monitor if the default adapter
> > > > changes or one adapter gets removed while being in the adapter selector
> > > > widget or device selector widget.
> > > 
> > > Fair enough, I knew this would be a sticky point. I'm trying to fix it
> > > up so that we use the default adapter by default with "NULL" passed as
> > > the adapter.
> > 
> > Here goes. This should correctly kill the disco on the old default
> > adapter and re-enable it on the new default adapter, when the default
> > adapter changes.
> 
> you patch is wrong. You are messing up a DBusConnection object with the
> BluetoothClient object in the callbacks of the DefaultAdapterChanged
> signal.
> 
> Actually I also don't like this way, we should store the default path
> globally since that is what really counts. The tree storing all
> information should be fully valid as long as we have an instance of the
> BluetoothClient object and it can store the information about the
> default adapter for us.

The tree storing all information is still valid, there's no information
there as to which is the default adapter.

And to be able to use the default_adapter in the instances, you need to
connect to the signal in the instances.

If you're not interested in stopping the existing discoveries on the
default adapter when the default adapter changes, or transferring those
discoveries to other devices, then it will be much easier.

I'm not sure why we would carry on discovering devices if the model
showing the devices is going away though.

So, the only thing I'm supposed to do, is change the model
automatically, so that when we get the model for the default adapter,
the model should change automatically. That will require the
DefaultAdapterChanged signal to live in the instance, as in my patch, as
globally, we don't have any knownledge of the instances.

-- 
Bastien Nocera <hadess@hadess.net> 


-------------------------------------------------------------------------
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/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2007-07-25  7:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-24 16:16 [Bluez-devel] [PATCH] Make BluetoothClient work on all adapters Bastien Nocera
2007-07-24 16:20 ` Bastien Nocera
2007-07-24 20:54   ` Marcel Holtmann
2007-07-24 21:12     ` Bastien Nocera
2007-07-24 21:26       ` Marcel Holtmann
2007-07-24 21:14 ` Marcel Holtmann
2007-07-24 22:10   ` Bastien Nocera
2007-07-24 23:09     ` Bastien Nocera
2007-07-25  6:51       ` Marcel Holtmann
2007-07-25  7:04       ` Marcel Holtmann
2007-07-25  7:33         ` Bastien Nocera [this message]
2007-07-25  7:53           ` Marcel Holtmann
2007-07-25  7:56             ` Bastien Nocera
2007-07-25  8:05               ` Marcel Holtmann

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=1185348803.3641.213.camel@cookie.hadess.net \
    --to=hadess@hadess.net \
    --cc=bluez-devel@lists.sourceforge.net \
    /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