EventsStatusRegister
From TrillWiki
The eventsStatusRegister function is for medium based plugins to register available statuses. This will allow an away message to show the options of different statuses to use.
Compatibility: 2.0 and higher
Contents |
Syntax
plugin_send(MYGUID, "eventsStatusRegister", struct event_status_register_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
EventsStatusRegister utilitizes the event_status_register_t structure.
struct event_status_register_t
{
unsigned int struct_size;
char *medium;
char *status;
char *description;
int default_status;
int event_id;
ttkCallback callback;
void *data;
/* 3.0
*/
unsigned char *png_image;
unsigned int png_image_len;
};
- medium
- The medium for the particular status.
- status
- The status string. This must not change from load to load, ie: do not change this with language changes
- description
- A string representing the above status. This may change with language changes and will be used when the above status is shown to the user.
- default_status
- If this is one of the main default statuses, this will be set accordingly. A default status can be either the default away, idle or back status. This will be used with the set globally away, set globally idle and set globally back away messages respectively. This can be set to EVENTS_STATUS_UNKNOWN, EVENTS_STATUS_AWAY, EVENTS_STATUS_BACK, EVENTS_STATUS_IDLE, EVENTS_STATUS_HIDDEN, or EVENTS_STATUS_INVISIBLE.
- callback
- The callback to call when the status is changed using an away message.
- data
- The data to send with the above callback.
Return Value
Negative value on error, event id on success.
Remarks
Be sure to unregister using eventsStatusUnregister when the plugin is stopped.
