comparison src/list.c @ 5205:fefad67de2c7

[gaim-migrate @ 5573] I had a damn good commit message, but it was eaten. Let's try it again. Announcing, Gaim Plugin API version 2.0, or GPAPIV2.0 for short. There are lots'a cool thingies here. Okay now, this isn't as cool as the previous message, but: 1) There's now a single entry function for all plugin types. It returns a detailed information structure on the plugin. This removes a lot of the ugliness from old plugins. Oh yeah, libicq wasn't converted to this, so if you use it, well, you shouldn't have used it anyway, but now you can't! bwahahaha. Use AIM/ICQ. 2) There are now 3 types of plugins: Standard, Loader, and Protocol plugins. Standard plugins are, well, standard, compiled plugins. Loader plugins load other plugins. For example, the perl support is now a loader plugin. It loads perl scripts. In the future, we'll have Ruby and Python loader plugins. Protocol plugins are, well, protocol plugins... yeah... 3) Plugins have unique IDs, so they can be referred to or automatically updated from a plugin database in the future. Neat, huh? 4) Plugins will have dependency support in the future, and can be hidden, so if you have, say, a logging core plugin, it won't have to show up, but then you load the GTK+ logging plugin and it'll auto-load the core plugin. Core/UI split plugins! 5) There will eventually be custom plugin signals and RPC of some sort, for the core/ui split plugins. So, okay, back up .gaimrc. I'd like to thank my parents for their support, javabsp for helping convert a bunch of protocol plugins, and Etan for helping convert a bunch of standard plugins. Have fun. If you have any problems, please let me know, but you probably won't have anything major happen. You will have to convert your plugins, though, and I'm not guaranteeing that all perl scripts will still work. I'll end up changing the perl script API eventually, so I know they won't down the road. Don't worry, though. It'll be mass cool. faceprint wants me to just commit the damn code already. So, here we go!!! .. .. I need a massage. From a young, cute girl. Are there any young, cute girls in the audience? IM me plz k thx. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 25 Apr 2003 06:47:33 +0000
parents 13ffa9ae4282
children 39bb2a35f8d9
comparison
equal deleted inserted replaced
5204:44de70702205 5205:fefad67de2c7
118 { 118 {
119 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 119 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops;
120 buddy->uc = status; 120 buddy->uc = status;
121 121
122 if(!(status & UC_UNAVAILABLE)) 122 if(!(status & UC_UNAVAILABLE))
123 plugin_event(event_buddy_back, buddy->account->gc, buddy->name); 123 gaim_event_broadcast(event_buddy_back, buddy->account->gc, buddy->name);
124 else 124 else
125 plugin_event(event_buddy_away, buddy->account->gc, buddy->name); 125 gaim_event_broadcast(event_buddy_away, buddy->account->gc, buddy->name);
126 126
127 if (ops) 127 if (ops)
128 ops->update(gaimbuddylist, (GaimBlistNode*)buddy); 128 ops->update(gaimbuddylist, (GaimBlistNode*)buddy);
129 } 129 }
130 130
131 static gboolean presence_update_timeout_cb(struct buddy *buddy) { 131 static gboolean presence_update_timeout_cb(struct buddy *buddy) {
132 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 132 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops;
133 133
134 if(buddy->present == GAIM_BUDDY_SIGNING_ON) { 134 if(buddy->present == GAIM_BUDDY_SIGNING_ON) {
135 buddy->present = GAIM_BUDDY_ONLINE; 135 buddy->present = GAIM_BUDDY_ONLINE;
136 plugin_event(event_buddy_signon, buddy->account->gc, buddy->name); 136 gaim_event_broadcast(event_buddy_signon, buddy->account->gc, buddy->name);
137 } else if(buddy->present == GAIM_BUDDY_SIGNING_OFF) { 137 } else if(buddy->present == GAIM_BUDDY_SIGNING_OFF) {
138 buddy->present = GAIM_BUDDY_OFFLINE; 138 buddy->present = GAIM_BUDDY_OFFLINE;
139 } 139 }
140 140
141 buddy->timer = 0; 141 buddy->timer = 0;
150 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 150 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops;
151 gboolean do_timer = FALSE; 151 gboolean do_timer = FALSE;
152 152
153 if (!GAIM_BUDDY_IS_ONLINE(buddy) && presence) { 153 if (!GAIM_BUDDY_IS_ONLINE(buddy) && presence) {
154 buddy->present = GAIM_BUDDY_SIGNING_ON; 154 buddy->present = GAIM_BUDDY_SIGNING_ON;
155 plugin_event(event_buddy_signon, buddy->account->gc, buddy->name); 155 gaim_event_broadcast(event_buddy_signon, buddy->account->gc, buddy->name);
156 do_timer = TRUE; 156 do_timer = TRUE;
157 } else if(GAIM_BUDDY_IS_ONLINE(buddy) && !presence) { 157 } else if(GAIM_BUDDY_IS_ONLINE(buddy) && !presence) {
158 buddy->present = GAIM_BUDDY_SIGNING_OFF; 158 buddy->present = GAIM_BUDDY_SIGNING_OFF;
159 plugin_event(event_buddy_signoff, buddy->account->gc, buddy->name); 159 gaim_event_broadcast(event_buddy_signoff, buddy->account->gc, buddy->name);
160 do_timer = TRUE; 160 do_timer = TRUE;
161 } 161 }
162 162
163 if(do_timer) { 163 if(do_timer) {
164 if(buddy->timer > 0) 164 if(buddy->timer > 0)
811 if (filename) { 811 if (filename) {
812 g_snprintf(path, sizeof(path), "%s", filename); 812 g_snprintf(path, sizeof(path), "%s", filename);
813 } else { 813 } else {
814 char *g_screenname = get_screenname_filename(account->username); 814 char *g_screenname = get_screenname_filename(account->username);
815 char *file = gaim_user_dir(); 815 char *file = gaim_user_dir();
816 int protocol = (account->protocol == PROTO_OSCAR) ? (isalpha(account->username[0]) ? PROTO_TOC : PROTO_ICQ): account->protocol; 816 int protocol = (account->protocol == GAIM_PROTO_OSCAR) ? (isalpha(account->username[0]) ? GAIM_PROTO_TOC : GAIM_PROTO_ICQ): account->protocol;
817 817
818 if (file != (char *)NULL) { 818 if (file != (char *)NULL) {
819 sprintf(path, "%s" G_DIR_SEPARATOR_S "%s.%d.blist", file, g_screenname, protocol); 819 sprintf(path, "%s" G_DIR_SEPARATOR_S "%s.%d.blist", file, g_screenname, protocol);
820 g_free(g_screenname); 820 g_free(g_screenname);
821 } else { 821 } else {