/////////////////////////////////////////////////////////////
// CINEMA 4D SDK                                           //
/////////////////////////////////////////////////////////////
// (c) MAXON Computer GmbH, all rights reserved            //
/////////////////////////////////////////////////////////////

//---------------------------------------------------
#ifndef _C4D_BATCHRENDER_H_
#define _C4D_BATCHRENDER_H_

#ifdef __API_INTERN__
#include "c4d_basetime.h"
#include "ge_string.h"
#include "c4d_library.h"
#include "c4d_gui.h"
#else
#include "c4d.h"
#endif

class GeListNode;
class Filename;
class BaseBitmap;
class BaseDocument;
class String;
class BaseSound;

#define C4D_BATCHRENDER_LIBRARY_ID		465003507

#define BR_STOP		1
#define BR_START	2

//render flags
enum 
{
	RM_PROGRESS = 1000,
	RM_FINISHED,
	RM_STOPPED,
	RM_ERROR,
	RM_ERROR2,
	RM_PAUSED,
	RM_QUEUE, //means is in queue but not rendered yet

	RM_NONE,
};

class BatchRender
{
	private:
		BatchRender();
		~BatchRender();
	public:
		Bool Open(void);
		Bool AddFile(const Filename &File, LONG number);
		Bool DelFile(const Filename &File);

		Bool IsRendering();
		void SetRendering(LONG set);

		LONG GetElementCount();
		
		Filename GetElement(LONG n);
		void EnableElement(LONG n, Bool bSet);
		Bool GetEnableElement(LONG n);

		LONG GetElementStatus(LONG n);
};

BatchRender* GetBatchRender();

//---------------------------------------------------
//	---INTERNAL STUFF

class iBatchRender;

struct BatchRenderLibrary : public C4DLibrary
{
	iBatchRender*	(*GetBatchRender)();

	Bool					(*Open)(iBatchRender *this_ptr);
	Bool					(*AddFile)(iBatchRender *this_ptr, const Filename &File, LONG number);
	Bool					(*DelFile)(iBatchRender *this_ptr, const Filename &File);

	Bool					(*IsRendering)(iBatchRender *this_ptr);
	void					(*SetRendering)(iBatchRender *this_ptr, LONG set);


	LONG					(*GetElementCount)(iBatchRender *this_ptr);

	Filename			(*GetElement)(iBatchRender *this_ptr, LONG n);
	void					(*EnableElement)(iBatchRender *this_ptr, LONG n, Bool bSet);
	Bool					(*GetEnableElement)(iBatchRender *this_ptr, LONG n);

	LONG					(*GetElementStatus)(iBatchRender *this_ptr, LONG n);
};

#endif

