Changeset 47d3ac4 for protocols/jabber/iq.c
- Timestamp:
- 2006-10-31T08:25:41Z (17 years ago)
- Branches:
- master
- Children:
- 0d3f30f
- Parents:
- abbd8ed
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/iq.c
rabbd8ed r47d3ac4 77 77 78 78 /* Of course this is a very essential query to support. ;-) */ 79 if( strcmp( s, "jabber:iq:version") == 0 )79 if( strcmp( s, XMLNS_VERSION ) == 0 ) 80 80 { 81 81 xt_add_child( reply, xt_new_node( "name", "BitlBee", NULL ) ); … … 83 83 xt_add_child( reply, xt_new_node( "os", ARCH, NULL ) ); 84 84 } 85 else if( strcmp( s, "jabber:iq:time") == 0 )85 else if( strcmp( s, XMLNS_TIME ) == 0 ) 86 86 { 87 87 time_t time_ep; … … 97 97 xt_add_child( reply, xt_new_node( "tz", buf, NULL ) ); 98 98 } 99 else if( strcmp( s, "http://jabber.org/protocol/disco#info") == 0 )99 else if( strcmp( s, XMLNS_DISCOVER ) == 0 ) 100 100 { 101 101 c = xt_new_node( "identity", NULL, NULL ); … … 106 106 107 107 c = xt_new_node( "feature", NULL, NULL ); 108 xt_add_attr( c, "var", "jabber:iq:version");108 xt_add_attr( c, "var", XMLNS_VERSION ); 109 109 xt_add_child( reply, c ); 110 110 111 111 c = xt_new_node( "feature", NULL, NULL ); 112 xt_add_attr( c, "var", "jabber:iq:time");112 xt_add_attr( c, "var", XMLNS_TIME ); 113 113 xt_add_child( reply, c ); 114 114 115 115 c = xt_new_node( "feature", NULL, NULL ); 116 xt_add_attr( c, "var", "http://jabber.org/protocol/chatstates");116 xt_add_attr( c, "var", XMLNS_CHATSTATES ); 117 117 xt_add_child( reply, c ); 118 118 … … 136 136 } 137 137 138 if( strcmp( s, "jabber:iq:roster") == 0 )138 if( strcmp( s, XMLNS_ROSTER ) == 0 ) 139 139 { 140 140 int bare_len = strlen( gc->acc->user ); … … 198 198 199 199 node = xt_new_node( "query", NULL, xt_new_node( "username", jd->username, NULL ) ); 200 xt_add_attr( node, "xmlns", "jabber:iq:auth");200 xt_add_attr( node, "xmlns", XMLNS_AUTH ); 201 201 node = jabber_make_packet( "iq", "get", NULL, node ); 202 202 … … 218 218 /* Time to authenticate ourselves! */ 219 219 reply = xt_new_node( "query", NULL, NULL ); 220 xt_add_attr( reply, "xmlns", "jabber:iq:auth");220 xt_add_attr( reply, "xmlns", XMLNS_AUTH ); 221 221 xt_add_child( reply, xt_new_node( "username", jd->username, NULL ) ); 222 222 xt_add_child( reply, xt_new_node( "resource", set_getstr( &gc->acc->set, "resource" ), NULL ) ); … … 322 322 323 323 node = xt_new_node( "query", NULL, NULL ); 324 xt_add_attr( node, "xmlns", "jabber:iq:roster");324 xt_add_attr( node, "xmlns", XMLNS_ROSTER ); 325 325 node = jabber_make_packet( "iq", "get", NULL, node ); 326 326 … … 391 391 392 392 node = xt_new_node( "vCard", NULL, NULL ); 393 xt_add_attr( node, "xmlns", "vcard-temp");393 xt_add_attr( node, "xmlns", XMLNS_VCARD ); 394 394 node = jabber_make_packet( "iq", "get", bare_jid, node ); 395 395 … … 536 536 /* And pack it into a roster-add packet */ 537 537 node = xt_new_node( "query", NULL, node ); 538 xt_add_attr( node, "xmlns", "jabber:iq:roster");538 xt_add_attr( node, "xmlns", XMLNS_ROSTER ); 539 539 node = jabber_make_packet( "iq", "set", NULL, node ); 540 540 … … 557 557 /* And pack it into a roster-add packet */ 558 558 node = xt_new_node( "query", NULL, node ); 559 xt_add_attr( node, "xmlns", "jabber:iq:roster");559 xt_add_attr( node, "xmlns", XMLNS_ROSTER ); 560 560 node = jabber_make_packet( "iq", "set", NULL, node ); 561 561
Note: See TracChangeset
for help on using the changeset viewer.