diff options
Diffstat (limited to 'bindings/python/gpod.i')
| -rw-r--r-- | bindings/python/gpod.i | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bindings/python/gpod.i b/bindings/python/gpod.i index 610a288..a516916 100644 --- a/bindings/python/gpod.i +++ b/bindings/python/gpod.i @@ -20,6 +20,17 @@ PyObject* sw_get_tracks(Itdb_iTunesDB *itdb) { return list; } +PyObject* sw_get_playlist_tracks(Itdb_Playlist *pl) { + PyObject *list; + gint i; + GList *l; + list = PyList_New(g_list_length(pl->members)); + for (l = pl->members, i = 0; l; l = l->next, ++i) { + PyList_SET_ITEM(list, i, SWIG_NewPointerObj((void*)(l->data), SWIGTYPE_p_Itdb_Track, 0)); + } + return list; + } + PyObject* sw_get_playlists(Itdb_iTunesDB *itdb) { PyObject *list; gint i; @@ -37,6 +48,10 @@ typedef int gboolean; typedef int gint32; typedef unsigned int guint32; +#define G_BEGIN_DECLS +#define G_END_DECLS + PyObject* sw_get_tracks(Itdb_iTunesDB *itdb); PyObject* sw_get_playlists(Itdb_iTunesDB *itdb); +PyObject* sw_get_playlist_tracks(Itdb_Playlist *pl); %include "../../src/itdb.h" |
