|libdexterplugin Reference Manual|
Libdexterplugin is the plugin support library for Libdexter. Installed as part of the Libdexter package, plugin writers use Libdexterplugin to create plugins for Libdexter. It provides the base object class from which all plugins must derive, as well as the definitions of the interface(s) that must be implemented in order for the plugin to operate. Additionally, there are interfaces back to the main library that plugins may utilize, e.g. for version information and for configuration file access.
Plugin writers need a working knowledge of the GObject object system. It is recommended that you review the GObject tutorial before proceeding. Libdexter plugins are GTypeModule's that load "on-demand" instead of staying resident forever. When a GTypeModule is first loaded (during Libdexter initialization) it registers its GObject-based types with the GType system and then unloads. Whenever one of its registered types is instantiated, the type module reloads automatically and stays loaded for the life of the object. Once the object is destroyed, and assuming no other of its object types is instantiated, the module unloads until needed again, and so on.
Libdexter plugins define and register GObject types. Within Libdexter, these types are called services, with collections of services called service groups. A plugin may register one or more services. A mechanism exists within Libdexter to authorize specific services for use on any platform, so while a plugin may implement, e.g. five services, perhaps only two of them will be authorized for use. Each service defines serialization code so that data produced by the service may move over the network. One interesting way to develop different services may be to focus on different serialization techniques, e.g. one service uses XML, another uses binary, etc.
Plugin writers must also provide one or more public headers with their plugins so that programmers using Libdexter may manipulate the data that the plugin produces. Refer to the Guidelines section for information on naming conventions and locations for plugin public headers. Adhering to the guidelines is highly recommended in order to provide programmers and end-users an organized, consistent view of all Libdexter-packaged and third-party plugins.