comparison mcabber/src/jabglue.c @ 272:7f2e61392b2e

Add resource priority option
author mikael@matrix
date Sun, 03 Jul 2005 20:54:45 +0100
parents 5f8b529412bd
children 4d7040cff8ee
comparison
equal deleted inserted replaced
271:3c07026f1b47 272:7f2e61392b2e
36 #define JABBER_AGENT_GROUP "Jabber Agents" 36 #define JABBER_AGENT_GROUP "Jabber Agents"
37 37
38 jconn jc; 38 jconn jc;
39 time_t LastPingTime; 39 time_t LastPingTime;
40 unsigned int KeepaliveDelay; 40 unsigned int KeepaliveDelay;
41 static unsigned int prio;
41 static int s_id = 1; // FIXME which use?? 42 static int s_id = 1; // FIXME which use??
42 static int regmode, regdone; 43 static int regmode, regdone;
43 static enum imstatus mystatus = offline; 44 static enum imstatus mystatus = offline;
44 unsigned char online; 45 unsigned char online;
45 46
163 void jb_set_keepalive_delay(unsigned int delay) 164 void jb_set_keepalive_delay(unsigned int delay)
164 { 165 {
165 KeepaliveDelay = delay; 166 KeepaliveDelay = delay;
166 } 167 }
167 168
169 inline void jb_set_priority(unsigned int priority)
170 {
171 prio = priority;
172 }
173
168 void jb_main() 174 void jb_main()
169 { 175 {
170 xmlnode x, z; 176 xmlnode x, z;
171 char *cid; 177 char *cid;
172 178
260 266
261 default: 267 default:
262 break; 268 break;
263 } 269 }
264 270
265 /* TODO 271 if (prio) {
266 if (!add["prio"].empty()) 272 char strprio[8];
273 snprintf(strprio, 8, "%u", prio);
267 xmlnode_insert_cdata(xmlnode_insert_tag(x, "priority"), 274 xmlnode_insert_cdata(xmlnode_insert_tag(x, "priority"),
268 add["prio"].c_str(), (unsigned) -1); 275 strprio, (unsigned) -1);
269 */ 276 }
270 277
271 if (!msg) { 278 if (!msg) {
272 msg = ""; // FIXME 279 msg = ""; // FIXME
273 //msg = imstatus2str(st); 280 //msg = imstatus2str(st);
274 } 281 }