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 626399 - Plugin API cleanup
Plugin API cleanup
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Plugins
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-08-08 23:35 UTC by Philip Withnall
Modified: 2013-08-04 20:12 UTC
See Also:
GNOME target: ---
GNOME version: ---
bugzilla-gnome: freeze_break?



Description Philip Withnall 2010-08-08 23:35:59 UTC
Here's a branch with some plugin API cleanup: http://git.gnome.org/browse/totem/log/?h=plugin-api-cleanup

It basically just removes the compatibility #defines in totem.h, banishes use of the word "action" in TotemObject methods, and makes the function names in totem.h more consistent.

A few small functions were removed. Hopefully more of this can happen; do we have any thoughts about exposing TotemPlaylist to plugins?
Comment 2 Philip Withnall 2013-07-05 22:26:48 UTC
(In reply to comment #1)
> Those look fine:
> https://git.gnome.org/browse/totem/commit/?h=plugin-api-cleanup&id=a7568182b6707b770feae35dcb3273d7e77645c5
> https://git.gnome.org/browse/totem/commit/?h=plugin-api-cleanup&id=a68e5f58dfc15616ad617c8a8f2bd23bb30002e9

Looks like the second one had already been done. I’ve committed the first, plus and additional change I had locally which makes the build output a little prettier.

commit e92cbcd491b7d62151cb3b058f1ae2b1238e2d08
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Sun Sep 5 15:51:47 2010 +0100

    Quieten the intltool-merge process when building plugins

 src/plugins/Makefile.plugins | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

commit f571637cd94f4ccbd9162a8290d723334d58526d
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Sun Aug 8 11:07:03 2010 +0100

    Make TotemObject signal emission functions static to totem-object.c

 docs/reference/totem-sections.txt |  3 ---
 src/totem-object.c                | 49 ++++++++++++++++++++++++-------------------------
 src/totem-private.h               |  8 --------
 3 files changed, 24 insertions(+), 36 deletions(-)


> This is nice, but would need updating.
> https://git.gnome.org/browse/totem/commit/?h=plugin-api-cleanup&id=192f32a69e3ca08100f5a077185941cc45c4781a
> 
> Did you remove any API from it? We'd also need to review which APIs we want
> public or private.

I can’t really remember what I did in the branch, and the version I have locally has a lot more changes relating to privatising various fields in TotemObject.

I think it would be easier to rewrite a lot of these commits than it would be to rebase them; but I don’t want to do that until I have enough time free to make sure they all get pushed, otherwise they’ll all rot again.

Maybe it would make sense to set aside a few hours at GUADEC to go through the API and work out what we want to make public/private?
Comment 3 Philip Withnall 2013-08-04 14:01:29 UTC
We still need to go through and work out which APIs to keep and bin.

commit 4fee5dcc803bcb6ed3bef168924003fe75cc358b
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Sun Aug 4 15:07:50 2013 +0200

    core: Consistently prefix plugin-visible API with “totem_object_”
    
    Helps: https://bugzilla.gnome.org/show_bug.cgi?id=626399

 docs/reference/totem-sections.txt                       |  78 +++++++++++-----------
 src/plugins/chapters/totem-chapters.c                   |  20 +++---
 src/plugins/lirc/totem-lirc.c                           |   6 +-
 src/plugins/media-player-keys/totem-media-player-keys.c |  20 +++---
 src/plugins/screenshot/totem-screenshot-plugin.c        |   4 +-
 src/plugins/skipto/totem-skipto-plugin.c                |   2 +-
 src/totem-interface.c                                   |   2 +-
 src/totem-menu.c                                        |  24 +++----
 src/totem-object.c                                      | 404 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------
 src/totem-options.c                                     |   8 +--
 src/totem-private.h                                     |  28 ++++----
 src/totem-session.c                                     |   4 +-
 src/totem-uri.c                                         |   6 +-
 src/totem.c                                             |  14 ++--
 src/totem.h                                             |  30 ++++-----
 15 files changed, 325 insertions(+), 325 deletions(-)
Comment 4 Philip Withnall 2013-08-04 14:10:48 UTC
I’m thinking the following APIs in totem.h can be made private:
 • totem_object_remote_command() (lirc and media-keys plugins use them)
 • totem_object_remote_[get|set]_setting() (lirc and media-keys plugins use them)

I think the rest looks reasonable. I renamed a few things (other than s/action/object/), which you might want to glance over, Bastien.
Comment 5 Philip Withnall 2013-08-04 20:12:33 UTC
(In reply to comment #4)
> I’m thinking the following APIs in totem.h can be made private:
>  • totem_object_remote_command() (lirc and media-keys plugins use them)
>  • totem_object_remote_[get|set]_setting() (lirc and media-keys plugins use
> them)

On further investigation, it would make the code messier to make those private.