Ignore:
Timestamp:
2007-03-31T05:40:45Z (17 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/jabber/jabber_util.c

    rfa29d093 r0da65d5  
    4242        /* Only run this stuff if the account is online ATM,
    4343           and if the setting seems to be acceptable. */
    44         if( acc->gc )
     44        if( acc->ic )
    4545        {
    4646                /* Although set_eval functions usually are very nice and
     
    5858                /* (Yes, sorry, I prefer the hack. :-P) */
    5959               
    60                 presence_send_update( acc->gc );
     60                presence_send_update( acc->ic );
    6161        }
    6262       
     
    130130   them when you receive the response. Use this BEFORE sending the packet so
    131131   it'll get a new id= tag, and do NOT free() the packet after writing it! */
    132 void jabber_cache_add( struct gaim_connection *gc, struct xt_node *node, jabber_cache_event func )
    133 {
    134         struct jabber_data *jd = gc->proto_data;
     132void jabber_cache_add( struct im_connection *ic, struct xt_node *node, jabber_cache_event func )
     133{
     134        struct jabber_data *jd = ic->proto_data;
    135135        char *id = g_strdup_printf( "%s%05x", JABBER_CACHED_ID, ( next_id++ ) & 0xfffff );
    136136        struct jabber_cache_entry *entry = g_new0( struct jabber_cache_entry, 1 );
     
    159159   node should be available in the cache for at least a minute (assuming the
    160160   function is indeed called every minute). */
    161 void jabber_cache_clean( struct gaim_connection *gc )
    162 {
    163         struct jabber_data *jd = gc->proto_data;
     161void jabber_cache_clean( struct im_connection *ic )
     162{
     163        struct jabber_data *jd = ic->proto_data;
    164164       
    165165        g_hash_table_foreach_remove( jd->node_cache, jabber_cache_clean_entry, NULL );
     
    214214struct jabber_buddy_ask_data
    215215{
    216         struct gaim_connection *gc;
     216        struct im_connection *ic;
    217217        char *handle;
    218218        char *realname;
     
    221221static void jabber_buddy_ask_yes( gpointer w, struct jabber_buddy_ask_data *bla )
    222222{
    223         presence_send_request( bla->gc, bla->handle, "subscribed" );
    224        
    225         if( find_buddy( bla->gc, bla->handle ) == NULL )
    226                 show_got_added( bla->gc, bla->handle, NULL );
     223        presence_send_request( bla->ic, bla->handle, "subscribed" );
     224       
     225        if( find_buddy( bla->ic, bla->handle ) == NULL )
     226                show_got_added( bla->ic, bla->handle, NULL );
    227227       
    228228        g_free( bla->handle );
     
    232232static void jabber_buddy_ask_no( gpointer w, struct jabber_buddy_ask_data *bla )
    233233{
    234         presence_send_request( bla->gc, bla->handle, "subscribed" );
     234        presence_send_request( bla->ic, bla->handle, "subscribed" );
    235235       
    236236        g_free( bla->handle );
     
    238238}
    239239
    240 void jabber_buddy_ask( struct gaim_connection *gc, char *handle )
     240void jabber_buddy_ask( struct im_connection *ic, char *handle )
    241241{
    242242        struct jabber_buddy_ask_data *bla = g_new0( struct jabber_buddy_ask_data, 1 );
    243243        char *buf;
    244244       
    245         bla->gc = gc;
     245        bla->ic = ic;
    246246        bla->handle = g_strdup( handle );
    247247       
    248248        buf = g_strdup_printf( "The user %s wants to add you to his/her buddy list.", handle );
    249         do_ask_dialog( gc, buf, bla, jabber_buddy_ask_yes, jabber_buddy_ask_no );
     249        do_ask_dialog( ic, buf, bla, jabber_buddy_ask_yes, jabber_buddy_ask_no );
    250250        g_free( buf );
    251251}
     
    271271   to deal with that properly. Set their ->resource property to NULL. Do *NOT*
    272272   allow to mix this stuff, though... */
    273 struct jabber_buddy *jabber_buddy_add( struct gaim_connection *gc, char *full_jid_ )
    274 {
    275         struct jabber_data *jd = gc->proto_data;
     273struct jabber_buddy *jabber_buddy_add( struct im_connection *ic, char *full_jid_ )
     274{
     275        struct jabber_data *jd = ic->proto_data;
    276276        struct jabber_buddy *bud, *new, *bi;
    277277        char *s, *full_jid;
     
    343343   asked for a bare JID, it uses the "resource_select" setting to see which
    344344   resource to pick. */
    345 struct jabber_buddy *jabber_buddy_by_jid( struct gaim_connection *gc, char *jid_, get_buddy_flags_t flags )
    346 {
    347         struct jabber_data *jd = gc->proto_data;
     345struct jabber_buddy *jabber_buddy_by_jid( struct im_connection *ic, char *jid_, get_buddy_flags_t flags )
     346{
     347        struct jabber_data *jd = ic->proto_data;
    348348        struct jabber_buddy *bud;
    349349        char *s, *jid;
     
    371371                }
    372372               
    373                 if( bud == NULL && ( flags & GET_BUDDY_CREAT ) && find_buddy( gc, jid ) )
     373                if( bud == NULL && ( flags & GET_BUDDY_CREAT ) && find_buddy( ic, jid ) )
    374374                {
    375375                        *s = '/';
    376                         bud = jabber_buddy_add( gc, jid );
     376                        bud = jabber_buddy_add( ic, jid );
    377377                }
    378378               
     
    391391                if( bud == NULL )
    392392                        /* No match. Create it now? */
    393                         return ( ( flags & GET_BUDDY_CREAT ) && find_buddy( gc, jid_ ) ) ?
    394                                    jabber_buddy_add( gc, jid_ ) : NULL;
     393                        return ( ( flags & GET_BUDDY_CREAT ) && find_buddy( ic, jid_ ) ) ?
     394                                   jabber_buddy_add( ic, jid_ ) : NULL;
    395395                else if( bud->resource && ( flags & GET_BUDDY_EXACT ) )
    396396                        /* We want an exact match, so in thise case there shouldn't be a /resource. */
     
    409409                }
    410410               
    411                 if( ( set = set_getstr( &gc->acc->set, "resource_select" ) ) == NULL )
     411                if( ( set = set_getstr( &ic->acc->set, "resource_select" ) ) == NULL )
    412412                        return NULL;
    413413                else if( strcmp( set, "activity" ) == 0 )
     
    421421   off-line (because (s)he can still be online from a different location.
    422422   XXX: See above, we should accept bare JIDs too... */
    423 int jabber_buddy_remove( struct gaim_connection *gc, char *full_jid_ )
    424 {
    425         struct jabber_data *jd = gc->proto_data;
     423int jabber_buddy_remove( struct im_connection *ic, char *full_jid_ )
     424{
     425        struct jabber_data *jd = ic->proto_data;
    426426        struct jabber_buddy *bud, *prev, *bi;
    427427        char *s, *full_jid;
     
    495495   specified bare JID. Use this when removing someone from the contact
    496496   list, for example. */
    497 int jabber_buddy_remove_bare( struct gaim_connection *gc, char *bare_jid_ )
    498 {
    499         struct jabber_data *jd = gc->proto_data;
     497int jabber_buddy_remove_bare( struct im_connection *ic, char *bare_jid_ )
     498{
     499        struct jabber_data *jd = ic->proto_data;
    500500        struct jabber_buddy *bud, *next;
    501501        char *bare_jid;
Note: See TracChangeset for help on using the changeset viewer.