Mercurial > pidgin
comparison libpurple/protocols/msn/slpmsg.c @ 30791:64a6ce55aa63
Move more SlpMessage creation to its module.
author | masca@cpw.pidgin.im |
---|---|
date | Sat, 12 Jun 2010 21:22:06 +0000 |
parents | 545fa069c531 |
children | 9192c59f2f84 |
comparison
equal
deleted
inserted
replaced
30790:545fa069c531 | 30791:64a6ce55aa63 |
---|---|
278 slpmsg->info = "SLP ACK"; | 278 slpmsg->info = "SLP ACK"; |
279 | 279 |
280 return slpmsg; | 280 return slpmsg; |
281 } | 281 } |
282 | 282 |
283 MsnSlpMessage *msn_slpmsg_new_obj(MsnSlpCall *slpcall,PurpleStoredImage *img) | |
284 { | |
285 MsnSlpMessage *slpmsg; | |
286 | |
287 slpmsg = msn_slpmsg_new(NULL); | |
288 slpmsg->slpcall = slpcall; | |
289 slpmsg->flags = P2P_MSN_OBJ_DATA; | |
290 slpmsg->info = "SLP DATA"; | |
291 | |
292 msn_slpmsg_set_image(slpmsg, img); | |
293 | |
294 return slpmsg; | |
295 } | |
296 | |
297 MsnSlpMessage *msn_slpmsg_new_dataprep(MsnSlpCall *slpcall) | |
298 { | |
299 MsnSlpMessage *slpmsg; | |
300 | |
301 slpmsg = msn_slpmsg_new(NULL); | |
302 slpmsg->slpcall = slpcall; | |
303 slpmsg->session_id = slpcall->session_id; | |
304 msn_slpmsg_set_body(slpmsg, NULL, 4); | |
305 slpmsg->info = "SLP DATA PREP"; | |
306 | |
307 return slpmsg; | |
308 | |
309 } | |
310 | |
311 MsnSlpMessage *msn_slpmsg_new_file(MsnSlpCall *slpcall, size_t size) | |
312 { | |
313 MsnSlpMessage *slpmsg; | |
314 | |
315 slpmsg = msn_slpmsg_new(NULL); | |
316 | |
317 slpmsg->slpcall = slpcall; | |
318 slpmsg->flags = P2P_FILE_DATA; | |
319 slpmsg->info = "SLP FILE"; | |
320 slpmsg->size = size; | |
321 | |
322 return slpmsg; | |
323 } | |
324 | |
283 char *msn_slpmsg_serialize(MsnSlpMessage *slpmsg, size_t *ret_size) | 325 char *msn_slpmsg_serialize(MsnSlpMessage *slpmsg, size_t *ret_size) |
284 { | 326 { |
285 MsnP2PHeader *header; | 327 MsnP2PHeader *header; |
286 MsnP2PFooter *footer; | 328 MsnP2PFooter *footer; |
287 char *base; | 329 char *base; |