comparison libpurple/protocols/msn/cmdproc.h @ 31292:47b6eda87723

propagate from branch 'im.pidgin.pidgin' (head 07d0765c444a097af45c2650f54323afb900a07b) to branch 'im.pidgin.soc.2010.msn-tlc' (head f3998422a4724ab424e4e2328f58fc0504856557)
author masca@cpw.pidgin.im
date Mon, 19 Jul 2010 21:11:32 +0000
parents e8e4c4207d30
children 6ce4f2272abc
comparison
equal deleted inserted replaced
30698:e874875a74a7 31292:47b6eda87723
25 #define MSN_CMDPROC_H 25 #define MSN_CMDPROC_H
26 26
27 typedef struct _MsnCmdProc MsnCmdProc; 27 typedef struct _MsnCmdProc MsnCmdProc;
28 28
29 #include "command.h" 29 #include "command.h"
30 #include "error.h"
31 #include "history.h" 30 #include "history.h"
32 #include "servconn.h" 31 #include "servconn.h"
33 #include "session.h" 32 #include "session.h"
34 #include "table.h" 33 #include "table.h"
35 34
49 GHashTable *multiparts; /**< Multi-part message ID's */ 48 GHashTable *multiparts; /**< Multi-part message ID's */
50 49
51 void *data; /**< Extra data, like the switchboard. */ 50 void *data; /**< Extra data, like the switchboard. */
52 }; 51 };
53 52
53 /**
54 * Creates a MsnCmdProc structure.
55 *
56 * @param session The session to associate with.
57 *
58 * @return A new MsnCmdProc structure.
59 */
54 MsnCmdProc *msn_cmdproc_new(MsnSession *session); 60 MsnCmdProc *msn_cmdproc_new(MsnSession *session);
61
62 /**
63 * Destroys an MsnCmdProc.
64 *
65 * @param cmdproc The object structure.
66 */
55 void msn_cmdproc_destroy(MsnCmdProc *cmdproc); 67 void msn_cmdproc_destroy(MsnCmdProc *cmdproc);
56 68
69 /**
70 * Process the queued transactions.
71 *
72 * @param cmdproc The MsnCmdProc.
73 */
57 void msn_cmdproc_process_queue(MsnCmdProc *cmdproc); 74 void msn_cmdproc_process_queue(MsnCmdProc *cmdproc);
58 75
76 /**
77 * Sends transaction using this servconn.
78 *
79 * @param cmdproc The MsnCmdProc to be used.
80 * @param trans The MsnTransaction to be sent.
81 */
59 void msn_cmdproc_send_trans(MsnCmdProc *cmdproc, MsnTransaction *trans); 82 void msn_cmdproc_send_trans(MsnCmdProc *cmdproc, MsnTransaction *trans);
83
84 /**
85 * Add a transaction to the queue to be processed latter.
86 *
87 * @param cmdproc The MsnCmdProc in which the transaction will be queued.
88 * @param trans The MsnTransaction to be queued.
89 */
60 void msn_cmdproc_queue_trans(MsnCmdProc *cmdproc, 90 void msn_cmdproc_queue_trans(MsnCmdProc *cmdproc,
61 MsnTransaction *trans); 91 MsnTransaction *trans);
62 void msn_cmdproc_send(MsnCmdProc *cmdproc, const char *command,
63 const char *format, ...);
64 void msn_cmdproc_send_quick(MsnCmdProc *cmdproc, const char *command,
65 const char *format, ...);
66 92
67 void msn_cmdproc_process_msg(MsnCmdProc *cmdproc, 93 void msn_cmdproc_process_msg(MsnCmdProc *cmdproc,
68 MsnMessage *msg); 94 MsnMessage *msg);
69 void msn_cmdproc_process_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd); 95 void msn_cmdproc_process_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd);
70 void msn_cmdproc_process_cmd_text(MsnCmdProc *cmdproc, const char *command); 96 void msn_cmdproc_process_cmd_text(MsnCmdProc *cmdproc, const char *command);