#ifndef LEVEL_H_INCLUDED
#define LEVEL_H_INCLUDED

#include "config.h"

#include <string>
#include <vector>
#include <vlc/vlc.h>

class MediaInfo {
public:
	typedef enum MediaType { MT_NONE, MT_VIDEO, MT_IMAGE } MediaType;

	MediaInfo(libvlc_instance_t *instance, const char *pathname);
	~MediaInfo();
	const inline char *GetFileName() { return m_path_name.c_str(); }
	const inline MediaType GetMediaType() { return m_media_type; }
	inline libvlc_media_t *GetMedia() { return m_vlc_media; }

protected:
	MediaType m_media_type;
	std::string m_path_name;
	libvlc_media_t *m_vlc_media;

	static const char *m_image_types[];
	static const char *m_video_types[];
};


class Level {
public:
	Level(libvlc_instance_t *instance, const std::string &root_path, const char dircode);
	~Level();

	libvlc_media_t *GetThis();
	libvlc_media_t *StepNext();
	libvlc_media_t *StepPrev();
	int GetCount() { return m_files.size(); }
	inline int GetIndex() { return m_index; }
protected:
	libvlc_instance_t *m_instance;
	int m_index;
	std::vector<MediaInfo *> m_files;
};

#endif // LEVEL_H_INCLUDED
