After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 611616 - Add plugin to configure a phone for use with gnome-phone-manager
Add plugin to configure a phone for use with gnome-phone-manager
Status: RESOLVED FIXED
Product: gnome-phone-manager
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: none
none
Depends on:
Blocks:
 
 
Reported: 2010-03-02 15:55 UTC by Daniele Forsi
Modified: 2011-02-15 20:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add plugin to configure a phone for use with gnome-phone-manager (6.79 KB, patch)
2010-03-02 15:55 UTC, Daniele Forsi
none Details | Review
Add a GNOME Bluetooth plugin in Phone Manager's source tree (9.32 KB, patch)
2011-01-15 10:54 UTC, Daniele Forsi
reviewed Details | Review

Description Daniele Forsi 2010-03-02 15:55:26 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).
Comment 1 Daniele Forsi 2010-03-02 15:55:30 UTC
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.
Comment 2 Bastien Nocera 2010-03-02 16:04:36 UTC
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?
Comment 3 Daniele Forsi 2011-01-15 10:54:47 UTC
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.
Comment 4 Bastien Nocera 2011-01-18 17:27:59 UTC
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.
Comment 5 Daniele Forsi 2011-02-15 20:06:08 UTC
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).