Skip to content
Mason Bially edited this page Jun 27, 2013 · 1 revision

Description:

MIP (Madz Inter-plugin protocol) provides a method for communicating between plugins regardless of their implementation details.

Plugin Format

Plugins are expected to be shared objects (viable for the operating system and architecture at hand) with the following visible symbols:

  • ___madz_INIT: Initialization function which takes 1) a pointer to an array of pointers to depends plugins, 2) a pointer to a pointer where the address to this plugin should be stored.
  • ___madz_INITIMPORTS: Import initialization function which takes 1) a pointer to an array of pointers to imports plugins.

Plugin Initialization

After the plugin is loaded, it is immediately initialized by calling ___madz_INIT. The depends passed to this function are guaranteed to have already been initialized. Later, after all requirements have been loaded ___madz_INITIMPORTS is called, being passed an array of initialized imports.

Variables Structure

Variables structures follow a specific order to guarantee reproducibility, and a bit of speed:

  • Pointers
  • Functions
  • Values

Keys are ordered by the following sorts:

  • Prefer structs
  • Alphabetic

Clone this wiki locally