Mercurial > hg
comparison mcabber/src/jab_iq.c @ 1255:ceada40bbe20
Update Entity Capabilities (add iq:last)
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Fri, 22 Jun 2007 20:24:19 +0200 |
parents | 401639413340 |
children | 704adf4df2d0 |
comparison
equal
deleted
inserted
replaced
1254:401639413340 | 1255:ceada40bbe20 |
---|---|
110 // if you alter mcabber's disco support (or add something to the version | 110 // if you alter mcabber's disco support (or add something to the version |
111 // number) so that it doesn't conflict with the official client. | 111 // number) so that it doesn't conflict with the official client. |
112 const char *entity_version(void) | 112 const char *entity_version(void) |
113 { | 113 { |
114 static char *ver; | 114 static char *ver; |
115 const char *PVERSION = PACKAGE_VERSION "+iql"; | |
115 | 116 |
116 if (ver) | 117 if (ver) |
117 return ver; | 118 return ver; |
118 | 119 |
119 #ifdef HGCSET | 120 #ifdef HGCSET |
120 ver = g_strdup_printf("%s-%s", PACKAGE_VERSION, HGCSET); | 121 ver = g_strdup_printf("%s-%s", PVERSION, HGCSET); |
121 #else | 122 #else |
122 ver = g_strdup(PACKAGE_VERSION); | 123 ver = g_strdup(PVERSION); |
123 #endif | 124 #endif |
124 | 125 |
125 return ver; | 126 return ver; |
126 } | 127 } |
127 | 128 |
1299 if (!strcasecmp(ext, "csn")) { | 1300 if (!strcasecmp(ext, "csn")) { |
1300 // I guess it's ok to send this even if it's not compiled in. | 1301 // I guess it's ok to send this even if it's not compiled in. |
1301 xmlnode_put_attrib(xmlnode_insert_tag(ansquery, "feature"), | 1302 xmlnode_put_attrib(xmlnode_insert_tag(ansquery, "feature"), |
1302 "var", NS_CHATSTATES); | 1303 "var", NS_CHATSTATES); |
1303 } | 1304 } |
1305 if (!strcasecmp(ext, "iql")) { | |
1306 // I guess it's ok to send this even if it's not compiled in. | |
1307 xmlnode_put_attrib(xmlnode_insert_tag(ansquery, "feature"), | |
1308 "var", NS_LAST); | |
1309 } | |
1304 } | 1310 } |
1305 | 1311 |
1306 // disco_info_set_default(ansquery, entitycaps) | 1312 // disco_info_set_default(ansquery, entitycaps) |
1307 // Add features attributes to ansquery. If entitycaps is TRUE, assume | 1313 // Add features attributes to ansquery. If entitycaps is TRUE, assume |
1308 // that we're answering an Entity Caps request (if not, the request was | 1314 // that we're answering an Entity Caps request (if not, the request was |
1339 "var", NS_VERSION); | 1345 "var", NS_VERSION); |
1340 xmlnode_put_attrib(xmlnode_insert_tag(ansquery, "feature"), | 1346 xmlnode_put_attrib(xmlnode_insert_tag(ansquery, "feature"), |
1341 "var", NS_PING); | 1347 "var", NS_PING); |
1342 xmlnode_put_attrib(xmlnode_insert_tag(ansquery, "feature"), | 1348 xmlnode_put_attrib(xmlnode_insert_tag(ansquery, "feature"), |
1343 "var", NS_COMMANDS); | 1349 "var", NS_COMMANDS); |
1350 if (!entitycaps) | |
1351 xmlnode_put_attrib(xmlnode_insert_tag(ansquery, "feature"), | |
1352 "var", NS_LAST); | |
1344 } | 1353 } |
1345 | 1354 |
1346 static void handle_iq_disco_info(jconn conn, char *from, const char *id, | 1355 static void handle_iq_disco_info(jconn conn, char *from, const char *id, |
1347 xmlnode xmldata) | 1356 xmlnode xmldata) |
1348 { | 1357 { |