Changeset 192b80a


Ignore:
Timestamp:
2006-03-31T07:12:27Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
755ae5b
Parents:
a014331
Message:

Removed some unused stuff from nogaim.h, preparing to fix some API issues there.

Location:
protocols
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.c

    ra014331 r192b80a  
    18851885}
    18861886
    1887 static void jabber_set_idle(struct gaim_connection *gc, int idle) {
    1888         struct jabber_data *jd = (struct jabber_data *)gc->proto_data;
    1889         jd->idle = idle ? time(NULL) - idle : idle;
    1890 }
    1891 
    18921887static void jabber_keepalive(struct gaim_connection *gc) {
    18931888        struct jabber_data *jd = (struct jabber_data *)gc->proto_data;
    18941889        gjab_send_raw(jd->gjc, "  \t  ");
    1895 }
    1896 
    1897 static void jabber_buddy_free(struct buddy *b)
    1898 {
    1899         while (b->proto_data) {
    1900                 g_free(((GSList *)b->proto_data)->data);
    1901                 b->proto_data = g_slist_remove(b->proto_data, ((GSList *)b->proto_data)->data);
    1902         }
    19031890}
    19041891
     
    23382325}
    23392326
    2340 
    2341 static GList *jabber_actions()
    2342 {
    2343         GList *m = NULL;
    2344 
    2345         m = g_list_append(m, _("Set User Info"));
    2346         /*
    2347         m = g_list_append(m, _("Set Dir Info"));
    2348         m = g_list_append(m, _("Change Password"));
    2349          */
    2350 
    2351         return m;
    2352 }
    2353 
    2354 
    23552327void jabber_init()
    23562328{
    23572329        struct prpl *ret = g_new0(struct prpl, 1);
    23582330
    2359         /* the NULL's aren't required but they're nice to have */
    23602331        ret->name = "jabber";
    23612332        ret->away_states = jabber_away_states;
    2362         ret->actions = jabber_actions;
    23632333        ret->login = jabber_login;
    23642334        ret->close = jabber_close;
     
    23682338        ret->set_away = jabber_set_away;
    23692339        ret->get_away = jabber_get_away_msg;
    2370         ret->set_idle = jabber_set_idle;
    23712340        ret->add_buddy = jabber_add_buddy;
    23722341        ret->remove_buddy = jabber_remove_buddy;
    2373         ret->add_permit = NULL;
    2374         ret->add_deny = NULL;
    2375         ret->rem_permit = NULL;
    2376         ret->rem_deny = NULL;
    2377         ret->set_permit_deny = NULL;
    23782342        ret->keepalive = jabber_keepalive;
    2379         ret->buddy_free = jabber_buddy_free;
    23802343        ret->alias_buddy = jabber_roster_update;
    23812344        ret->group_buddy = jabber_group_change;
  • protocols/nogaim.h

    ra014331 r192b80a  
    6969
    7070/* ok. now the fun begins. first we create a connection structure */
    71 struct gaim_connection {
    72         /* we need to do either oscar or TOC */
    73         /* we make this as an int in case if we want to add more protocols later */
     71struct gaim_connection
     72{
    7473        struct prpl *prpl;
    7574        guint32 flags;
    7675       
     76        /* each connection then can have its own protocol-specific data */
     77        void *proto_data;
     78       
    7779        /* all connections need an input watcher */
    7880        int inpa;
     81        guint keepalive;
    7982       
    8083        /* buddy list stuff. there is still a global groups for the buddy list, but
     
    8487        int permdeny;
    8588       
    86         /* all connections need a list of chats, even if they don't have chat */
    87         GSList *buddy_chats;
    88        
    89         /* each connection then can have its own protocol-specific data */
    90         void *proto_data;
    91        
    9289        struct aim_user *user;
    9390       
     
    9592        char displayname[128];
    9693        char password[32];
    97         guint keepalive;
    98         /* stuff needed for per-connection idle times */
    99         guint idle_timer;
    100         time_t login_time;
    101         time_t lastsent;
    102         int is_idle;
    10394       
    10495        char *away;
    105         int is_auto_away;
    10696       
    10797        int evil;
     
    110100        /* BitlBee */
    111101        irc_t *irc;
    112         int lstitems;  /* added for msnP8 */
    113102       
    114103        struct conversation *conversations;
     
    164153        const char *name;
    165154
    166         /* for ICQ and Yahoo, who have off/on per-conversation options */
    167         /* char *checkbox; this should be per-connection */
    168 
    169         GList *(* away_states)(struct gaim_connection *gc);
    170         GList *(* actions)();
    171         void   (* do_action)(struct gaim_connection *, char *);
    172         /* user_opts returns a GList* of g_malloc'd struct proto_user_opts */
    173         GList *(* user_opts)();
    174         GList *(* chat_info)(struct gaim_connection *);
    175 
    176         /* all the server-related functions */
    177 
    178         /* a lot of these (like get_dir) are protocol-dependent and should be removed. ones like
    179          * set_dir (which is also protocol-dependent) can stay though because there's a dialog
    180          * (i.e. the prpl says you can set your dir info, the ui shows a dialog and needs to call
    181          * set_dir in order to set it) */
    182 
    183155        void (* login)          (struct aim_user *);
     156        void (* keepalive)      (struct gaim_connection *);
    184157        void (* close)          (struct gaim_connection *);
     158       
    185159        int  (* send_im)        (struct gaim_connection *, char *who, char *message, int len, int away);
    186         int  (* send_typing)    (struct gaim_connection *, char *who, int typing);
    187         void (* set_info)       (struct gaim_connection *, char *info);
    188         void (* get_info)       (struct gaim_connection *, char *who);
    189160        void (* set_away)       (struct gaim_connection *, char *state, char *message);
    190161        void (* get_away)       (struct gaim_connection *, char *who);
    191         void (* set_idle)       (struct gaim_connection *, int idletime);
     162        int  (* send_typing)    (struct gaim_connection *, char *who, int typing);
     163       
    192164        void (* add_buddy)      (struct gaim_connection *, char *name);
     165        void (* group_buddy)    (struct gaim_connection *, char *who, char *old_group, char *new_group);
    193166        void (* remove_buddy)   (struct gaim_connection *, char *name, char *group);
    194167        void (* add_permit)     (struct gaim_connection *, char *name);
     
    197170        void (* rem_deny)       (struct gaim_connection *, char *name);
    198171        void (* set_permit_deny)(struct gaim_connection *);
     172       
     173        void (* set_info)       (struct gaim_connection *, char *info);
     174        void (* get_info)       (struct gaim_connection *, char *who);
     175        void (* alias_buddy)    (struct gaim_connection *, char *who);  /* save/store buddy's alias on server list/roster */
     176       
     177        /* Group chat stuff. */
    199178        void (* join_chat)      (struct gaim_connection *, GList *data);
    200179        void (* chat_invite)    (struct gaim_connection *, int id, char *who, char *message);
    201180        void (* chat_leave)     (struct gaim_connection *, int id);
    202         void (* chat_whisper)   (struct gaim_connection *, int id, char *who, char *message);
    203181        int  (* chat_send)      (struct gaim_connection *, int id, char *message);
    204182        int  (* chat_open)      (struct gaim_connection *, char *who);
    205         void (* keepalive)      (struct gaim_connection *);
    206 
    207         /* get "chat buddy" info and away message */
    208         void (* get_cb_info)    (struct gaim_connection *, int, char *who);
    209         void (* get_cb_away)    (struct gaim_connection *, int, char *who);
    210 
    211         /* save/store buddy's alias on server list/roster */
    212         void (* alias_buddy)    (struct gaim_connection *, char *who);
    213 
    214         /* change a buddy's group on a server list/roster */
    215         void (* group_buddy)    (struct gaim_connection *, char *who, char *old_group, char *new_group);
    216 
    217         void (* buddy_free)     (struct buddy *);
    218 
     183       
     184        /* DIE! */
    219185        char *(* get_status_string) (struct gaim_connection *gc, int stat);
    220 
     186       
     187        GList *(* away_states)(struct gaim_connection *gc);
     188       
     189        /* Mainly for AOL, since they think "Bung hole" == "Bu ngho le". *sigh* */
    221190        int (* cmp_buddynames) (const char *who1, const char *who2);
    222191};
     
    307276struct conversation *conv_findchannel( char *channel );
    308277
    309 
    310278#endif
  • protocols/yahoo/yahoo.c

    ra014331 r192b80a  
    227227                else if( g_strcasecmp( state, GAIM_AWAY_CUSTOM ) == 0 )
    228228                {
    229                         if (gc->is_idle)
    230                                 yd->current_status = YAHOO_STATUS_IDLE;
    231                         else
    232                                 yd->current_status = YAHOO_STATUS_AVAILABLE;
     229                        yd->current_status = YAHOO_STATUS_AVAILABLE;
    233230                       
    234231                        gc->away = NULL;
    235232                }
    236233        }
    237         else if( gc->is_idle )
    238                 yd->current_status = YAHOO_STATUS_IDLE;
    239234        else
    240235                yd->current_status = YAHOO_STATUS_AVAILABLE;
Note: See TracChangeset for help on using the changeset viewer.