/*
//
// Copyright (C) 2006-2026 Jean-François DEL NERO
//
// This file is part of the HxCFloppyEmulator library
//
// HxCFloppyEmulator may be used and distributed without restriction provided
// that this copyright statement is not removed from the file and that any
// derivative work contains the original copyright notice and the associated
// disclaimer.
//
// HxCFloppyEmulator is free software; you can redistribute it
// and/or modify  it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// HxCFloppyEmulator is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//   See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with HxCFloppyEmulator; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
//
*/
// loader return code

#ifndef _INC_FLOPPY_LOADER_
#define _INC_FLOPPY_LOADER_

enum {
	GETPLUGINID = 1,
	GETDESCRIPTION = 2,
	GETFUNCPTR = 3,
	GETEXTENSION = 4,
	GETNBSUBLOADER = 5,
	SELECTSUBLOADER = 6
};

typedef int (*ISVALIDDISKFILE) (void* imgldr_ctx, HXCFE_IMGLDR_FILEINFOS * imgfile);
typedef int (*LOADDISKFILE)(void* imgldr_ctx,void * floppydisk,char * imgfile,void * parameters);
typedef int (*WRITEDISKFILE)(void* imgldr_ctx,void * floppydisk,char * imgfile,void * parameters);
typedef int (*GETPLUGININFOS)(void* imgldr_ctx,uint32_t infotype,void * returnvalue);

typedef struct plugins_ptr_
{
	ISVALIDDISKFILE libIsValidDiskFile;
	LOADDISKFILE    libLoad_DiskFile;
	WRITEDISKFILE   libWrite_DiskFile;
	GETPLUGININFOS  libGetPluginInfos;
}plugins_ptr;


int libGetPluginInfo(HXCFE_IMGLDR * imgldr_ctx,uint32_t infotype,void * returnvalue,const char * pluginid,const char * plugindesc,plugins_ptr * pluginfunc,const char * fileext);

HXCFE_FLOPPY* hxcfe_sanityCheck(HXCFE* floppycontext,HXCFE_FLOPPY * floppydisk);

#endif
