Mercurial > pidgin.yaz
comparison HACKING @ 10011:32467b63f55a
[gaim-migrate @ 10928]
More deprecation of serv_got_update or whatever it's called.
Is all the sound and logging stuff done in the new code? I didn't
actually check.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 11 Sep 2004 03:37:16 +0000 |
parents | db62420a53a2 |
children | 61852117568f |
comparison
equal
deleted
inserted
replaced
10010:56e34a659db2 | 10011:32467b63f55a |
---|---|
101 | 101 |
102 After you're signed in, Gaim draws the buddy list by calling | 102 After you're signed in, Gaim draws the buddy list by calling |
103 show_buddy_list. Assuming the user has a buddy list (all buddy list | 103 show_buddy_list. Assuming the user has a buddy list (all buddy list |
104 functions are controlled by list.c; when you sign on do_import is called | 104 functions are controlled by list.c; when you sign on do_import is called |
105 and that loads the locally saved list), the protocol calls | 105 and that loads the locally saved list), the protocol calls |
106 serv_got_update, which sets the information in the appropriate struct | 106 gaim_prpl_got functions, which set the information in the appropriate |
107 buddy and then passes it off to set_buddy. | 107 struct buddy and then passes it off to set_buddy. |
108 | 108 |
109 set_buddy is responsible for a lot of stuff, but most of it is done | 109 set_buddy is responsible for a lot of stuff, but most of it is done |
110 implicitly. It's responsible for the sounds (which is just a call to | 110 implicitly. It's responsible for the sounds (which is just a call to |
111 play_sound), but the biggest thing it does is call new_group_show and | 111 play_sound), but the biggest thing it does is call new_group_show and |
112 new_buddy_show if necessary. There's only one group_show per group name, | 112 new_buddy_show if necessary. There's only one group_show per group name, |
240 all of the protocols. It's a pretty simple file actually. | 240 all of the protocols. It's a pretty simple file actually. |
241 | 241 |
242 server.c: | 242 server.c: |
243 This is where all of the differentiation between the different protocols | 243 This is where all of the differentiation between the different protocols |
244 is done. Nearly everything that's network related goes through here | 244 is done. Nearly everything that's network related goes through here |
245 at one point or another. This has good things like serv_send_im and | 245 at one point or another. This has good things like serv_send_im. Most of |
246 serv_got_update. Most of it should be pretty self-explanatory. | 246 it should be pretty self-explanatory. |
247 | 247 |
248 sound.c: | 248 sound.c: |
249 The main function in this file is play_sound, which plays one of 8 | 249 The main function in this file is play_sound, which plays one of 8 |
250 (maybe 9?) sounds based on preferences. All that the rest of the code | 250 (maybe 9?) sounds based on preferences. All that the rest of the code |
251 should have to do is call play_sound(BUDDY_ARRIVE), for example, and | 251 should have to do is call play_sound(BUDDY_ARRIVE), for example, and |
337 Now then, there are protocols that gaim knows about. Each protocol is | 337 Now then, there are protocols that gaim knows about. Each protocol is |
338 in a prpl struct and kept track of in the protocols GSList. The way the | 338 in a prpl struct and kept track of in the protocols GSList. The way the |
339 management of the protocols is, there will only ever be one prpl per | 339 management of the protocols is, there will only ever be one prpl per |
340 numeric protocol. Each prpl defines a basic set of functions: login, | 340 numeric protocol. Each prpl defines a basic set of functions: login, |
341 logout, send_im, etc. The prpl is responsible not only for handling | 341 logout, send_im, etc. The prpl is responsible not only for handling |
342 these functions, but also for calling the appropriate serv_got functions | 342 these functions, but also for calling the appropriate prpl_got functions |
343 (e.g. serv_got_update when a buddy comes online/goes offline/goes | 343 It handles each of these on a per-account basis. |
344 idle/etc). It handles each of these on a per-connection basis. | |
345 | 344 |
346 So why's it called a PRPL? It stands for PRotocol PLugin. That means | 345 So why's it called a PRPL? It stands for PRotocol PLugin. That means |
347 that it's possible to dynamically add new protocols to gaim. However, | 346 that it's possible to dynamically add new protocols to gaim. However, |
348 all protocols must be implemented the same way: by using a prpl struct | 347 all protocols must be implemented the same way: by using a prpl struct |
349 and being loaded, regardless of whether they are static or dynamic. | 348 and being loaded, regardless of whether they are static or dynamic. |