Changeset 4a0614e
- Timestamp:
- 2006-09-21T09:37:03Z (18 years ago)
- Branches:
- master
- Children:
- 5bcf70a
- Parents:
- dd788bb
- Location:
- protocols/jabber
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/io.c
rdd788bb r4a0614e 170 170 } 171 171 172 static gboolean jabber_start_stream( struct gaim_connection *gc );173 174 172 gboolean jabber_connected_plain( gpointer data, gint source, b_input_condition cond ) 175 173 { … … 210 208 }; 211 209 212 staticgboolean jabber_start_stream( struct gaim_connection *gc )210 gboolean jabber_start_stream( struct gaim_connection *gc ) 213 211 { 214 212 struct jabber_data *jd = gc->proto_data; … … 236 234 return st; 237 235 } 236 237 gboolean jabber_end_stream( struct gaim_connection *gc ) 238 { 239 struct jabber_data *jd = gc->proto_data; 240 char eos[] = "</stream:stream>"; 241 242 /* Let's only do this if the queue is currently empty, otherwise it'd 243 take too long anyway. */ 244 if( jd->tx_len > 0 ) 245 return TRUE; 246 else 247 return jabber_write( gc, eos, strlen( eos ) ); 248 } -
protocols/jabber/jabber.c
rdd788bb r4a0614e 91 91 struct jabber_data *jd = gc->proto_data; 92 92 93 jabber_end_stream( gc ); 94 93 95 if( jd->r_inpa >= 0 ) 94 96 b_event_remove( jd->r_inpa ); … … 109 111 static int jabber_send_im( struct gaim_connection *gc, char *who, char *message, int len, int away ) 110 112 { 111 return 0; 113 struct xt_node *node; 114 int st; 115 116 node = xt_new_node( "body", message, NULL ); 117 node = jabber_make_packet( "message", "chat", who, node ); 118 st = jabber_write_packet( gc, node ); 119 xt_free_node( node ); 120 121 return st; 112 122 } 113 123 -
protocols/jabber/jabber.h
rdd788bb r4a0614e 56 56 int jabber_write( struct gaim_connection *gc, char *buf, int len ); 57 57 gboolean jabber_connected_plain( gpointer data, gint source, b_input_condition cond ); 58 gboolean jabber_start_stream( struct gaim_connection *gc ); 59 gboolean jabber_end_stream( struct gaim_connection *gc ); 58 60 59 61 struct jabber_data -
protocols/jabber/presence.c
rdd788bb r4a0614e 26 26 xt_status jabber_pkt_presence( struct xt_node *node, gpointer data ) 27 27 { 28 struct gaim_connection *gc = data; 28 29 char *from = xt_find_attr( node, "from" ); 30 char *type = xt_find_attr( node, "type" ); /* NULL should mean the person is online. */ 31 char *s; 29 32 30 printf( "Received PRES from %s:\n", from ); 31 xt_print( node ); 33 if( !from ) 34 return XT_HANDLED; 35 36 s = strchr( from, '/' ); 37 if( s ) 38 *s = 0; 39 40 if( type == NULL ) 41 serv_got_update( gc, from, 1, 0, 0, 0, 0, 0 ); 42 else if( strcmp( type, "unavailable" ) == 0 ) 43 serv_got_update( gc, from, 0, 0, 0, 0, 0, 0 ); 44 else 45 { 46 printf( "Received PRES from %s:\n", from ); 47 xt_print( node ); 48 } 49 50 if( s ) 51 *s = '/'; 32 52 33 53 return XT_HANDLED; -
protocols/jabber/xmltree.c
rdd788bb r4a0614e 305 305 struct xt_node *c; 306 306 307 printf( "%s\n", xt_to_string( node ) );308 return;309 310 307 /* Indentation */ 311 308 for( c = node; c->parent; c = c->parent )
Note: See TracChangeset
for help on using the changeset viewer.