AvatarLocalSet
From TrillWiki
The avatarLocalSet function will set the local buddy icon for a particular medium and account.
Compatibility: 2.0 and higher
Contents |
Syntax
plugin_send(MYGUID, "avatarLocalSet", 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
AvatarLocalSet 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.
- data_length
- The amount of data provided in the data field.
- medium
- The medium to set the icon for. A medium of "default" will set the global buddy icon (that is not set with any connection).
- name
- The name of the connection to set the icon for. If you leave this as NULL, you must either be setting the default icon or supply a connection id.
- filename
- The filename for the buddy icon. The file can currently be in png, gif, jpg, jp2, ico or bmp file formats.
- data
- The data for the buddy icon if the filename is not provided. The data_length field contains how much data is within this field.
Return Value
Returns a negative value on error, 0 on success.
Remarks
None.
