Contact displayNameChange

From TrillWiki

Jump to: navigation, search

The contact_displayNameChange notification is sent whenever the display name is altered by the user. This could happen both when it is updated by the plugin or when it is changed using inline editing.

Compatibility: 2.0 and higher

Contents

Syntax

callback(int window_id, char *icontrol, "contact_displayNameChange", contactlist_entry_t *data, void *userData);

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

Contact displayNameChange utilitizes the contactlist_entry_t structure.

struct contactlist_entry_t
{
    unsigned int                struct_size;

    char                        *medium;

    int                        connection_id;

    char                        *name;
    char                        *real_name;
    char                        *status;

    /* 2.0 enhancement
     */
    char                        *section;
    char                        *uri;
    char                        *tooltip;

    int                         status_score;
    int                         status_idle;
    int                         status_block;

    struct group_entry_t        *group;
    struct menu_entry_t         *menu_entry;

    ttkCallback                 callback;
    void                        *data;

    /* 3.0 
     */
    int                         status_warned;
    int                         status_time;
    int                         status_idle_time;

    char                        *status_message;
};



medium
Medium for the the contact.
name
The display name for the contact, which is what has changed.
real_name
The address associated with the contact.
status
The current status of the contact.
section
The Contact List the contact belongs to. A NULL will specify the default section (My Contacts).
uri
A URI to associate with the contact when saving it to disk.
tooltip
The default tooltip for the contact when not using the enhanced tooltips.
status_idle
Set to 1 if the medium supports non-status based idling and the contact is idle.
status_block
Set to 1 if the contact is blocked.
group
The group to for the contact.
menu_entry
The menu for the contact.
callback
The callback for this contact.
data
The user data to send with each notification sent to the callback.


Return Value

Must return 0.

Remarks

You may receive this event more than once for each connection id the contact is on. If there are no connection id's associated with the contact, it will send it once with a connection id of -1.


Personal tools