Mercurial > pidgin
comparison libpurple/protocols/qq/qq_trans.c @ 31191:4deef745de87
2010.01.23 - flos <lonicerae(at)gmail.com>
* added an option to force incoming message in chat room to use a default font instead of the font in message itself
2010.01.18 - flos <lonicerae(at)gmail.com>
* added type 'UPDCLS' and 'UID' for implementing business logic layer
2010.01.13 - ccpaging <ccpaging(at)gmail.com>
* qq2009-1 patch from ccpaging
author | SHiNE CsyFeK <csyfek@gmail.com> |
---|---|
date | Sun, 06 Feb 2011 05:23:22 +0000 |
parents | 351d07aefb09 |
children | 1bf763879b96 |
comparison
equal
deleted
inserted
replaced
31190:f0e6aaf942f8 | 31191:4deef745de87 |
---|---|
56 gint fd; | 56 gint fd; |
57 gint send_retries; | 57 gint send_retries; |
58 gint rcved_times; | 58 gint rcved_times; |
59 gint scan_times; | 59 gint scan_times; |
60 | 60 |
61 guint32 update_class; | 61 UPDCLS update_class; |
62 guint32 ship32; | 62 guint32 ship32; |
63 }; | 63 }; |
64 | 64 |
65 gboolean qq_trans_is_server(qq_transaction *trans) | 65 gboolean qq_trans_is_server(qq_transaction *trans) |
66 { | 66 { |
105 g_return_val_if_fail(trans != NULL, 0); | 105 g_return_val_if_fail(trans != NULL, 0); |
106 return trans->ship32; | 106 return trans->ship32; |
107 } | 107 } |
108 | 108 |
109 static qq_transaction *trans_create(PurpleConnection *gc, gint fd, | 109 static qq_transaction *trans_create(PurpleConnection *gc, gint fd, |
110 guint16 cmd, guint16 seq, guint8 *data, gint data_len, guint32 update_class, guint32 ship32) | 110 guint16 cmd, guint16 seq, guint8 *data, gint data_len, UPDCLS update_class, guint32 ship32) |
111 { | 111 { |
112 qq_transaction *trans; | 112 qq_transaction *trans; |
113 | 113 |
114 g_return_val_if_fail(gc != NULL, NULL); | 114 g_return_val_if_fail(gc != NULL, NULL); |
115 | 115 |
176 | 176 |
177 return NULL; | 177 return NULL; |
178 } | 178 } |
179 | 179 |
180 void qq_trans_add_client_cmd(PurpleConnection *gc, | 180 void qq_trans_add_client_cmd(PurpleConnection *gc, |
181 guint16 cmd, guint16 seq, guint8 *data, gint data_len, guint32 update_class, guint32 ship32) | 181 guint16 cmd, guint16 seq, guint8 *data, gint data_len, UPDCLS update_class, guint32 ship32) |
182 { | 182 { |
183 qq_data *qd = (qq_data *)gc->proto_data; | 183 qq_data *qd = (qq_data *)gc->proto_data; |
184 qq_transaction *trans = trans_create(gc, qd->fd, cmd, seq, data, data_len, update_class, ship32); | 184 qq_transaction *trans = trans_create(gc, qd->fd, cmd, seq, data, data_len, update_class, ship32); |
185 | 185 |
186 if (cmd == QQ_CMD_TOKEN || cmd == QQ_CMD_LOGIN || cmd == QQ_CMD_KEEP_ALIVE) { | 186 if (cmd == QQ_CMD_TOKEN || cmd == QQ_CMD_LOGIN || cmd == QQ_CMD_KEEP_ALIVE) { |
216 return trans; | 216 return trans; |
217 } | 217 } |
218 | 218 |
219 void qq_trans_add_room_cmd(PurpleConnection *gc, | 219 void qq_trans_add_room_cmd(PurpleConnection *gc, |
220 guint16 seq, guint8 room_cmd, guint32 room_id, guint8 *data, gint data_len, | 220 guint16 seq, guint8 room_cmd, guint32 room_id, guint8 *data, gint data_len, |
221 guint32 update_class, guint32 ship32) | 221 UPDCLS update_class, guint32 ship32) |
222 { | 222 { |
223 qq_data *qd = (qq_data *)gc->proto_data; | 223 qq_data *qd = (qq_data *)gc->proto_data; |
224 qq_transaction *trans = trans_create(gc, qd->fd, QQ_CMD_ROOM, seq, data, data_len, | 224 qq_transaction *trans = trans_create(gc, qd->fd, QQ_CMD_ROOM, seq, data, data_len, |
225 update_class, ship32); | 225 update_class, ship32); |
226 | 226 |