
#include "library/library.h"
#include <libsaria/callback.h>
#include <libsaria/track.h>

#include <list>
using namespace std;

static Library library;

void libsaria_add_library(string dir)
{
	library.add_path(dir);
	library.update_path(dir);
}

void libsaria_refresh_library()
{
	trigger_callback(LIBRARY_REFRESH);
}

void libsaria_library_list(list<Track> &track_list)
{
	library.list_all(track_list);
}

void libsaria_play_id(ino_t inode)
{
	library.play_id(inode);
}

void libsaria_library_save()
{
	library.save();
}

void libsaria_library_load()
{
	library.load();
}
