Re: Making library out of bluez-gnome

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

 



On Tue, 2008-06-24 at 15:21 +0300, Antti Kaijanmäki wrote:> Hello list!> > I'm developing a project[1] that needs to provide the user a way to> select[2] a Bluetooth device from a list of discovered devices.> > I noticed that gnome-bluez applet has a very nice device selector and> that got me browsing though the code. Unfortunately I discovered that> bluez-gnome creates only a static library libcommon.a that contains the> device selector (common/bluetooth-device-selection.c) for private use.> > Now there is two options the way I see it. Either I have a private copy> of bluez-gnome package or bluez-gnome is made to be a shared library.<snip>
The whole problem is making sure the API is good enough for applicationsto use. For example, Marcel wants to allow searching of devices by UUID.
And I'd like to fix up the API to allow adding filters that encompassmore than a single type of device (eg. input devices would be keyboards,mice, joysticks, and other input devices).
> Here are some wishes from top of my head regarding the device selector:>  1. remove the caption of the list>     - let the developer provide a caption best suited for>       his application
That's already possible, you set it when callingbluetooth_device_selection_new().
>  2. put the filter in GtkExpander>     - Filters are not used for by the most of the users, thus it's>       convenient to have them hidden by default. 
Why?
>  3. make the filter completely hidden>    - this combined with the 1. would make the widget appear just>      like GtkTreeView>    - this is already achievable, but there seems to be a bug. If both of>      the filter fields are hidden the caption is still shown.>      See an attached patch.
I don't see what the problem is here.
>  4. have alternative filters in right-click pop-up menu>     - very handy for tight places
I'm not sure that's useful.
>  5. add property for selected device name. It's always nice to be able>     to show the user a nice name instead of bluetooth address.>     - see an attached patch.
That's useful, as it allows us to avoid another lookup, although it'sclose to free as hcid would have cached it.
FYI, you're leaking a copy of the name though, as gtk_tree_model_get()will make a copy of the value, as well as g_value_set_string(). Useg_value_take_string().


-------------------------------------------------------------------------Check out the new SourceForge.net Marketplace.It's the best place to buy or sell services forjust about anything Open Source.http://sourceforge.net/services/buy/index.php_______________________________________________Bluez-devel mailing listBluez-devel@xxxxxxxxxxxxxxxxxxxxxxxxxx://lists.sourceforge.net/lists/listinfo/bluez-devel

[Index of Archives]     [Linux Bluetooth Devel]     [Linux USB Devel]     [Network Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux