AvatarLocalGet

From TrillWiki

Jump to: navigation, search

The avatarLocalGet function will get the filename of the buddy icon set for a particular medium and connection.

Compatibility: 2.0 and higher

Contents

Syntax

plugin_send(MYGUID, "avatarLocalGet", struct avatar_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

AvatarLocalGet utilitizes the avatar_t structure.

struct avatar_t
{
	unsigned int				struct_size;

	int					connection_id;
	int					window_id;
	int					timestamp;
	int					data_length;

	char					*medium;
	char					*name;
	char					*filename;
	char					*data;

	/* 3.0
	 */
	int					force_file_size;
	int					force_image_dimensions;
	int					allowed_image_types;

	int					image_width;
	int					image_height;
	
	int					file_size;

	/* 3.1
	 */
	char					*section;
};



connection_id
The connection id associated with a connection. The buddy icons are set per connection and per medium. If you provide a name and medium, the connection id is not used.
medium
The medium to get the icon for.
name
The name of the connection to get the icon for. If you leave this as NULL, you must supply a connection id.
filename
A buffer that will be filled with the filename. The filename buffer must have allocated to support at least MAX_PATH characters.


Return Value

Returns a negative value on error, 0 on success.

Remarks

If the setting is used to use one icon for all connections, it will automatically return the default icon even if a particular connection is requested.

Note: Make sure to have a large enough buffer for MAX_PATH for the filename otherwise a memory issue may occur.


Personal tools