/*
 *
 *  Copyright (C) 2004 Mark Humphreys <marquee@users.sourceforge.net>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 */


#ifndef __IRIVERDB_H__
#define __IRIVERDB_H__

typedef struct
{
  	gchar *album;           /* Album */
  	gchar *artist;          /* Artist */
  	gchar *title;           /* Title */
  	gchar *genre;           /* Genre */
	gchar *filename;	/* Path of entry */  
} iRiverTrack;

typedef struct
{
	gchar *name;            /* Name of playlist */
	gchar *path;		/* Path of playlist entry */
    	GList *song_ids;       	/* Tracks in playlist */
} iRiverPlaylist;

enum _iRiverItemType {
	IRIVER_ITEM_SONG,
	IRIVER_ITEM_PLAYLIST
};
typedef enum _iRiverItemType iRiverItemType;

struct _iRiverItem {
	iRiverItemType type;
	gpointer data;
};
typedef struct _iRiverItem iRiverItem;

typedef struct _iRiverParser iRiverParser;

iRiverParser *iriver_parser_new (const gchar *mount_point);
void iriver_parser_destroy (iRiverParser *parser);
iRiverItem *iriver_get_next_item (iRiverParser *parser);
gchar *iriverdb_get_track_name_on_iriver (const gchar *path, iRiverTrack *s);
void iriver_item_destroy (iRiverItem *item);

#endif 
