libpurple/protocols/oscar/odc.c

branch
soc.2013.gobjectification
changeset 34622
753f46dd000f
parent 33768
20d5c960d48f
child 34627
08733a7475df
equal deleted inserted replaced
34621:66308be62d23 34622:753f46dd000f
147 147
148 /** 148 /**
149 * Send client-to-client typing notification over an established direct connection. 149 * Send client-to-client typing notification over an established direct connection.
150 */ 150 */
151 void 151 void
152 peer_odc_send_typing(PeerConnection *conn, PurpleTypingState typing) 152 peer_odc_send_typing(PeerConnection *conn, PurpleIMConversationTypingState typing)
153 { 153 {
154 OdcFrame frame; 154 OdcFrame frame;
155 155
156 memset(&frame, 0, sizeof(OdcFrame)); 156 memset(&frame, 0, sizeof(OdcFrame));
157 frame.type = 0x0001; 157 frame.type = 0x0001;
158 frame.subtype = 0x0006; 158 frame.subtype = 0x0006;
159 if (typing == PURPLE_TYPING) 159 if (typing == PURPLE_IM_CONVERSATION_TYPING)
160 frame.flags = 0x0002 | 0x0008; 160 frame.flags = 0x0002 | 0x0008;
161 else if (typing == PURPLE_TYPED) 161 else if (typing == PURPLE_IM_CONVERSATION_TYPED)
162 frame.flags = 0x0002 | 0x0004; 162 frame.flags = 0x0002 | 0x0004;
163 else 163 else
164 frame.flags = 0x0002; 164 frame.flags = 0x0002;
165 165
166 peer_odc_send(conn, &frame); 166 peer_odc_send(conn, &frame);
582 { 582 {
583 /* I had to leave this. It's just too funny. It reminds me of my sister. */ 583 /* I had to leave this. It's just too funny. It reminds me of my sister. */
584 purple_debug_info("oscar", "ohmigod! %s has started typing " 584 purple_debug_info("oscar", "ohmigod! %s has started typing "
585 "(DirectIM). He's going to send you a message! " 585 "(DirectIM). He's going to send you a message! "
586 "*squeal*\n", conn->bn); 586 "*squeal*\n", conn->bn);
587 serv_got_typing(gc, conn->bn, 0, PURPLE_TYPING); 587 serv_got_typing(gc, conn->bn, 0, PURPLE_IM_CONVERSATION_TYPING);
588 } 588 }
589 else if (frame->flags & 0x0004) 589 else if (frame->flags & 0x0004)
590 { 590 {
591 serv_got_typing(gc, conn->bn, 0, PURPLE_TYPED); 591 serv_got_typing(gc, conn->bn, 0, PURPLE_IM_CONVERSATION_TYPED);
592 } 592 }
593 else 593 else
594 { 594 {
595 serv_got_typing_stopped(gc, conn->bn); 595 serv_got_typing_stopped(gc, conn->bn);
596 } 596 }

mercurial