Difference between revisions of "Importer Plugin SDK"
(New page: To improve ''rapid detection prototyping'', OpenSBI Edit Lite allows software developers to add their own importer plugins for custom data sources. ==User details== If you get a new p...)
Latest revision as of 20:14, 27 May 2008
To improve rapid detection prototyping, OpenSBI Edit Lite allows software developers to add their own importer plugins for custom data sources.
If you get a new plugin, its name will usually start with IP, and it will be of the Application Extension (.dll) format. You need to close the editor if it is still open, put the file into its Plugins subfolder, and restart the editor. The new plugin will appear inside it's File: Import menu.
Importer plugins are standard DLLs that need to export 7 functions, which are using the stdcall calling convention.
The GetDisplayName* functions are used to get the name for File: Import menu (do not include the prefix Import or trailing dots), with the return value of GetAuthorName* shown in the hint of the menu item as the source of the plugin. ShowDialog is called when the user clicks the menu item, and the GetData* functions should return the SBI contents created if ShowDialog was successful.
function GetAuthorNameLen: cardinal; stdcall; function GetAuthorName(const Name: PChar; const Len: cardinal): boolean; stdcall; function GetDisplayNameLen: cardinal; stdcall; function GetDisplayName(const Name: PChar; const Len: cardinal): boolean; stdcall; function ShowDialog: boolean; stdcall; function GetDataLen: cardinal; stdcall; function GetData(const Name: PChar; const Len: cardinal): boolean; stdcall;
See Pascal example; cardinal equals an unsigned integer, PChar is a char* and boolean a bool.
A demo plugin is available (TODO: add link).