~ubuntu-branches/ubuntu/quantal/rhythmbox/quantal-proposed

« back to all changes in this revision

Viewing changes to shell/rb-playlist-manager.c

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher, Rico Tzschichholz
  • Date: 2011-12-05 19:31:23 UTC
  • mfrom: (1.1.60)
  • Revision ID: package-import@ubuntu.com-20111205193123-89047p8yplb0w1vx
Tags: 2.90.1~20111126.89c872b0-0ubuntu1
* Upload the new version to Ubuntu, should solve those issues:
  - the lack of rhythmbox-client command (lp: #875064)
  - the music sharing preferences dialog (lp: #894153)
  - several segfaults (lp: #859195, #814614)
* debian/control.in:
  - let the rhythmbox gir depends on gir1.2-peas-1.0 (lp: #874973)

[ Rico Tzschichholz ]
* New upstream git snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
#define RB_PLAYLIST_MGR_VERSION (xmlChar *) "1.0"
65
65
#define RB_PLAYLIST_MGR_PL (xmlChar *) "rhythmdb-playlists"
66
66
 
67
 
#define RB_PLAYLIST_MANAGER_IFACE_NAME "org.gnome.Rhythmbox.PlaylistManager"
68
 
#define RB_PLAYLIST_MANAGER_DBUS_PATH "/org/gnome/Rhythmbox/PlaylistManager"
 
67
#define RB_PLAYLIST_MANAGER_IFACE_NAME "org.gnome.Rhythmbox3.PlaylistManager"
 
68
#define RB_PLAYLIST_MANAGER_DBUS_PATH "/org/gnome/Rhythmbox3/PlaylistManager"
69
69
 
70
70
static const char *rb_playlist_manager_dbus_spec =
71
71
"<node>"
72
 
"  <interface name='org.gnome.Rhythmbox.PlaylistManager'>"
73
 
"    <method name='getPlaylists'>"
 
72
"  <interface name='org.gnome.Rhythmbox3.PlaylistManager'>"
 
73
"    <method name='GetPlaylists'>"
74
74
"      <arg type='as' direction='out'/>"
75
75
"    </method>"
76
 
"    <method name='createPlaylist'>"
77
 
"      <arg type='s' name='name'/>"
78
 
"    </method>"
79
 
"    <method name='deletePlaylist'>"
80
 
"      <arg type='s' name='name'/>"
81
 
"    </method>"
82
 
"    <method name='addToPlaylist'>"
83
 
"      <arg type='s' name='playlist'/>"
84
 
"      <arg type='s' name='uri'/>"
85
 
"    </method>"
86
 
"    <method name='removeFromPlaylist'>"
87
 
"      <arg type='s' name='playlist'/>"
88
 
"      <arg type='s' name='uri'/>"
89
 
"    </method>"
90
 
"    <method name='exportPlaylist'>"
 
76
"    <method name='CreatePlaylist'>"
 
77
"      <arg type='s' name='name'/>"
 
78
"    </method>"
 
79
"    <method name='DeletePlaylist'>"
 
80
"      <arg type='s' name='name'/>"
 
81
"    </method>"
 
82
"    <method name='AddToPlaylist'>"
 
83
"      <arg type='s' name='playlist'/>"
 
84
"      <arg type='s' name='uri'/>"
 
85
"    </method>"
 
86
"    <method name='RemoveFromPlaylist'>"
 
87
"      <arg type='s' name='playlist'/>"
 
88
"      <arg type='s' name='uri'/>"
 
89
"    </method>"
 
90
"    <method name='ExportPlaylist'>"
91
91
"      <arg type='s' name='playlist'/>"
92
92
"      <arg type='s' name='uri'/>"
93
93
"      <arg type='b' name='mp3_format'/>"
94
94
"    </method>"
95
 
"    <method name='importPlaylist'>"
 
95
"    <method name='ImportPlaylist'>"
96
96
"      <arg type='s' name='uri'/>"
97
97
"    </method>"
98
98
"  </interface>"
1623
1623
                return;
1624
1624
        }
1625
1625
 
1626
 
        if (g_strcmp0 (method_name, "getPlaylists") == 0) {
 
1626
        if (g_strcmp0 (method_name, "GetPlaylists") == 0) {
1627
1627
                char **names;
1628
1628
 
1629
1629
                rb_playlist_manager_get_playlist_names (mgr, &names, NULL);
1630
1630
                g_dbus_method_invocation_return_value (invocation,
1631
1631
                                                       g_variant_new_strv ((const char * const *)names, -1));
1632
1632
                g_strfreev (names);
1633
 
        } else if (g_strcmp0 (method_name, "createPlaylist") == 0) {
 
1633
        } else if (g_strcmp0 (method_name, "CreatePlaylist") == 0) {
1634
1634
                g_variant_get (parameters, "(&s)", &name);
1635
1635
                if (rb_playlist_manager_create_static_playlist (mgr, name, &error)) {
1636
1636
                        g_dbus_method_invocation_return_value (invocation, NULL);
1638
1638
                        g_dbus_method_invocation_return_gerror (invocation, error);
1639
1639
                        g_clear_error (&error);
1640
1640
                }
1641
 
        } else if (g_strcmp0 (method_name, "deletePlaylist") == 0) {
 
1641
        } else if (g_strcmp0 (method_name, "DeletePlaylist") == 0) {
1642
1642
                g_variant_get (parameters, "(&s)", &name);
1643
1643
                if (rb_playlist_manager_delete_playlist (mgr, name, &error)) {
1644
1644
                        g_dbus_method_invocation_return_value (invocation, NULL);
1646
1646
                        g_dbus_method_invocation_return_gerror (invocation, error);
1647
1647
                        g_clear_error (&error);
1648
1648
                }
1649
 
        } else if (g_strcmp0 (method_name, "addToPlaylist") == 0) {
 
1649
        } else if (g_strcmp0 (method_name, "AddToPlaylist") == 0) {
1650
1650
                g_variant_get (parameters, "(ss)", &name, &uri);
1651
1651
                if (rb_playlist_manager_add_to_playlist (mgr, name, uri, &error)) {
1652
1652
                        g_dbus_method_invocation_return_value (invocation, NULL);
1654
1654
                        g_dbus_method_invocation_return_gerror (invocation, error);
1655
1655
                        g_clear_error (&error);
1656
1656
                }
1657
 
        } else if (g_strcmp0 (method_name, "removeFromPlaylist") == 0) {
 
1657
        } else if (g_strcmp0 (method_name, "RemoveFromPlaylist") == 0) {
1658
1658
                g_variant_get (parameters, "(ss)", &name, &uri);
1659
1659
                if (rb_playlist_manager_remove_from_playlist (mgr, name, uri, &error)) {
1660
1660
                        g_dbus_method_invocation_return_value (invocation, NULL);
1662
1662
                        g_dbus_method_invocation_return_gerror (invocation, error);
1663
1663
                        g_clear_error (&error);
1664
1664
                }
1665
 
        } else if (g_strcmp0 (method_name, "exportPlaylist") == 0) {
 
1665
        } else if (g_strcmp0 (method_name, "ExportPlaylist") == 0) {
1666
1666
                gboolean m3u_format;
1667
1667
                g_variant_get (parameters, "(ssb)", &name, &uri, &m3u_format);
1668
1668
                if (rb_playlist_manager_export_playlist (mgr, name, uri, m3u_format, &error)) {
1671
1671
                        g_dbus_method_invocation_return_gerror (invocation, error);
1672
1672
                        g_clear_error (&error);
1673
1673
                }
1674
 
        } else if (g_strcmp0 (method_name, "importPlaylist") == 0) {
 
1674
        } else if (g_strcmp0 (method_name, "ImportPlaylist") == 0) {
1675
1675
                g_variant_get (parameters, "(s)", &uri);
1676
1676
                if (rb_playlist_manager_parse_file (mgr, uri, &error)) {
1677
1677
                        g_dbus_method_invocation_return_value (invocation, NULL);