#include "c4d_general.h"
#include "c4d_ctrackplugin.h"
#include "c4d_resource.h"

Bool CTrackData::Animate(CTrack *track, const CAnimInfo *info, Bool *chg, void *data)
{
	return TRUE;
}

LONG CTrackData::GuiMessage(CTrack *track, const BaseContainer &msg,BaseContainer &result)
{
	return TRUE;
}

Bool CTrackData::Draw(CTrack *track, GeClipMap *map, const BaseTime &clip_left, const BaseTime &clip_right)
{
	return TRUE;
}

LONG CTrackData::GetHeight(CTrack *track)
{
	return 0;
}

Bool CTrackData::FillKey(CTrack *track, BaseDocument *doc, BaseList2D *bl, CKey *key)
{
	return TRUE;
}

Bool CTrackData::TrackInformation(CTrack *track, BaseDocument *doc, CKey *key, String *str, Bool set)
{
	return FALSE;
}

Bool CTrackData::KeyMessage(CTrack *track, CKey *node, LONG type, void *data)
{
	return TRUE;
}

Bool CTrackData::KeyGetDDescription(CTrack *track, CKey *node, Description *description,LONG &flags)
{
	return TRUE;
}

Bool CTrackData::KeyGetDEnabling(CTrack *track, CKey *node, const DescID &id,GeData &t_data,LONG flags,const BaseContainer *itemdesc)
{
	return TRUE;
}

Bool CTrackData::KeyGetDParameter(CTrack *track, CKey *node, const DescID &id,GeData &t_data,LONG &flags)
{
	return TRUE;
}

Bool CTrackData::KeySetDParameter(CTrack *track, CKey *node, const DescID &id,const GeData &t_data,LONG &flags)
{
	return TRUE;
}

Bool RegisterCTrackPlugin(LONG id, const String &str, LONG info, DataAllocator *npalloc, const String &description, LONG disklevel)
{
	if (description.Content() && !RegisterDescription(id,description)) return FALSE;
	
	CTRACKPLUGIN np;
	ClearMem(&np,sizeof(np));
	FillNodePlugin(&np,info,npalloc,NULL,disklevel);
	
	np.Animate						= &CTrackData::Animate;
	np.GuiMessage					= &CTrackData::GuiMessage;
	np.Draw								= &CTrackData::Draw;
	np.GetHeight					= &CTrackData::GetHeight;
	np.FillKey						= &CTrackData::FillKey;
	np.TrackInformation	  = &CTrackData::TrackInformation;
	np.KeyMessage					= &CTrackData::KeyMessage;
	np.KeyGetDDescription	= &CTrackData::KeyGetDDescription;
	np.KeyGetDParameter		= &CTrackData::KeyGetDParameter;
	np.KeyGetDEnabling		= &CTrackData::KeyGetDEnabling;
	np.KeySetDParameter		= &CTrackData::KeySetDParameter;

	return GeRegisterPlugin(C4DPL_CTRACK,id,str,&np,sizeof(np));
}


