XMMS2
|
00001 /* XMMS2 - X Music Multiplexer System 00002 * Copyright (C) 2003-2011 XMMS2 Team 00003 * 00004 * PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!! 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 */ 00016 00017 00018 00019 00020 #ifndef __XMMS_PLAYLIST_H__ 00021 #define __XMMS_PLAYLIST_H__ 00022 00023 #include <glib.h> 00024 00025 00026 /* 00027 * Public definitions 00028 */ 00029 00030 /* 00031 * Private defintions 00032 */ 00033 00034 #define XMMS_MAX_URI_LEN 1024 00035 #define XMMS_MEDIA_DATA_LEN 1024 00036 #define XMMS_MAX_INT_ATTRIBUTE_LEN 64 00037 #define XMMS_DEFAULT_PARTYSHUFFLE_UPCOMING 10 00038 00039 00040 struct xmms_playlist_St; 00041 typedef struct xmms_playlist_St xmms_playlist_t; 00042 00043 #include "xmms/xmms_error.h" 00044 #include "xmms/xmms_medialib.h" 00045 #include "xmmspriv/xmms_mediainfo.h" 00046 00047 /* 00048 * Public functions 00049 */ 00050 00051 xmms_playlist_t * xmms_playlist_init (void); 00052 00053 gboolean xmms_playlist_advance (xmms_playlist_t *playlist); 00054 xmms_medialib_entry_t xmms_playlist_current_entry (xmms_playlist_t *playlist); 00055 void xmms_playlist_add_entry_unlocked (xmms_playlist_t *playlist, const const gchar *plname, xmmsv_coll_t *plcoll, xmms_medialib_entry_t file, xmms_error_t *err); 00056 GList * xmms_playlist_list (xmms_playlist_t *playlist, const gchar *plname, xmms_error_t *err); 00057 gboolean xmms_playlist_remove_by_entry (xmms_playlist_t *playlist, xmms_medialib_entry_t entry); 00058 00059 void xmms_playlist_add_entry (xmms_playlist_t *playlist, const gchar *plname, xmms_medialib_entry_t file, xmms_error_t *err); 00060 void xmms_playlist_insert_entry (xmms_playlist_t *playlist, const gchar *plname, guint32 pos, xmms_medialib_entry_t file, xmms_error_t *err); 00061 00062 xmms_mediainfo_reader_t *xmms_playlist_mediainfo_reader_get (xmms_playlist_t *playlist); 00063 00064 00065 GTree *xmms_playlist_changed_msg_new (xmms_playlist_t *playlist, xmms_playlist_changed_actions_t type, xmms_medialib_entry_t id, const gchar *plname); 00066 void xmms_playlist_changed_msg_send (xmms_playlist_t *playlist, GTree *dict); 00067 00068 #define XMMS_PLAYLIST_COLLECTION_CHANGED_MSG(playlist, name) xmms_playlist_changed_msg_send (playlist, xmms_playlist_changed_msg_new (playlist, XMMS_PLAYLIST_CHANGED_UPDATE, 0, name)) 00069 00070 /* 00071 * Entry modifications 00072 */ 00073 00074 00075 #endif