Top | ![]() |
![]() |
![]() |
![]() |
TotemPlPlaylist represents a playlist, provides API to either navigate through
the playlist elements, or perform additions or modifications. See also
totem_pl_parser_save()
.
TotemPlPlaylist *
totem_pl_playlist_new (void
);
Creates a new TotemPlPlaylist object.
guint
totem_pl_playlist_size (TotemPlPlaylist *playlist
);
Returns the number of elements in playlist
.
void totem_pl_playlist_prepend (TotemPlPlaylist *playlist
,TotemPlPlaylistIter *iter
);
Prepends a new empty element to playlist
, and modifies iter
so
it points to it. To fill in values, you need to call
totem_pl_playlist_set()
or totem_pl_playlist_set_value()
.
void totem_pl_playlist_append (TotemPlPlaylist *playlist
,TotemPlPlaylistIter *iter
);
Appends a new empty element to playlist
, and modifies iter
so
it points to it. To fill in values, you need to call
totem_pl_playlist_set()
or totem_pl_playlist_set_value()
.
void totem_pl_playlist_insert (TotemPlPlaylist *playlist
,gint position
,TotemPlPlaylistIter *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
totem_pl_playlist_set()
or totem_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 TotemPlPlaylistIter for returning the location. |
[out] |
gboolean totem_pl_playlist_iter_first (TotemPlPlaylist *playlist
,TotemPlPlaylistIter *iter
);
Modifies iter
so it points to the first element in playlist
.
gboolean totem_pl_playlist_iter_next (TotemPlPlaylist *playlist
,TotemPlPlaylistIter *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 totem_pl_playlist_iter_prev (TotemPlPlaylist *playlist
,TotemPlPlaylistIter *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 totem_pl_playlist_get_value (TotemPlPlaylist *playlist
,TotemPlPlaylistIter *iter
,const gchar *key
,GValue *value
);
Gets the value for key
(Such as TOTEM_PL_PARSER_FIELD_URI
) in
the playlist item pointed by iter
.
playlist |
||
iter |
a TotemPlPlaylistIter pointing to some item in |
|
key |
data key |
|
value |
an empty GValue to set |
void totem_pl_playlist_get_valist (TotemPlPlaylist *playlist
,TotemPlPlaylistIter *iter
,va_list args
);
See totem_pl_playlist_get()
, this function takes a va_list.
void totem_pl_playlist_get (TotemPlPlaylist *playlist
,TotemPlPlaylistIter *iter
,...
);
Gets the value for one or more keys from the element pointed
by iter
.
playlist |
||
iter |
a TotemPlPlaylistIter pointing to some item in |
|
... |
pairs of key/return location for value, terminated by |
gboolean totem_pl_playlist_set_value (TotemPlPlaylist *playlist
,TotemPlPlaylistIter *iter
,const gchar *key
,GValue *value
);
Sets the value for key
in the element pointed by iter
.
playlist |
||
iter |
a TotemPlPlaylistIter pointing to some item in |
|
key |
key to set the value for |
|
value |
GValue containing the key value |
void totem_pl_playlist_set_valist (TotemPlPlaylist *playlist
,TotemPlPlaylistIter *iter
,va_list args
);
See totem_pl_playlist_set()
, this function takes a va_list.
void totem_pl_playlist_set (TotemPlPlaylist *playlist
,TotemPlPlaylistIter *iter
,...
);
Sets the value for one or several keys in the element pointed
by iter
.
playlist |
||
iter |
a TotemPlPlaylistIter pointing to some item in |
|
... |
key/value string pairs, terminated with |
typedef struct { GObject parent_instance; } TotemPlPlaylist;
All the fields in the TotemPlPlaylist structure are private and should never be accessed directly.
typedef struct { GObjectClass parent_class; } TotemPlPlaylistClass;
All the fields in the TotemPlPlaylistClass structure are private and should never be accessed directly.