src/xmms/playlist.c File Reference


Detailed Description

Controls playlist.

Definition in file playlist.c.

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <math.h>
#include <ctype.h>
#include "xmmspriv/xmms_playlist.h"
#include "xmms/xmms_ipc.h"
#include "xmms/xmms_config.h"
#include "xmmspriv/xmms_medialib.h"
#include "xmmspriv/xmms_collection.h"
#include "xmms/xmms_log.h"

Go to the source code of this file.

Defines

#define XMMS_PLAYLIST_CHANGED_MSG(type, id, name)   xmms_playlist_changed_msg_send (playlist, xmms_playlist_changed_msg_new (playlist, type, id, name))
#define XMMS_PLAYLIST_CURRPOS_MSG(pos, name)   xmms_playlist_current_pos_msg_send (playlist, xmms_playlist_current_pos_msg_new (playlist, pos, name))

Functions

gboolean xmms_playlist_remove (xmms_playlist_t *playlist, gchar *plname, guint pos, xmms_error_t *err)
 Remove an entry from playlist.
 XMMS_CMD_DEFINE (load, xmms_playlist_load, xmms_playlist_t *, NONE, STRING, NONE)
 XMMS_CMD_DEFINE3 (insert_url, xmms_playlist_insert_url, xmms_playlist_t *, NONE, STRING, UINT32, STRING)
 XMMS_CMD_DEFINE3 (insert_id, xmms_playlist_insert_id, xmms_playlist_t *, NONE, STRING, UINT32, UINT32)
 XMMS_CMD_DEFINE4 (insert_coll, xmms_playlist_insert_collection, xmms_playlist_t *, NONE, STRING, UINT32, COLL, STRINGLIST)
 XMMS_CMD_DEFINE (shuffle, xmms_playlist_shuffle, xmms_playlist_t *, NONE, STRING, NONE)
 XMMS_CMD_DEFINE (remove, xmms_playlist_remove, xmms_playlist_t *, NONE, STRING, UINT32)
 XMMS_CMD_DEFINE3 (move, xmms_playlist_move, xmms_playlist_t *, NONE, STRING, UINT32, UINT32)
 XMMS_CMD_DEFINE (add_url, xmms_playlist_add_url, xmms_playlist_t *, NONE, STRING, STRING)
 XMMS_CMD_DEFINE (add_id, xmms_playlist_add_id, xmms_playlist_t *, NONE, STRING, UINT32)
 XMMS_CMD_DEFINE (add_idlist, xmms_playlist_add_idlist, xmms_playlist_t *, NONE, STRING, COLL)
 XMMS_CMD_DEFINE3 (add_coll, xmms_playlist_add_collection, xmms_playlist_t *, NONE, STRING, COLL, STRINGLIST)
 XMMS_CMD_DEFINE (clear, xmms_playlist_clear, xmms_playlist_t *, NONE, STRING, NONE)
 XMMS_CMD_DEFINE (sort, xmms_playlist_sort, xmms_playlist_t *, NONE, STRING, STRINGLIST)
 XMMS_CMD_DEFINE (list_entries, xmms_playlist_list_entries, xmms_playlist_t *, LIST, STRING, NONE)
 XMMS_CMD_DEFINE (current_pos, xmms_playlist_current_pos, xmms_playlist_t *, DICT, STRING, NONE)
 XMMS_CMD_DEFINE (current_active, xmms_playlist_current_active, xmms_playlist_t *, STRING, NONE, NONE)
 XMMS_CMD_DEFINE (set_pos, xmms_playlist_set_current_position, xmms_playlist_t *, UINT32, UINT32, NONE)
 XMMS_CMD_DEFINE (set_pos_rel, xmms_playlist_set_current_position_rel, xmms_playlist_t *, UINT32, INT32, NONE)
 XMMS_CMD_DEFINE (radd, xmms_playlist_radd, xmms_playlist_t *, NONE, STRING, STRING)
xmms_playlist_txmms_playlist_init (void)
 Initializes a new xmms_playlist_t.
gboolean xmms_playlist_advance (xmms_playlist_t *playlist)
 Go to next song in playlist according to current playlist mode.
xmms_medialib_entry_t xmms_playlist_current_entry (xmms_playlist_t *playlist)
 Retrive the currently active xmms_medialib_entry_t.
GTree * xmms_playlist_current_pos (xmms_playlist_t *playlist, gchar *plname, xmms_error_t *err)
 Retrieve the position of the currently active xmms_medialib_entry_t.
const gchar * xmms_playlist_current_active (xmms_playlist_t *playlist, xmms_error_t *err)
 Retrieve the name of the currently active playlist.
gboolean xmms_playlist_remove_by_entry (xmms_playlist_t *playlist, xmms_medialib_entry_t entry)
 Remove all additions of entry in the playlist.
gboolean xmms_playlist_add_url (xmms_playlist_t *playlist, gchar *plname, gchar *nurl, xmms_error_t *err)
 Convenient function for adding a URL to the playlist, Creates a xmms_medialib_entry_t for you and adds it to the list.
gboolean xmms_playlist_add_id (xmms_playlist_t *playlist, gchar *plname, xmms_medialib_entry_t file, xmms_error_t *err)
 Adds a xmms_medialib_entry to the playlist.
gboolean xmms_playlist_add_idlist (xmms_playlist_t *playlist, gchar *plname, xmmsc_coll_t *coll, xmms_error_t *err)
gboolean xmms_playlist_add_collection (xmms_playlist_t *playlist, gchar *plname, xmmsc_coll_t *coll, GList *order, xmms_error_t *err)
void xmms_playlist_add_entry (xmms_playlist_t *playlist, gchar *plname, xmms_medialib_entry_t file, xmms_error_t *err)
 Add an entry to the playlist without validating it.
void xmms_playlist_add_entry_unlocked (xmms_playlist_t *playlist, const gchar *plname, xmmsc_coll_t *plcoll, xmms_medialib_entry_t file, xmms_error_t *err)
 Add an entry to the playlist without locking the mutex.
guint xmms_playlist_set_current_position (xmms_playlist_t *playlist, guint32 pos, xmms_error_t *err)
xmms_mediainfo_reader_txmms_playlist_mediainfo_reader_get (xmms_playlist_t *playlist)
 returns pointer to mediainfo reader.
GTree * xmms_playlist_changed_msg_new (xmms_playlist_t *playlist, xmms_playlist_changed_actions_t type, guint32 id, const gchar *plname)
void xmms_playlist_changed_msg_send (xmms_playlist_t *playlist, GTree *dict)


Define Documentation

#define XMMS_PLAYLIST_CHANGED_MSG ( type,
id,
name   )     xmms_playlist_changed_msg_send (playlist, xmms_playlist_changed_msg_new (playlist, type, id, name))

Definition at line 94 of file playlist.c.

#define XMMS_PLAYLIST_CURRPOS_MSG ( pos,
name   )     xmms_playlist_current_pos_msg_send (playlist, xmms_playlist_current_pos_msg_new (playlist, pos, name))

Definition at line 95 of file playlist.c.

Referenced by xmms_playlist_advance(), and xmms_playlist_current_entry().


Function Documentation

XMMS_CMD_DEFINE ( radd  ,
xmms_playlist_radd  ,
xmms_playlist_t ,
NONE  ,
STRING  ,
STRING   
)

XMMS_CMD_DEFINE ( set_pos_rel  ,
xmms_playlist_set_current_position_rel  ,
xmms_playlist_t ,
UINT32  ,
INT32  ,
NONE   
)

XMMS_CMD_DEFINE ( set_pos  ,
xmms_playlist_set_current_position  ,
xmms_playlist_t ,
UINT32  ,
UINT32  ,
NONE   
)

XMMS_CMD_DEFINE ( current_active  ,
xmms_playlist_current_active  ,
xmms_playlist_t ,
STRING  ,
NONE  ,
NONE   
)

XMMS_CMD_DEFINE ( current_pos  ,
xmms_playlist_current_pos  ,
xmms_playlist_t ,
DICT  ,
STRING  ,
NONE   
)

XMMS_CMD_DEFINE ( list_entries  ,
xmms_playlist_list_entries  ,
xmms_playlist_t ,
LIST  ,
STRING  ,
NONE   
)

XMMS_CMD_DEFINE ( sort  ,
xmms_playlist_sort  ,
xmms_playlist_t ,
NONE  ,
STRING  ,
STRINGLIST   
)

XMMS_CMD_DEFINE ( clear  ,
xmms_playlist_clear  ,
xmms_playlist_t ,
NONE  ,
STRING  ,
NONE   
)

XMMS_CMD_DEFINE ( add_idlist  ,
xmms_playlist_add_idlist  ,
xmms_playlist_t ,
NONE  ,
STRING  ,
COLL   
)

XMMS_CMD_DEFINE ( add_id  ,
xmms_playlist_add_id  ,
xmms_playlist_t ,
NONE  ,
STRING  ,
UINT32   
)

XMMS_CMD_DEFINE ( add_url  ,
xmms_playlist_add_url  ,
xmms_playlist_t ,
NONE  ,
STRING  ,
STRING   
)

XMMS_CMD_DEFINE ( remove  ,
xmms_playlist_remove  ,
xmms_playlist_t ,
NONE  ,
STRING  ,
UINT32   
)

XMMS_CMD_DEFINE ( shuffle  ,
xmms_playlist_shuffle  ,
xmms_playlist_t ,
NONE  ,
STRING  ,
NONE   
)

XMMS_CMD_DEFINE ( load  ,
xmms_playlist_load  ,
xmms_playlist_t ,
NONE  ,
STRING  ,
NONE   
)

XMMS_CMD_DEFINE3 ( add_coll  ,
xmms_playlist_add_collection  ,
xmms_playlist_t ,
NONE  ,
STRING  ,
COLL  ,
STRINGLIST   
)

XMMS_CMD_DEFINE3 ( move  ,
xmms_playlist_move  ,
xmms_playlist_t ,
NONE  ,
STRING  ,
UINT32  ,
UINT32   
)

XMMS_CMD_DEFINE3 ( insert_id  ,
xmms_playlist_insert_id  ,
xmms_playlist_t ,
NONE  ,
STRING  ,
UINT32  ,
UINT32   
)

XMMS_CMD_DEFINE3 ( insert_url  ,
xmms_playlist_insert_url  ,
xmms_playlist_t ,
NONE  ,
STRING  ,
UINT32  ,
STRING   
)

XMMS_CMD_DEFINE4 ( insert_coll  ,
xmms_playlist_insert_collection  ,
xmms_playlist_t ,
NONE  ,
STRING  ,
UINT32  ,
COLL  ,
STRINGLIST   
)

GTree* xmms_playlist_changed_msg_new ( xmms_playlist_t playlist,
xmms_playlist_changed_actions_t  type,
guint32  id,
const gchar *  plname 
)

Definition at line 1636 of file playlist.c.

Referenced by xmms_playlist_add_entry_unlocked().

void xmms_playlist_changed_msg_send ( xmms_playlist_t playlist,
GTree *  dict 
)

Definition at line 1684 of file playlist.c.

Referenced by xmms_playlist_add_entry_unlocked().


Generated on Wed Dec 10 18:06:45 2008 for XMMS2 by  doxygen 1.5.6