////////////////////////////////////////////////////////////////////////////////
//
// File   : Asura_PS3_GameContent.h
// Author : Anthony Gregson
//
// Copyright (C) 2009 Rebellion, All Rights Reserved.
//
// Wrapper for the game content utility functions. Non-static to allow for
// multiple types of content.
//
////////////////////////////////////////////////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
	#pragma once
#endif

#ifndef __ASURA_PS3_GAMECONTENT_H__
#define __ASURA_PS3_GAMECONTENT_H__

////////////////////////////////////////////////////////////////////////////////
// Include files...
////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////
// Class declaration...
////////////////////////////////////////////////////////////////////////////////

#define ASURA_PS3_CONTENT_DIRECTORY_BUFFER_SIZE 128

class Asura_PS3_GameContent
{
public:
	// Initialisation functions - handles loading and unloading the module.
	static void Initialise();
	static void Shutdown();

	// Creation functions for the class, so that appropriate initialisation and shutdown can be done without calling code needing to know much about how it works.
	static Asura_PS3_GameContent* CreateDiscContent(); // Disc content must pass NULL as its directory name.
	static Asura_PS3_GameContent* CreateHDDContent(); // HDD content must use the product code only as the directory.
	static Asura_PS3_GameContent* CreateGameDataContent(const char* szDirectoryNameSuffix = NULL); // Game data content uses the product code plus some arbitrary string (including empty).
	// TODO - we probably need a version designed for writing new game content, such as for patches.

	static void DestroyContent(Asura_PS3_GameContent* pxContentToDestroy);

	const char* GetContentInformationDirectory() { return m_acContentInformationDirectoryBuffer; }
	const char* GetUsrDirectory() { return m_acUsrDirectoryBuffer; }

private:

	Asura_PS3_GameContent(u_int uType);
	~Asura_PS3_GameContent();

	char m_acContentInformationDirectoryBuffer[ASURA_PS3_CONTENT_DIRECTORY_BUFFER_SIZE];
	char m_acUsrDirectoryBuffer[ASURA_PS3_CONTENT_DIRECTORY_BUFFER_SIZE];

	static bool s_bInitialised; // In case initialisation fails, since the creation of content will crash if we haven't initialised properly.
};

#endif //#ifndef __ASURA_PS3_GAMECONTENT_H__