ConnectionRemove

From TrillWiki

Jump to: navigation, search

The connectionRemove function should be sent when the connection is no longer active.

Compatibility: 2.0 and higher

Contents

Syntax

plugin_send(MYGUID, "connectionRemove", struct connection_entry_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

ConnectionRemove utilitizes the connection_entry_t structure.

struct connection_entry_t {  
 	unsigned int			struct_size; 
 
 	char				*medium; 
 
 	int				connection_id; 
 
 	char				*name; 
 	char				*status; 
 
 	/* 2.0 
 	 */ 
 	char				*section; 
 	struct menu_entry_t		*menu_entry; 
 };



medium
The medium for this particular connection.
connection_id
A unique number representing the connection (ie: start at 1 and increase by one throughout the plugin load).


Return Value

Negative value on error, 0 on success.

Remarks

Do not use this function just to disconnect from the server, you may keep an open disconnected connection in Trillian. If you simply wish to disconnect, you may use connectionUpdate.

Note: The connectionRemove function generates a medium_connectionRemove notification. Do not call connectionRemove from within this notification or you will generate an infinite loop.


Personal tools