/** @file asyncopfilehandler.h
 *  rwfilesystem AsyncOp implementation of IFileHandler
 *	@author Chris Burns (cburns@ea.com)
 *
 *	Core Technology UI
 *	(c) 2012 Electronic Arts Inc. 
 */

#ifndef EABASETYPESASYNCOP_ASYNCOPFILEHANDLER_H_
#define EABASETYPESASYNCOP_ASYNCOPFILEHANDLER_H_

#include "EABaseTypesPlus/asyncfilehandler.h"

namespace EA
{
	namespace Types
	{
		/*! @class	AsyncOpFileHandler asyncopfilehandler.h	"EABaseTypesAsyncOp/asyncopfilehandler.h"
		*	@brief	Implementation of IFileHandler using rwfilesystem AsyncOps. Loads raw
		*	memory buffers and wraps them as IFileResources
		*/
		class AsyncOpFileHandler : public AsyncFileHandler
		{
		public:

			explicit AsyncOpFileHandler(EA::Allocator::ICoreAllocator* allocator, const char* root);

			virtual bool Exists(EA::Allocator::ICoreAllocator* allocator, const char* fileName);

			virtual EA::Types::IFileResourceReturn Load(EA::Allocator::ICoreAllocator* allocator, const char* fileName);

		private:

			AsyncOpFileHandler(const AsyncOpFileHandler& other);
			AsyncOpFileHandler& operator=(const AsyncOpFileHandler& rhs);
		};
	}
}

#endif /* EABASETYPESASYNCOP_ASYNCOPFILEHANDLER_H_ */
