Accounts interfaceAdd

From TrillWiki

Jump to: navigation, search

The accounts_interfaceAdd notification is sent to an account's callback when the user has finished entering the data for a new account.

Compatibility: 3.0 and higher

Contents

Syntax

callback(int window_id, char *icontrol, "accounts_interfaceAdd", account_interface_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

Accounts interfaceAdd utilitizes the account_interface_entry_t structure.

struct account_interface_entry_t
{
    unsigned int                struct_size;

    struct account_entry_t      *account;

    char                        *name;

    char                        *type;
    char                        *description;
    char                        *value;

    struct account_interface_entry_t    *next_entry;
};



name
The name of this element.
value
The current value of this element.
next_entry
The next entry in the list.


Return Value

Return 1 if the account was alright to add, 0 if data is still missing.

Remarks

You will want to pull the values out of the account_interface_entry_t list and validate them. If all are alright, add the account, otherwise return 0 and explain in a message box why the account was not added.


Personal tools