#ifndef _LI_TITLEKEY
#define _LI_TITLEKEY 1
#include <dvdcss.h>
#include <lib9660.h>
#include <vector>

typedef struct sectorInfo {
	uint32_t startSector;
	uint32_t endSector;
} sectorInfo;

namespace Li::Dvd {
	class TitleKey {
	private:
		static bool readSector(l9660_fs* fs, void* buf, uint32_t sector);
		static bool readDir(l9660_dir* dir, int depth);
	public:
		static bool FindTitleKeys(dvdcss_t drive);
		static uint32_t GetDistanceToNextFile(uint32_t currentSector);
		static bool IsSectorInFile(uint32_t currentSector);
		static sectorInfo* GetSectorInfo(uint32_t currentSector);
		static void FreeMemory();
	};
}

#endif