2 * arch-tag: Header for Rhythmbox playlist management object
4 * Copyright (C) 2003,2004 Colin Walters <walters@verbum.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef __RB_PLAYLIST_MANAGER_H
23 #define __RB_PLAYLIST_MANAGER_H
25 #include "rb-source.h"
27 #include "rb-sourcelist.h"
31 #define RB_TYPE_PLAYLIST_MANAGER (rb_playlist_manager_get_type ())
32 #define RB_PLAYLIST_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_PLAYLIST_MANAGER, RBPlaylistManager))
33 #define RB_PLAYLIST_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_PLAYLIST_MANAGER, RBPlaylistManagerClass))
34 #define RB_IS_PLAYLIST_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_PLAYLIST_MANAGER))
35 #define RB_IS_PLAYLIST_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_PLAYLIST_MANAGER))
36 #define RB_PLAYLIST_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_PLAYLIST_MANAGER, RBPlaylistManagerClass))
40 RB_PLAYLIST_MANAGER_ERROR_PARSE
,
41 RB_PLAYLIST_MANAGER_ERROR_PLAYLIST_EXISTS
,
42 RB_PLAYLIST_MANAGER_ERROR_PLAYLIST_NOT_FOUND
43 } RBPlaylistManagerError
;
45 #define RB_PLAYLIST_MANAGER_ERROR rb_playlist_manager_error_quark ()
47 GQuark
rb_playlist_manager_error_quark (void);
49 typedef struct RBPlaylistManagerPrivate RBPlaylistManagerPrivate
;
55 RBPlaylistManagerPrivate
*priv
;
60 GObjectClass parent_class
;
63 void (*playlist_added
) (RBPlaylistManager
*manager
, RBSource
*source
);
64 void (*playlist_created
) (RBPlaylistManager
*manager
, RBSource
*source
);
65 void (*load_start
) (RBPlaylistManager
*manager
);
66 void (*load_finish
) (RBPlaylistManager
*manager
);
67 } RBPlaylistManagerClass
;
71 RB_PLAYLIST_EXPORT_TYPE_UNKNOWN
,
72 RB_PLAYLIST_EXPORT_TYPE_M3U
,
73 RB_PLAYLIST_EXPORT_TYPE_PLS
,
74 } RBPlaylistExportType
;
76 GType
rb_playlist_manager_get_type (void);
78 RBPlaylistManager
* rb_playlist_manager_new (RBShell
*shell
,
79 RBSourceList
*sourcelist
,
80 const char *playlists_file
);
82 void rb_playlist_manager_shutdown (RBPlaylistManager
*mgr
);
83 gboolean
rb_playlist_manager_parse_file (RBPlaylistManager
*mgr
,
87 void rb_playlist_manager_load_playlists (RBPlaylistManager
*mgr
);
89 gboolean
rb_playlist_manager_save_playlists (RBPlaylistManager
*mgr
,
92 RBSource
* rb_playlist_manager_new_playlist (RBPlaylistManager
*mgr
,
93 const char *suggested_name
,
95 RBSource
* rb_playlist_manager_new_playlist_from_selection_data (RBPlaylistManager
*mgr
,
96 GtkSelectionData
*data
);
98 GList
* rb_playlist_manager_get_playlists (RBPlaylistManager
*manager
);
100 gboolean
rb_playlist_manager_get_playlist_names (RBPlaylistManager
*manager
,
103 gboolean
rb_playlist_manager_create_static_playlist (RBPlaylistManager
*manager
,
106 gboolean
rb_playlist_manager_delete_playlist (RBPlaylistManager
*manager
,
109 gboolean
rb_playlist_manager_add_to_playlist (RBPlaylistManager
*manager
,
110 const gchar
*playlist
,
113 gboolean
rb_playlist_manager_remove_from_playlist (RBPlaylistManager
*manager
,
114 const gchar
*playlist
,
117 gboolean
rb_playlist_manager_export_playlist (RBPlaylistManager
*manager
,
118 const gchar
*playlist
,
125 #endif /* __RB_PLAYLIST_MANAGER_H */