Top | ![]() |
![]() |
![]() |
![]() |
XplayerPlPlaylist * | xplayer_pl_playlist_new () |
guint | xplayer_pl_playlist_size () |
void | xplayer_pl_playlist_prepend () |
void | xplayer_pl_playlist_append () |
void | xplayer_pl_playlist_insert () |
gboolean | xplayer_pl_playlist_iter_first () |
gboolean | xplayer_pl_playlist_iter_next () |
gboolean | xplayer_pl_playlist_iter_prev () |
gboolean | xplayer_pl_playlist_get_value () |
void | xplayer_pl_playlist_get_valist () |
void | xplayer_pl_playlist_get () |
gboolean | xplayer_pl_playlist_set_value () |
void | xplayer_pl_playlist_set_valist () |
void | xplayer_pl_playlist_set () |
XplayerPlPlaylist represents a playlist, provides API to either navigate through
the playlist elements, or perform additions or modifications. See also
xplayer_pl_parser_save()
.
XplayerPlPlaylist *
xplayer_pl_playlist_new (void
);
Creates a new XplayerPlPlaylist object.
guint
xplayer_pl_playlist_size (XplayerPlPlaylist *playlist
);
Returns the number of elements in playlist
.
void xplayer_pl_playlist_prepend (XplayerPlPlaylist *playlist
,XplayerPlPlaylistIter *iter
);
Prepends a new empty element to playlist
, and modifies iter
so
it points to it. To fill in values, you need to call
xplayer_pl_playlist_set()
or xplayer_pl_playlist_set_value()
.
void xplayer_pl_playlist_append (XplayerPlPlaylist *playlist
,XplayerPlPlaylistIter *iter
);
Appends a new empty element to playlist
, and modifies iter
so
it points to it. To fill in values, you need to call
xplayer_pl_playlist_set()
or xplayer_pl_playlist_set_value()
.
void xplayer_pl_playlist_insert (XplayerPlPlaylist *playlist
,gint position
,XplayerPlPlaylistIter *iter
);
Inserts a new empty element to playlist
at position
, and modifies
iter
so it points to it. To fill in values, you need to call
xplayer_pl_playlist_set()
or xplayer_pl_playlist_set_value()
.
position
may be minor than 0 to prepend elements, or bigger than
the current playlist
size to append elements.
playlist |
||
position |
position in the playlist |
|
iter |
an unset XplayerPlPlaylistIter for returning the location. |
[out] |
gboolean xplayer_pl_playlist_iter_first (XplayerPlPlaylist *playlist
,XplayerPlPlaylistIter *iter
);
Modifies iter
so it points to the first element in playlist
.
gboolean xplayer_pl_playlist_iter_next (XplayerPlPlaylist *playlist
,XplayerPlPlaylistIter *iter
);
Modifies iter
so it points to the next element it previously
pointed to. This function will return FALSE
if there was no
next element, or iter
didn't actually point to any element
in playlist
.
gboolean xplayer_pl_playlist_iter_prev (XplayerPlPlaylist *playlist
,XplayerPlPlaylistIter *iter
);
Modifies iter
so it points to the previous element it previously
pointed to. This function will return FALSE
if there was no
previous element, or iter
didn't actually point to any element
in playlist
.
gboolean xplayer_pl_playlist_get_value (XplayerPlPlaylist *playlist
,XplayerPlPlaylistIter *iter
,const gchar *key
,GValue *value
);
Gets the value for key
(Such as XPLAYER_PL_PARSER_FIELD_URI
) in
the playlist item pointed by iter
.
playlist |
||
iter |
a XplayerPlPlaylistIter pointing to some item in |
|
key |
data key |
|
value |
an empty GValue to set |
void xplayer_pl_playlist_get_valist (XplayerPlPlaylist *playlist
,XplayerPlPlaylistIter *iter
,va_list args
);
See xplayer_pl_playlist_get()
, this function takes a va_list.
void xplayer_pl_playlist_get (XplayerPlPlaylist *playlist
,XplayerPlPlaylistIter *iter
,...
);
Gets the value for one or more keys from the element pointed
by iter
.
playlist |
||
iter |
a XplayerPlPlaylistIter pointing to some item in |
|
... |
pairs of key/return location for value, terminated by |
gboolean xplayer_pl_playlist_set_value (XplayerPlPlaylist *playlist
,XplayerPlPlaylistIter *iter
,const gchar *key
,GValue *value
);
Sets the value for key
in the element pointed by iter
.
playlist |
||
iter |
a XplayerPlPlaylistIter pointing to some item in |
|
key |
key to set the value for |
|
value |
GValue containing the key value |
void xplayer_pl_playlist_set_valist (XplayerPlPlaylist *playlist
,XplayerPlPlaylistIter *iter
,va_list args
);
See xplayer_pl_playlist_set()
, this function takes a va_list.
void xplayer_pl_playlist_set (XplayerPlPlaylist *playlist
,XplayerPlPlaylistIter *iter
,...
);
Sets the value for one or several keys in the element pointed
by iter
.
playlist |
||
iter |
a XplayerPlPlaylistIter pointing to some item in |
|
... |
key/value string pairs, terminated with |
typedef struct _XplayerPlPlaylist XplayerPlPlaylist;
All the fields in the XplayerPlPlaylist structure are private and should never be accessed directly.
typedef struct { GObjectClass parent_class; } XplayerPlPlaylistClass;
All the fields in the XplayerPlPlaylistClass structure are private and should never be accessed directly.