~micahg/ubuntu/natty/pidgin/2.7.9-2

« back to all changes in this revision

Viewing changes to libpurple/protocols/msn/table.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-12-02 16:45:52 UTC
  • mfrom: (2.3.14 sid)
  • Revision ID: james.westby@ubuntu.com-20101202164552-z64wykojzacbb546
Tags: 1:2.7.7-1ubuntu1
New upstream version, drop msn workaround

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
struct _MsnTable
36
36
{
37
 
        GHashTable *cmds;
38
 
        GHashTable *msgs;
39
 
        GHashTable *errors;
 
37
        GHashTable *cmds;               /**< Callbacks that manage command response. */
 
38
        GHashTable *msgs;               /**< Callbacks that manage incoming messages. */
 
39
        GHashTable *errors;     /**< Callbacks that manage command errors. */
40
40
 
41
 
        GHashTable *async;
42
 
        GHashTable *fallback;
 
41
        GHashTable *async;              /**< Callbacks that manage incoming asyncronous messages. */
 
42
        /* TODO: Does this one is really needed? */
 
43
        GHashTable *fallback;   /**< Fallback callback. */
43
44
};
44
45
 
 
46
/**
 
47
 * Create a new instance of a MsnTable which map commands, errors and messages
 
48
 * with callbacks that will handle it.
 
49
 *
 
50
 * @return A new MsnTable.
 
51
 */
45
52
MsnTable *msn_table_new(void);
 
53
 
 
54
/**
 
55
 * Destroy a MsnTable.
 
56
 *
 
57
 * @param table The MsnTable to be destroyed.
 
58
 */
46
59
void msn_table_destroy(MsnTable *table);
47
60
 
 
61
/**
 
62
 * Relate an incomming command from server with a callback able to handle
 
63
 * the event.
 
64
 *
 
65
 * @param table         The MsnTable.
 
66
 * @param command       If NULL this add an incoming asyncronous command set in answer.
 
67
 *                                      Else, the command sent.
 
68
 * @param answer        The server answer to 'command'. If 'command' is NULL,
 
69
 *                                      the asyncronous command sent by the server.
 
70
 * @param cb            Callback to handle this event.
 
71
 */
48
72
void msn_table_add_cmd(MsnTable *table, char *command, char *answer,
49
73
                                           MsnTransCb cb);
 
74
 
 
75
/**
 
76
 * Set a callback to handle incoming command errors.
 
77
 *
 
78
 * @param table         The MsnTable.
 
79
 * @param answer        Incoming command with error.
 
80
 * @param cb            Callback to handle this error.
 
81
 */
50
82
void msn_table_add_error(MsnTable *table, char *answer, MsnErrorCb cb);
 
83
 
 
84
/**
 
85
 * Relate a message Content-type with a callback able to handle it.
 
86
 *
 
87
 * @param table         The MsnTable.
 
88
 * @param type          The Message Content-Type.
 
89
 * @param cb            Callback to handle this Content-type.
 
90
 */
51
91
void msn_table_add_msg_type(MsnTable *table, char *type, MsnMsgTypeCb cb);
52
92
 
53
93
#endif /* MSN_TABLE_H */