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 527021 - Make some functions private and remove them from bindings
Make some functions private and remove them from bindings
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Movie player
unspecified
Other Linux
: Normal minor
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2008-04-08 21:21 UTC by Philip Withnall
Modified: 2013-03-20 15:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philip Withnall 2008-04-08 21:21:08 UTC
Some functions shouldn't be exported to the bindings. They need to be removed from the bindings, their declarations need to be moved to totem-private.h or, if possible, made static.

totem_action_set_mrl_* would be candidates for being made static.
Comment 1 Philip Withnall 2009-01-06 19:33:36 UTC
Having looked at it, totem_action_set_mrl_* aren't too easy to make static. They're referenced from totem-menu.c, totem-object.c and totem-session.c.

The code in totem-object.c could be moved to totem.c without problems. The code in totem-menu.c could be reworked so that the playlist emits a "cleared" signal, and totem.c listens for that and clears the current MRL as appropriate.

Perhaps the code in totem-session.c could be reworked to use totem_action_set_playlist_index instead of the totem_action_set_mrl_* functions. If so, they could be made static rather than just private.
Comment 2 Philip Withnall 2009-02-06 18:50:22 UTC
Bastien, ping?
Comment 3 Bastien Nocera 2009-02-09 18:00:01 UTC
What's the list of functions that are exported to the bindings that shouldn't be?
Comment 4 Philip Withnall 2009-02-09 18:58:21 UTC
I removed the totem_action_set_mrl_* functions from the bindings in revision #5350[1]. The question now is: can we make them completely static or private, even in the C API?

[1]: http://svn.gnome.org/viewvc/totem?view=revision&revision=5350
Comment 5 Bastien Nocera 2013-03-19 09:51:21 UTC
I went through the totem.h header, and:
1) Renamed (nearly) everything to totem_object_* instead of totem_action_* and whatever else
2) Removed the signal emission functions, and a bunch of unused functions
3) Removed a number of functions available through totem_object_action_remote() (though we might be able to trim more if we removed playback control functions)

The totem_action_set_mrl* are still there, and are only used in the dbusservice plugin.
What's the OpenURI() function for? And should we use totem_object_add_to_playlist_and_play() instead, which ensures that the playlist is synced with what's playing as well (it could get pretty nasty).
Comment 6 Philip Withnall 2013-03-20 01:34:21 UTC
(In reply to comment #5)
> What's the OpenURI() function for?

http://specifications.freedesktop.org/mpris-spec/latest/Player_Interface.html#Method:OpenUri

> And should we use
> totem_object_add_to_playlist_and_play() instead, which ensures that the
> playlist is synced with what's playing as well (it could get pretty nasty).

The spec says “If the media player implements the TrackList interface, then the opened track should be made part of the tracklist”, so I guess we should be using add_to_playlist_and_play().
Comment 7 Bastien Nocera 2013-03-20 15:51:00 UTC
commit 150903cfeb78779bab5fe1e12c2c2a698ee5cf91
Author: Bastien Nocera <hadess@hadess.net>
Date:   Wed Mar 20 16:50:09 2013 +0100

    main: Don't export totem_action_set_mrl() in the API
    
    https://bugzilla.gnome.org/show_bug.cgi?id=527021

commit 9b2d0bf74c78f692fe366e9329a4a89a1ffd97cb
Author: Bastien Nocera <hadess@hadess.net>
Date:   Wed Mar 20 16:47:34 2013 +0100

    main: totem_action_set_mrl_and_play() doesn't need exporting
    
    It's only used inside totem-object.c
    
    https://bugzilla.gnome.org/show_bug.cgi?id=527021