comparison src/protocols/msn/cmdproc.h @ 8810:a7affa2e2986

[gaim-migrate @ 9572] Forgot these. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 25 Apr 2004 23:40:13 +0000
parents
children c30d81b4dd22
comparison
equal deleted inserted replaced
8809:fde4101fa183 8810:a7affa2e2986
1 /**
2 * @file cmdproc.h MSN command processor functions
3 *
4 * gaim
5 *
6 * Copyright (C) 2003, Christian Hammond <chipx86@gnupdate.org>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22 #ifndef _MSN_CMDPROC_H_
23 #define _MSN_CMDPROC_H_
24
25 typedef struct _MsnCmdProc MsnCmdProc;
26
27 #include "session.h"
28 #include "server.h"
29 #include "error.h"
30 #include "command.h"
31 #include "table.h"
32 #include "history.h"
33 #include "msg.h"
34
35 typedef void (*MsnPayloadCb)(MsnCmdProc *cmdproc, char *payload,
36 size_t len);
37
38 struct _MsnCmdProc
39 {
40 MsnSession *session;
41 MsnServConn *servconn;
42
43 GQueue *txqueue;
44
45 gboolean ready;
46 MsnErrorType error;
47
48 MsnCommand *last_cmd;
49 char *last_trans;
50
51 MsnTable *cbs_table;
52 MsnPayloadCb payload_cb;
53
54 MsnHistory *history;
55
56 GSList *msg_queue;
57
58 char *temp;
59 };
60
61 MsnCmdProc *msn_cmdproc_new(MsnSession *session);
62 void msn_cmdproc_destroy(MsnCmdProc *cmdproc);
63
64 void msn_cmdproc_process_queue(MsnCmdProc *cmdproc);
65
66 void msn_cmdproc_send_trans(MsnCmdProc *cmdproc, MsnTransaction *trans);
67 void msn_cmdproc_queue_trans(MsnCmdProc *cmdproc,
68 MsnTransaction *trans);
69 void msn_cmdproc_send(MsnCmdProc *cmdproc, const char *command,
70 const char *format, ...);
71 void msn_cmdproc_send_quick(MsnCmdProc *cmdproc, const char *command,
72 const char *format, ...);
73 void msn_cmdproc_process_msg(MsnCmdProc *cmdproc,
74 MsnMessage *msg);
75 void msn_cmdproc_process_cmd_text(MsnCmdProc *cmdproc, const char *command);
76 void msn_cmdproc_process_payload(MsnCmdProc *cmdproc,
77 char *payload, int payload_len);
78
79 void msn_cmdproc_queue_message(MsnCmdProc *cmdproc, const char *command,
80 MsnMessage *msg);
81
82 void msn_cmdproc_unqueue_message(MsnCmdProc *cmdproc, MsnMessage *msg);
83
84 #endif /* _MSN_CMDPROC_H_ */