Ignore:
Timestamp:
2007-03-31T05:40:45Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
aef4828
Parents:
fa29d093
Message:

s/gaim_connection/im_connection/ and some other minor API changes. The rest
will come tomorrow. It compiles, I'll leave the real testing up to someone
else. ;-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn_util.c

    rfa29d093 r0da65d5  
    2828#include <ctype.h>
    2929
    30 int msn_write( struct gaim_connection *gc, char *s, int len )
    31 {
    32         struct msn_data *md = gc->proto_data;
     30int msn_write( struct im_connection *ic, char *s, int len )
     31{
     32        struct msn_data *md = ic->proto_data;
    3333        int st;
    3434       
     
    3636        if( st != len )
    3737        {
    38                 hide_login_progress_error( gc, "Short write() to main server" );
    39                 signoff( gc );
     38                hide_login_progress_error( ic, "Short write() to main server" );
     39                signoff( ic );
    4040                return( 0 );
    4141        }
     
    4444}
    4545
    46 int msn_logged_in( struct gaim_connection *gc )
    47 {
    48         account_online( gc );
     46int msn_logged_in( struct im_connection *ic )
     47{
     48        account_online( ic );
    4949       
    5050        return( 0 );
    5151}
    5252
    53 int msn_buddy_list_add( struct gaim_connection *gc, char *list, char *who, char *realname_ )
    54 {
    55         struct msn_data *md = gc->proto_data;
     53int msn_buddy_list_add( struct im_connection *ic, char *list, char *who, char *realname_ )
     54{
     55        struct msn_data *md = ic->proto_data;
    5656        char buf[1024], *realname;
    5757       
     
    5959       
    6060        g_snprintf( buf, sizeof( buf ), "ADD %d %s %s %s\r\n", ++md->trId, list, who, realname );
    61         if( msn_write( gc, buf, strlen( buf ) ) )
     61        if( msn_write( ic, buf, strlen( buf ) ) )
    6262        {
    6363                g_free( realname );
     
    7171}
    7272
    73 int msn_buddy_list_remove( struct gaim_connection *gc, char *list, char *who )
    74 {
    75         struct msn_data *md = gc->proto_data;
     73int msn_buddy_list_remove( struct im_connection *ic, char *list, char *who )
     74{
     75        struct msn_data *md = ic->proto_data;
    7676        char buf[1024];
    7777       
    7878        g_snprintf( buf, sizeof( buf ), "REM %d %s %s\r\n", ++md->trId, list, who );
    79         if( msn_write( gc, buf, strlen( buf ) ) )
     79        if( msn_write( ic, buf, strlen( buf ) ) )
    8080                return( 1 );
    8181       
     
    8585struct msn_buddy_ask_data
    8686{
    87         struct gaim_connection *gc;
     87        struct im_connection *ic;
    8888        char *handle;
    8989        char *realname;
     
    9292static void msn_buddy_ask_yes( gpointer w, struct msn_buddy_ask_data *bla )
    9393{
    94         msn_buddy_list_add( bla->gc, "AL", bla->handle, bla->realname );
    95        
    96         if( find_buddy( bla->gc, bla->handle ) == NULL )
    97                 show_got_added( bla->gc, bla->handle, NULL );
     94        msn_buddy_list_add( bla->ic, "AL", bla->handle, bla->realname );
     95       
     96        if( find_buddy( bla->ic, bla->handle ) == NULL )
     97                show_got_added( bla->ic, bla->handle, NULL );
    9898       
    9999        g_free( bla->handle );
     
    104104static void msn_buddy_ask_no( gpointer w, struct msn_buddy_ask_data *bla )
    105105{
    106         msn_buddy_list_add( bla->gc, "BL", bla->handle, bla->realname );
     106        msn_buddy_list_add( bla->ic, "BL", bla->handle, bla->realname );
    107107       
    108108        g_free( bla->handle );
     
    111111}
    112112
    113 void msn_buddy_ask( struct gaim_connection *gc, char *handle, char *realname )
     113void msn_buddy_ask( struct im_connection *ic, char *handle, char *realname )
    114114{
    115115        struct msn_buddy_ask_data *bla = g_new0( struct msn_buddy_ask_data, 1 );
    116116        char buf[1024];
    117117       
    118         bla->gc = gc;
     118        bla->ic = ic;
    119119        bla->handle = g_strdup( handle );
    120120        bla->realname = g_strdup( realname );
     
    123123                    "The user %s (%s) wants to add you to his/her buddy list.",
    124124                    handle, realname );
    125         do_ask_dialog( gc, buf, bla, msn_buddy_ask_yes, msn_buddy_ask_no );
     125        do_ask_dialog( ic, buf, bla, msn_buddy_ask_yes, msn_buddy_ask_no );
    126126}
    127127
Note: See TracChangeset for help on using the changeset viewer.