PluginExternalEnumerateAPI

From TrillWiki

Jump to: navigation, search

The pluginExternalEnumerateAPI function will enumerate through the external api's that are currently registered with Trillian.

Compatibility: 2.0 and higher

Contents

Syntax

plugin_send(MYGUID, "pluginExternalEnumerateAPI", struct plugin_external_enum_t *);

Note that all Trillian functions and notifications begin with a lower-case letter, despite the Wiki requirement that all pages start with a capital letter.

Parameters

PluginExternalEnumerateAPI utilitizes the plugin_external_enum_t structure.

struct plugin_external_enum_t {  
 	unsigned int				struct_size; 
 
 	char					*type; 
 
 	ttkCallback				callback; 
 	void					*data; 
 };


type
The type of API to look for. Leave this as NULL to enumerate all.
callback
The callback to use for the enumeration.
data
The data to send along with the above callback.


Return Value

Negative value on error, 0 on success.

Remarks

This plugin will enumerate using the Enumeration Notifications as specified in that section of the docs. Each enum_add call will carry a plugin_external_t record.


Related Structures

plugin_external_t

struct plugin_external_t {  
 	unsigned int				struct_size; 
 	 
 	char					*guid; 
 
 	char					*event; 
 	char					*data; 
 };
Personal tools