Runtime interface for mkd64 modules. More...
#include <mkd64/imodule.h>
Public Attributes | |
const char *(* | id )(void) |
Get id of the module, for runtime identification. | |
void(* | free )(IModule *self) |
Delete the current module instance. | |
void(* | initImage )(IModule *self, Image *image) |
Initialize the module, called whenever the module is loaded. | |
int(* | globalOption )(IModule *self, char opt, const char *arg) |
Handle a global cmdline option. | |
int(* | fileOption )(IModule *self, DiskFile *file, char opt, const char *arg) |
Handle a file cmdline option. | |
Track *(* | getTrack )(IModule *self, int track) |
Get extra tracks, if provided by the module. | |
void(* | fileWritten )(IModule *self, DiskFile *file, const BlockPosition *start) |
Called after a file was written to the disk image. | |
void(* | statusChanged )(IModule *self, const BlockPosition *pos) |
Called after the status of any block changed. | |
int(* | requestReservedBlock )(IModule *self, const BlockPosition *pos) |
Called when someone else wants a block reserved by this module. | |
void(* | imageComplete )(IModule *self) |
Called after all files were written to the image. |
Runtime interface for mkd64 modules.
Handle a file cmdline option.
May be left unimplemented.
self | the module instance |
file | the file concerned by the option |
opt | the option |
arg | the option argument |
void(* IModule::fileWritten)(IModule *self, DiskFile *file, const BlockPosition *start) |
Called after a file was written to the disk image.
May be left unimplemented. Use this e.g. to write directory entries
self | the module instance |
file | the file that was just written |
start | the starting track/sector position where the file was written |
void(* IModule::free)(IModule *self) |
Delete the current module instance.
self | the module instance |
Get extra tracks, if provided by the module.
May be left unimplemented.
self | the module instance |
track | the number of the track to get |
int(* IModule::globalOption)(IModule *self, char opt, const char *arg) |
Handle a global cmdline option.
May be left unimplemented.
self | the module instance |
opt | the option |
arg | the option argument |
const char*(* IModule::id)(void) |
Get id of the module, for runtime identification.
void(* IModule::imageComplete)(IModule *self) |
Called after all files were written to the image.
May be left unimplemented. Use this e.g. to suggest better options or to print some stats to stdout.
self | the module instance |
Initialize the module, called whenever the module is loaded.
May be left unimplemented.
self | the module instance |
image | the image to work on |
int(* IModule::requestReservedBlock)(IModule *self, const BlockPosition *pos) |
Called when someone else wants a block reserved by this module.
May be left unimplemented. This has the same result as always returning 0, all requests will be rejected.
self | the module instance |
pos | the position of the reserved block requested |
void(* IModule::statusChanged)(IModule *self, const BlockPosition *pos) |
Called after the status of any block changed.
May be left unimplemented. Use this e.g. to write allocation maps
self | the module instance |
pos | the position of the block that changed its status |