2 * arch-tag: Header for playlist source object
4 * Copyright (C) 2002 Jorn Baayen <jorn@nl.linux.org>
5 * Copyright (C) 2003,2004 Colin Walters <walters@redhat.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef __RB_PLAYLIST_SOURCE_H
24 #define __RB_PLAYLIST_SOURCE_H
26 #include <libxml/tree.h>
29 #include "rb-source.h"
31 #include "rhythmdb-query-model.h"
35 #define RB_TYPE_PLAYLIST_SOURCE (rb_playlist_source_get_type ())
36 #define RB_PLAYLIST_SOURCE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_PLAYLIST_SOURCE, RBPlaylistSource))
37 #define RB_PLAYLIST_SOURCE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_PLAYLIST_SOURCE, RBPlaylistSourceClass))
38 #define RB_IS_PLAYLIST_SOURCE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_PLAYLIST_SOURCE))
39 #define RB_IS_PLAYLIST_SOURCE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_PLAYLIST_SOURCE))
40 #define RB_PLAYLIST_SOURCE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_PLAYLIST_SOURCE, RBPlaylistSourceClass))
42 typedef struct RBPlaylistSourcePrivate RBPlaylistSourcePrivate
;
48 RBPlaylistSourcePrivate
*priv
;
56 void (*impl_show_entry_view_popup
) (RBPlaylistSource
*source
, RBEntryView
*view
, gboolean over_entry
);
57 void (*impl_save_contents_to_xml
) (RBPlaylistSource
*source
, xmlNodePtr node
);
59 } RBPlaylistSourceClass
;
61 GType
rb_playlist_source_get_type (void);
63 RBSource
* rb_playlist_source_new_from_xml (RBShell
*shell
,
66 void rb_playlist_source_save_playlist(RBPlaylistSource
*source
,
70 void rb_playlist_source_save_to_xml (RBPlaylistSource
*source
,
73 /* methods for subclasses to call */
75 void rb_playlist_source_setup_entry_view (RBPlaylistSource
*source
,
76 RBEntryView
*entry_view
);
78 void rb_playlist_source_set_query_model (RBPlaylistSource
*source
,
79 RhythmDBQueryModel
*model
);
81 RhythmDBQueryModel
* rb_playlist_source_get_query_model (RBPlaylistSource
*source
);
83 RhythmDB
* rb_playlist_source_get_db (RBPlaylistSource
*source
);
85 void rb_playlist_source_mark_dirty (RBPlaylistSource
*source
);
87 gboolean
rb_playlist_source_location_in_map (RBPlaylistSource
*source
,
88 const char *location
);
90 gboolean
rb_playlist_source_add_to_map (RBPlaylistSource
*source
,
91 const char *location
);
94 #endif /* __RB_PLAYLIST_SOURCE_H */