/pidgin/main: 250fdd93e9c3: facebook: migrated key mappings to t...

Jorge VillaseƱor salinasv at gmail.com
Thu Jan 7 20:52:55 EST 2016


On Thu, Jan 7, 2016 at 12:34 PM, James Geboski <jgeboski at gmail.com> wrote:

> Changeset: 250fdd93e9c37a78935250a051dd0dd6eade21c6
> Author:  James Geboski <jgeboski at gmail.com>
> Date:    2016-01-04 19:54 -0500
> Branch:  default
> URL: https://hg.pidgin.im/pidgin/main/rev/250fdd93e9c3
>
> Description:
>
> facebook: migrated key mappings to the GTK-Doc
>
> diffstat:
>
>  libpurple/protocols/facebook/api.c |  82
> --------------------------------------
>  libpurple/protocols/facebook/api.h |  76
> +++++++++++++++++++++++++++++++++++
>  2 files changed, 76 insertions(+), 82 deletions(-)
>
> diffs (276 lines):
>
> diff --git a/libpurple/protocols/facebook/api.c
> b/libpurple/protocols/facebook/api.c
> --- a/libpurple/protocols/facebook/api.c
> +++ b/libpurple/protocols/facebook/api.c
> @@ -1079,7 +1079,6 @@ fb_api_cb_mqtt_connect(FbMqtt *mqtt, gpo
>         fb_mqtt_unsubscribe(mqtt, "/orca_message_notifications", NULL);
>
>         if (priv->sid == 0) {
> -               /* See fb_api_thread_list() for key mapping */
>                 bldr = fb_json_bldr_new(JSON_NODE_OBJECT);
>                 fb_json_bldr_add_str(bldr, "1", "0");
>                 fb_api_http_query(api, FB_API_QUERY_THREADS, bldr,
> @@ -1998,14 +1997,6 @@ fb_api_contact(FbApi *api, FbId uid)
>  {
>         JsonBuilder *bldr;
>
> -       /* Object key mapping:
> -        *   0: user_fbids
> -        *   1: include_full_user_info
> -        *   2: profile_pic_large_size
> -        *   3: profile_pic_medium_size
> -        *   4: profile_pic_small_size
> -        */
> -
>

Isn't this a good usecase for GEnum?
It may give this better documentation and you can use them as enums when
make sense and translate them to strings when needed.

-- 
Masca

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pidgin.im/pipermail/devel/attachments/20160107/93641d2b/attachment.html>


More information about the Devel mailing list