Changeset 573dab0 for protocols


Ignore:
Timestamp:
2010-04-13T10:20:04Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
81186cab
Parents:
3a9b123
Message:

Incoming typing notifications.

Location:
protocols
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • protocols/bee.h

    r3a9b123 r573dab0  
    7171        gboolean (*user_status)( bee_t *bee, struct bee_user *bu, struct bee_user *old );
    7272        gboolean (*user_msg)( bee_t *bee, bee_user_t *bu, const char *msg, time_t sent_at );
     73        gboolean (*user_typing)( bee_t *bee, bee_user_t *bu, guint32 flags );
    7374       
    7475        struct file_transfer* (*ft_in_start)( bee_t *bee, bee_user_t *bu, const char *file_name, size_t file_size );
  • protocols/bee_user.c

    r3a9b123 r573dab0  
    194194                imcb_log( ic, "Message from unknown handle %s:\n%s", handle, msg );
    195195}
     196
     197void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags )
     198{
     199        bee_user_t *bu;
     200       
     201        if( ic->bee->ui->user_typing &&
     202            ( bu = bee_user_by_handle( ic->bee, ic, handle ) ) )
     203        {
     204                ic->bee->ui->user_typing( ic->bee, bu, flags );
     205        }
     206}
  • protocols/nogaim.c

    r3a9b123 r573dab0  
    525525        query_add( (irc_t *) ic->bee->ui_data, ic, s,
    526526                   imcb_ask_add_cb_yes, imcb_ask_add_cb_no, data );
    527 }
    528 
    529 void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags )
    530 {
    531 #if 0
    532         user_t *u;
    533        
    534         if( !set_getbool( &ic->bee->set, "typing_notice" ) )
    535                 return;
    536        
    537         if( ( u = user_findhandle( ic, handle ) ) )
    538         {
    539                 char buf[256];
    540                
    541                 g_snprintf( buf, 256, "\1TYPING %d\1", ( flags >> 8 ) & 3 );
    542                 irc_privmsg( ic->irc, u, "PRIVMSG", ic->irc->nick, NULL, buf );
    543         }
    544 #endif
    545527}
    546528
Note: See TracChangeset for help on using the changeset viewer.