MessageSend

From TrillWiki

Jump to: navigation, search

Will send a message to a particular user on a certain connection for a certain medium.

Compatibility: 1.0 and higher

Contents

Syntax

plugin_send(MYGUID, "messageSend", struct message_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

MessageSend utilitizes the message_t structure.

struct message_t
{
    unsigned int                struct_size;

    char                        *medium;
    int                         connection_id;

    char                        *name;
    char                        *type;
    char                        *text;

    char                        *location;

    void                        *extra_information;
    
    /* 2.0 
     */
    int                         window_id;
    unsigned int                extra_information_size;
    unsigned int                time_stamp;

    char                        *display_name;
    char                        *section;

    /* 3.0
     */
    struct capability_t         *capability_list;
    int                         text_len;
    int                         message_id;
};



medium
The medium to send the message on.
connection_id
The connection to send the message on.
name
Destination name to send the message to.
type
Type of message to send. "outgoing" is the only type allowed currently.
text
Text to send.


Return Value

Negative value on error, 0 on success.

Remarks

The medium may not always be installed or connected to, so you may wish to enumerate the connections prior to sending.


Personal tools