GNOME Bugzilla – Bug 611616
Add plugin to configure a phone for use with gnome-phone-manager
Last modified: 2011-02-15 20:06:20 UTC
This plugins sets Bluetooth address and connection type in the relevant GConf keys so that the device can be used by gnome-phone-manager; existing values are silently overwritten. I copied the code from plugins/geoclue.c and kept the original copyright line because I only did minor changes to it (added a couple of lines, changed some strings and fixed some whitespace).
Created attachment 155051 [details] [review] Add plugin to configure a phone for use with gnome-phone-manager Code is almost an exact copy of plugins/geoclue.c.
The plugin code is exported, so this should definitely live in gnome-phone-manager instead. Any chance it could be made to use the same heuristics for detecting which device is supported?
Created attachment 178386 [details] [review] Add a GNOME Bluetooth plugin in Phone Manager's source tree I moved the plugin to gnome-phone-manager. This plugin is installed in $(libdir)/gnome-bluetooth/plugins however this is phonemgr's $(libdir) which isn't necessarily the same as gnome-bluetooth's. What is the best way to get the install directory? In this plugin I duplicated the CONFBASE define and the CONNECTION_* enums from app.h but I'll fix this later because I plan to add a CONNECTION_NONE or similar, it will be useful when the plugin deconfigures the phone and maybe if the user wants to pause the connection without quitting the program.
Review of attachment 178386 [details] [review]: Looks fine apart from that comment. ::: gnome-bluetooth/phonemgr.c @@ +45,3 @@ + +static char * +get_name_and_type (const char *address, BluetoothType *ret_type) You should really change get_name_and_type() to be just "get_type()", seeing as you never use the name anyway.
Patch committed with changes (renamed function as "get_type()", moved duplicated defines to a common include file, removed handling of old-bdaddr, several other changes).