Gadu-Gadu protocol update and patch

Paul Aurich paul at darkrain42.org
Wed Aug 26 20:58:48 EDT 2009


And Tomasz Sałaciński spoke on 08/25/2009 06:25 PM, saying:
> Hi,
> GKeyFile is an interesting choice, as you seem to use it only as a
>> hash table, with only one category.  Is there a particular reason you
>> did not use GHashTable?  The use of GKeyFile will be OK for Pidgin
>> 2.7.0, as it requires only glib 2.6, but it cannot be merged before
>> 2.7.0.
>>
> 
> I use GKeyFile because it's more extensible - I can use it in the future for other things and it's very easy 
> and clean to understand when you're reading the code. GHashTable lookup requires a valid pointer,
> which I can't pass to the ggp_send_image_handler function as this function is called by event triggered
> by libgadu, not libpurple.
> 
> It works like this:
> 
> 1. User sends message with images
> 2. Client A(Pidgin) sends the message and crc, name and size of the image to client B (original Gadu-Gadu client)
> 3. Client B sends gg_image_request event to client A - requests image with particular crc.
> 4. Libpurple handles this with ggp_send_image_handler, so associations between image id and crc32 need to be stored
> globally. I can't pass any pointer to this function. It just finds the crc and corresponding image id and sends the
> "data" section of image from the store.
> 
> I can work around this by using a pointer array - if you have no problem with more than 11 variables in GGPInfo struct.

Hmm, how is that different from what the code is doing currently using the
GHashTable pending_images?

~Paul




More information about the Devel mailing list