Documentation
¶
Overview ¶
This package exports the following C functions: - ss_instance_t* plugin_open(ss_plugin_t* s, char* params, ss_plugin_rc* rc) - void plugin_close(ss_plugin_t* s, ss_instance_t* h)
The exported plugin_open requires s to be a handle of cgo.Handle from this SDK. The value of the s handle must implement the sdk.LastError interface. plugin_open calls the function set with SetOnOpen, which returns a sdk.InstanceState interface. If the return value implements the sdk.Events interface, the function checks if an instance of sdk.EventWriters has already been set. If not, a default one is created on the fly and set with the SetEvents method.
The exported plugin_close requires h to be a handle of cgo.Handle from this SDK. If the value of the h handle implements the sdk.Closer interface, the function calls its Close method. If sdk.Events is implemented the function calls the Free method on the returned sdk.EventWriters. Finally, the function deletes the h cgo.Handle.
This function is part of the plugin_api interface as defined in plugin_api.h. In almost all cases, your plugin should import this module, unless your plugin exports those symbols by other means.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.