GObjectification - GSoC progress as of June 16, 2013
salinasv at gmail.com
Tue Jun 18 12:03:53 EDT 2013
On Sun, Jun 16, 2013 at 7:59 AM, Ankit Vani <a at nevitus.org> wrote:
> Hi everyone
> As a part of Google Summer of Code 2013, I have been working on
> GObjectification. It has been 4 days since I started working, and I
> would like to share with the community of the changes I've been doing.
> Since I'm still learning and getting used to libpurple, I have started
> out with simpler entities. I hope to speed up as I keep learning. I
> would appreciate feedback and comments on how things can be done
> better. :)
Thanks for sharing the update!
> An example of using the HMAC cipher with the SHA1 hash (before
> PurpleCipherContext *hmac = purple_cipher_context_new_by_name("hmac",
> purple_cipher_context_set_option(hmac, "hash", "sha1");
> purple_cipher_context_set_key(hmac, key, key_len);
> purple_cipher_context_append(hmac, data, data_len);
> purple_cipher_context_digest(hmac, output, sizeof(output));
> An example of using the HMAC cipher with the SHA1 hash (after
> PurpleHash *hash = purple_sha1_hash_new();
> PurpleCipher *hmac = purple_hmac_cipher_new(hash);
> purple_cipher_set_key(hmac, key, key_len);
> purple_cipher_append(hmac, data, data_len);
> purple_cipher_digest(hmac, output, sizeof(output));
I would suggest a function name change from purple_sha1_hash_new() to
purple_hash_sha1_new() to keep the namespace/hierarchy more clear. The same
for the cipher functions. The convention so far have been in the lines of
the following template -> purple_module_submodule_specific()
> Some other changes
> - Entities in libpurple have reserved members such as void
> (*purple_reserved)(void), to make it easier to add new API without
> breaking the ABI for plugins compiled against older versions. Existing
> GObjectified entities such as PurpleTheme, PurpleThemeManager,
> PurpleThemeLoader, PurpleSoundTheme and PurpleSoundThemeLoader were
> missing these padding members, so I added those to them.
> - PurpleSmiley and PurpleMedia were already GObjects, but their
> structures were hidden. I exposed them in the header file so these can
> be subclassed. They do not have any methods that can be overridden
Please someone correct me if I am wrong, but the we want to hide members to
avoid the need of that purple_reserved members. So we don't have to bump
the ABI when we add more than 4 more functions.
> Please suggest any improvements I can do. I will keep informing you
> all of my progress approximately every week. I hope for a GObjectified
> pidgin by the end of summer! :D
> Ankit Vani
Keep the good job. =)
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
Q: What is the most annoying thing on usenet and in e-mail?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel