comparison src/server.c @ 3001:87fff45fa36b

[gaim-migrate @ 3014] Improved typing notification for Yahoo so that it sends and recieves notification that the user has stopped typing. Also, combined serv_send_typing and serv_send_typing_stopped... expect the same with serv_got_typing_stopped. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 04 Mar 2002 04:18:02 +0000
parents 7239a392486c
children 8851d33517e9
comparison
equal deleted inserted replaced
3000:6d95285533df 3001:87fff45fa36b
142 update_keepalive(gc, TRUE); 142 update_keepalive(gc, TRUE);
143 } 143 }
144 144
145 /* This should return the elapsed time in seconds in which Gaim will not send 145 /* This should return the elapsed time in seconds in which Gaim will not send
146 * typing notifications. 146 * typing notifications.
147 * if it returns zero, it will not send any more typing notifications */ 147 * if it returns zero, it will not send any more typing notifications
148 int serv_send_typing(struct gaim_connection *g, char *name) { 148 * typing is a flag - TRUE for typing, FALSE for stopped typing */
149 int serv_send_typing(struct gaim_connection *g, char *name, int typing) {
149 if (g && g->prpl && g->prpl->send_typing) 150 if (g && g->prpl && g->prpl->send_typing)
150 return g->prpl->send_typing(g, name); 151 return g->prpl->send_typing(g, name, typing);
151 else return 0; 152 else return 0;
152 }
153
154 void serv_send_typing_stopped(struct gaim_connection *g, char *name) {
155 if (g && g->prpl && g->prpl->send_typing_stopped)
156 g->prpl->send_typing_stopped(g, name);
157 } 153 }
158 154
159 int serv_send_im(struct gaim_connection *gc, char *name, char *message, int flags) 155 int serv_send_im(struct gaim_connection *gc, char *name, char *message, int flags)
160 { 156 {
161 int val = -EINVAL; 157 int val = -EINVAL;
163 val = gc->prpl->send_im(gc, name, message, flags); 159 val = gc->prpl->send_im(gc, name, message, flags);
164 160
165 if (!(flags & IM_FLAG_AWAY)) 161 if (!(flags & IM_FLAG_AWAY))
166 serv_touch_idle(gc); 162 serv_touch_idle(gc);
167 163
168 serv_send_typing_stopped(gc, name); 164 serv_send_typing(gc, name, FALSE);
169 return val; 165 return val;
170 } 166 }
171 167
172 void serv_get_info(struct gaim_connection *g, char *name) 168 void serv_get_info(struct gaim_connection *g, char *name)
173 { 169 {