comparison mcabber/mcabber/xmpp_iq.c @ 1729:e6e89b1d7831

Minor style and header updates
author Mikael Berthe <mikael@lilotux.net>
date Sun, 28 Feb 2010 15:19:27 +0100
parents 44e023ad99ed
children e4378fbab5d7
comparison
equal deleted inserted replaced
1728:15b3834cbe5f 1729:e6e89b1d7831
1 /* 1 /*
2 * xmpp_iq.c -- Jabber protocol IQ-related stuff 2 * xmpp_iq.c -- Jabber protocol IQ-related stuff
3 * 3 *
4 * Copyright (C) 2008-2009 Frank Zschockelt <mcabber@freakysoft.de> 4 * Copyright (C) 2008-2010 Frank Zschockelt <mcabber@freakysoft.de>
5 * Copyright (C) 2005-2009 Mikael Berthe <mikael@lilotux.net> 5 * Copyright (C) 2005-2010 Mikael Berthe <mikael@lilotux.net>
6 * Parts come from the centericq project: 6 * Parts come from the centericq project:
7 * Copyright (C) 2002-2005 by Konstantin Klyagin <konst@konst.org.ua> 7 * Copyright (C) 2002-2005 by Konstantin Klyagin <konst@konst.org.ua>
8 * Some small parts come from the Pidgin project <http://pidgin.im/> 8 * Some small parts come from the Pidgin project <http://pidgin.im/>
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
381 "label", "Groupchats: ", 381 "label", "Groupchats: ",
382 NULL); 382 NULL);
383 lm_message_node_add_child(field, "required", NULL); 383 lm_message_node_add_child(field, "required", NULL);
384 384
385 foreach_buddy(ROSTER_TYPE_ROOM, &_callback_foreach_buddy_groupchat, field); 385 foreach_buddy(ROSTER_TYPE_ROOM, &_callback_foreach_buddy_groupchat, field);
386 //TODO: return an error if we are not connected to groupchats 386 // TODO: return an error if we are not connected to groupchats
387 } else if (action && !strcmp(action, "cancel")) { 387 } else if (action && !strcmp(action, "cancel")) {
388 lm_message_node_set_attribute(command, "status", "canceled"); 388 lm_message_node_set_attribute(command, "status", "canceled");
389 } else { // (if sessionid and not canceled) 389 } else { // (if sessionid and not canceled)
390 LmMessageNode *form = lm_message_node_find_xmlns(x, "jabber:x:data");//TODO 390 LmMessageNode *form = lm_message_node_find_xmlns(x, "jabber:x:data");// TODO
391 if (form) { 391 if (form) {
392 LmMessageNode *field; 392 LmMessageNode *field;
393 393
394 lm_message_node_set_attribute(command, "status", "completed"); 394 lm_message_node_set_attribute(command, "status", "completed");
395 //TODO: implement sth. like "field?var=groupchats" in xmlnode... 395 // TODO: implement sth. like "field?var=groupchats" in xmlnode...
396 field = lm_message_node_get_child(form, "field"); 396 field = lm_message_node_get_child(form, "field");
397 while (field && strcmp("groupchats", 397 while (field && strcmp("groupchats",
398 lm_message_node_get_attribute(field, "var"))) 398 lm_message_node_get_attribute(field, "var")))
399 field = field->next; 399 field = field->next;
400 400