[gnome-online-accounts/gnome-3-16] facebook, foursquare, google, live, pocket: Style fixes



commit 1fa16dcda718330296f20d30100846a81efdfb00
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon May 11 17:35:33 2015 +0200

    facebook, foursquare, google, live, pocket: Style fixes
    
    Use the name 'self' to refer to the instance, 'oauth2_provider' if it
    is a GoaOAuth2Provider virtual method, and 'provider' if it is from
    GoaProvider.

 src/goabackend/goafacebookprovider.c    |   32 +++++++-------
 src/goabackend/goafoursquareprovider.c  |   31 +++++++------
 src/goabackend/goagoogleprovider.c      |   32 +++++++-------
 src/goabackend/goapocketprovider.c      |   74 +++++++++++++++---------------
 src/goabackend/goawindowsliveprovider.c |   30 ++++++------
 5 files changed, 100 insertions(+), 99 deletions(-)
---
diff --git a/src/goabackend/goafacebookprovider.c b/src/goabackend/goafacebookprovider.c
index 9d5b90c..15d184c 100644
--- a/src/goabackend/goafacebookprovider.c
+++ b/src/goabackend/goafacebookprovider.c
@@ -1,6 +1,6 @@
 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 /*
- * Copyright (C) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * Copyright (C) 2011, 2012, 2013, 2014, 2015 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -64,26 +64,26 @@ G_DEFINE_TYPE_WITH_CODE (GoaFacebookProvider, goa_facebook_provider, GOA_TYPE_OA
 /* ---------------------------------------------------------------------------------------------------- */
 
 static const gchar *
-get_provider_type (GoaProvider *_provider)
+get_provider_type (GoaProvider *provider)
 {
   return GOA_FACEBOOK_NAME;
 }
 
 static gchar *
-get_provider_name (GoaProvider *_provider,
+get_provider_name (GoaProvider *provider,
                    GoaObject   *object)
 {
   return g_strdup (_("Facebook"));
 }
 
 static GoaProviderGroup
-get_provider_group (GoaProvider *_provider)
+get_provider_group (GoaProvider *provider)
 {
   return GOA_PROVIDER_GROUP_BRANDED;
 }
 
 static GoaProviderFeatures
-get_provider_features (GoaProvider *_provider)
+get_provider_features (GoaProvider *provider)
 {
   return GOA_PROVIDER_FEATURE_BRANDED |
          GOA_PROVIDER_FEATURE_PHOTOS |
@@ -93,7 +93,7 @@ get_provider_features (GoaProvider *_provider)
 /* facebook client flow sends a different auth query then the base
  * OAuth2Provider */
 static gchar *
-build_authorization_uri (GoaOAuth2Provider  *provider,
+build_authorization_uri (GoaOAuth2Provider  *oauth2_provider,
                          const gchar        *authorization_uri,
                          const gchar        *escaped_redirect_uri,
                          const gchar        *escaped_client_id,
@@ -115,19 +115,19 @@ build_authorization_uri (GoaOAuth2Provider  *provider,
 }
 
 static const gchar *
-get_authorization_uri (GoaOAuth2Provider *provider)
+get_authorization_uri (GoaOAuth2Provider *oauth2_provider)
 {
   return "https://www.facebook.com/dialog/oauth";;
 }
 
 static const gchar *
-get_redirect_uri (GoaOAuth2Provider *provider)
+get_redirect_uri (GoaOAuth2Provider *oauth2_provider)
 {
   return "https://www.facebook.com/connect/login_success.html";;
 }
 
 static const gchar *
-get_scope (GoaOAuth2Provider *provider)
+get_scope (GoaOAuth2Provider *oauth2_provider)
 {
   /* see https://developers.facebook.com/docs/authentication/permissions/ */
   /* Note: Email is requested to obtain a human understandable unique Id  */
@@ -146,13 +146,13 @@ get_credentials_generation (GoaProvider *provider)
 }
 
 static const gchar *
-get_client_id (GoaOAuth2Provider *provider)
+get_client_id (GoaOAuth2Provider *oauth2_provider)
 {
   return GOA_FACEBOOK_CLIENT_ID;
 }
 
 static const gchar *
-get_client_secret (GoaOAuth2Provider *provider)
+get_client_secret (GoaOAuth2Provider *oauth2_provider)
 {
   /* not used in Facebook's Client Flow Auth, we don't want to use anything
    * even if passed at configture time, since it would interfere with the URL
@@ -161,7 +161,7 @@ get_client_secret (GoaOAuth2Provider *provider)
 }
 
 static const gchar *
-get_authentication_cookie (GoaOAuth2Provider *provider)
+get_authentication_cookie (GoaOAuth2Provider *oauth2_provider)
 {
   return "c_user";
 }
@@ -169,7 +169,7 @@ get_authentication_cookie (GoaOAuth2Provider *provider)
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gchar *
-get_identity_sync (GoaOAuth2Provider  *provider,
+get_identity_sync (GoaOAuth2Provider  *oauth2_provider,
                    const gchar        *access_token,
                    gchar             **out_presentation_identity,
                    GCancellable       *cancellable,
@@ -282,7 +282,7 @@ get_identity_sync (GoaOAuth2Provider  *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gboolean
-is_identity_node (GoaOAuth2Provider *provider, WebKitDOMHTMLInputElement *element)
+is_identity_node (GoaOAuth2Provider *oauth2_provider, WebKitDOMHTMLInputElement *element)
 {
   gboolean ret;
   gchar *element_type;
@@ -437,7 +437,7 @@ show_account (GoaProvider         *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static void
-add_account_key_values (GoaOAuth2Provider *provider,
+add_account_key_values (GoaOAuth2Provider *oauth2_provider,
                         GVariantBuilder   *builder)
 {
   g_variant_builder_add (builder, "{ss}", "PhotosEnabled", "true");
@@ -447,7 +447,7 @@ add_account_key_values (GoaOAuth2Provider *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static void
-goa_facebook_provider_init (GoaFacebookProvider *client)
+goa_facebook_provider_init (GoaFacebookProvider *self)
 {
 }
 
diff --git a/src/goabackend/goafoursquareprovider.c b/src/goabackend/goafoursquareprovider.c
index 19cbc23..b162b55 100644
--- a/src/goabackend/goafoursquareprovider.c
+++ b/src/goabackend/goafoursquareprovider.c
@@ -1,6 +1,7 @@
 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 /*
  * Copyright (C) 2014 Damián Nohales
+ * Copyright (C) 2015 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -64,33 +65,33 @@ G_DEFINE_TYPE_WITH_CODE (GoaFoursquareProvider, goa_foursquare_provider, GOA_TYP
 /* ---------------------------------------------------------------------------------------------------- */
 
 static const gchar *
-get_provider_type (GoaProvider *_provider)
+get_provider_type (GoaProvider *provider)
 {
   return GOA_FOURSQUARE_NAME;
 }
 
 static gchar *
-get_provider_name (GoaProvider *_provider,
+get_provider_name (GoaProvider *provider,
                    GoaObject   *object)
 {
   return g_strdup (_("Foursquare"));
 }
 
 static GoaProviderGroup
-get_provider_group (GoaProvider *_provider)
+get_provider_group (GoaProvider *provider)
 {
   return GOA_PROVIDER_GROUP_BRANDED;
 }
 
 static GoaProviderFeatures
-get_provider_features (GoaProvider *_provider)
+get_provider_features (GoaProvider *provider)
 {
   return GOA_PROVIDER_FEATURE_BRANDED |
          GOA_PROVIDER_FEATURE_MAPS;
 }
 
 static gchar *
-build_authorization_uri (GoaOAuth2Provider  *provider,
+build_authorization_uri (GoaOAuth2Provider  *oauth2_provider,
                          const gchar        *authorization_uri,
                          const gchar        *escaped_redirect_uri,
                          const gchar        *escaped_client_id,
@@ -109,25 +110,25 @@ build_authorization_uri (GoaOAuth2Provider  *provider,
 }
 
 static const gchar *
-get_authorization_uri (GoaOAuth2Provider *provider)
+get_authorization_uri (GoaOAuth2Provider *oauth2_provider)
 {
   return "https://foursquare.com/oauth2/authenticate";;
 }
 
 static const gchar *
-get_redirect_uri (GoaOAuth2Provider *provider)
+get_redirect_uri (GoaOAuth2Provider *oauth2_provider)
 {
   return "https://localhost/";;
 }
 
 static const gchar *
-get_client_id (GoaOAuth2Provider *provider)
+get_client_id (GoaOAuth2Provider *oauth2_provider)
 {
   return GOA_FOURSQUARE_CLIENT_ID;
 }
 
 static const gchar *
-get_client_secret (GoaOAuth2Provider *provider)
+get_client_secret (GoaOAuth2Provider *oauth2_provider)
 {
   /* The client secret is not used in the Foursquare Token Flow
    * that is the recommended flow for serverless apps.
@@ -136,7 +137,7 @@ get_client_secret (GoaOAuth2Provider *provider)
 }
 
 static const gchar *
-get_authentication_cookie (GoaOAuth2Provider *provider)
+get_authentication_cookie (GoaOAuth2Provider *oauth2_provider)
 {
   return "bbhive";
 }
@@ -144,7 +145,7 @@ get_authentication_cookie (GoaOAuth2Provider *provider)
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gchar *
-get_identity_sync (GoaOAuth2Provider  *provider,
+get_identity_sync (GoaOAuth2Provider  *oauth2_provider,
                    const gchar        *access_token,
                    gchar             **out_presentation_identity,
                    GCancellable       *cancellable,
@@ -285,7 +286,7 @@ get_identity_sync (GoaOAuth2Provider  *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gboolean
-is_identity_node (GoaOAuth2Provider *provider, WebKitDOMHTMLInputElement *element)
+is_identity_node (GoaOAuth2Provider *oauth2_provider, WebKitDOMHTMLInputElement *element)
 {
   gboolean ret;
   gchar *element_type;
@@ -377,7 +378,7 @@ build_object (GoaProvider         *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gboolean
-get_use_mobile_browser (GoaOAuth2Provider *provider)
+get_use_mobile_browser (GoaOAuth2Provider *oauth2_provider)
 {
   return TRUE;
 }
@@ -409,7 +410,7 @@ show_account (GoaProvider         *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static void
-add_account_key_values (GoaOAuth2Provider *provider,
+add_account_key_values (GoaOAuth2Provider *oauth2_provider,
                         GVariantBuilder   *builder)
 {
   g_variant_builder_add (builder, "{ss}", "MapsEnabled", "true");
@@ -418,7 +419,7 @@ add_account_key_values (GoaOAuth2Provider *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static void
-goa_foursquare_provider_init (GoaFoursquareProvider *client)
+goa_foursquare_provider_init (GoaFoursquareProvider *self)
 {
 }
 
diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c
index a6a4121..50c4806 100644
--- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c
@@ -64,26 +64,26 @@ G_DEFINE_TYPE_WITH_CODE (GoaGoogleProvider, goa_google_provider, GOA_TYPE_OAUTH2
 /* ---------------------------------------------------------------------------------------------------- */
 
 static const gchar *
-get_provider_type (GoaProvider *_provider)
+get_provider_type (GoaProvider *provider)
 {
   return GOA_GOOGLE_NAME;
 }
 
 static gchar *
-get_provider_name (GoaProvider *_provider,
+get_provider_name (GoaProvider *provider,
                    GoaObject   *object)
 {
   return g_strdup (_("Google"));
 }
 
 static GoaProviderGroup
-get_provider_group (GoaProvider *_provider)
+get_provider_group (GoaProvider *provider)
 {
   return GOA_PROVIDER_GROUP_BRANDED;
 }
 
 static GoaProviderFeatures
-get_provider_features (GoaProvider *_provider)
+get_provider_features (GoaProvider *provider)
 {
   return GOA_PROVIDER_FEATURE_BRANDED |
          GOA_PROVIDER_FEATURE_MAIL |
@@ -96,25 +96,25 @@ get_provider_features (GoaProvider *_provider)
 }
 
 static const gchar *
-get_authorization_uri (GoaOAuth2Provider *provider)
+get_authorization_uri (GoaOAuth2Provider *oauth2_provider)
 {
   return "https://accounts.google.com/o/oauth2/auth";;
 }
 
 static const gchar *
-get_token_uri (GoaOAuth2Provider *provider)
+get_token_uri (GoaOAuth2Provider *oauth2_provider)
 {
   return "https://accounts.google.com/o/oauth2/token";;
 }
 
 static const gchar *
-get_redirect_uri (GoaOAuth2Provider *provider)
+get_redirect_uri (GoaOAuth2Provider *oauth2_provider)
 {
   return "http://localhost";;
 }
 
 static const gchar *
-get_scope (GoaOAuth2Provider *provider)
+get_scope (GoaOAuth2Provider *oauth2_provider)
 {
   return /* Read-only access to the user's email address */
          "https://www.googleapis.com/auth/userinfo.email "
@@ -159,19 +159,19 @@ get_credentials_generation (GoaProvider *provider)
 }
 
 static const gchar *
-get_client_id (GoaOAuth2Provider *provider)
+get_client_id (GoaOAuth2Provider *oauth2_provider)
 {
   return GOA_GOOGLE_CLIENT_ID;
 }
 
 static const gchar *
-get_client_secret (GoaOAuth2Provider *provider)
+get_client_secret (GoaOAuth2Provider *oauth2_provider)
 {
   return GOA_GOOGLE_CLIENT_SECRET;
 }
 
 static const gchar *
-get_authentication_cookie (GoaOAuth2Provider *provider)
+get_authentication_cookie (GoaOAuth2Provider *oauth2_provider)
 {
   return "LSID";
 }
@@ -179,7 +179,7 @@ get_authentication_cookie (GoaOAuth2Provider *provider)
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gchar *
-get_identity_sync (GoaOAuth2Provider  *provider,
+get_identity_sync (GoaOAuth2Provider  *oauth2_provider,
                    const gchar        *access_token,
                    gchar             **out_presentation_identity,
                    GCancellable       *cancellable,
@@ -267,7 +267,7 @@ get_identity_sync (GoaOAuth2Provider  *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gboolean
-is_identity_node (GoaOAuth2Provider *provider, WebKitDOMHTMLInputElement *element)
+is_identity_node (GoaOAuth2Provider *oauth2_provider, WebKitDOMHTMLInputElement *element)
 {
   gboolean ret;
   gchar *element_type;
@@ -559,7 +559,7 @@ build_object (GoaProvider         *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gboolean
-get_use_mobile_browser (GoaOAuth2Provider *provider)
+get_use_mobile_browser (GoaOAuth2Provider *oauth2_provider)
 {
   return TRUE;
 }
@@ -621,7 +621,7 @@ show_account (GoaProvider         *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static void
-add_account_key_values (GoaOAuth2Provider  *provider,
+add_account_key_values (GoaOAuth2Provider  *oauth2_provider,
                         GVariantBuilder   *builder)
 {
   g_variant_builder_add (builder, "{ss}", "MailEnabled", "true");
@@ -636,7 +636,7 @@ add_account_key_values (GoaOAuth2Provider  *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static void
-goa_google_provider_init (GoaGoogleProvider *client)
+goa_google_provider_init (GoaGoogleProvider *self)
 {
 }
 
diff --git a/src/goabackend/goapocketprovider.c b/src/goabackend/goapocketprovider.c
index e24bfb9..b26ecff 100644
--- a/src/goabackend/goapocketprovider.c
+++ b/src/goabackend/goapocketprovider.c
@@ -1,6 +1,6 @@
 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 /*
- * Copyright (C) 2013 Red Hat, Inc.
+ * Copyright (C) 2013, 2015 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -57,75 +57,75 @@ G_DEFINE_TYPE_WITH_CODE (GoaPocketProvider, goa_pocket_provider, GOA_TYPE_OAUTH2
 /* ---------------------------------------------------------------------------------------------------- */
 
 static const gchar *
-get_provider_type (GoaProvider *_provider)
+get_provider_type (GoaProvider *provider)
 {
   return GOA_POCKET_NAME;
 }
 
 static gchar *
-get_provider_name (GoaProvider *_provider,
+get_provider_name (GoaProvider *provider,
                    GoaObject   *object)
 {
   return g_strdup (_("Pocket"));
 }
 
 static GoaProviderGroup
-get_provider_group (GoaProvider *_provider)
+get_provider_group (GoaProvider *provider)
 {
   return GOA_PROVIDER_GROUP_BRANDED;
 }
 
 static GoaProviderFeatures
-get_provider_features (GoaProvider *_provider)
+get_provider_features (GoaProvider *provider)
 {
   return GOA_PROVIDER_FEATURE_BRANDED |
          GOA_PROVIDER_FEATURE_READ_LATER;
 }
 
 static const gchar *
-get_request_uri (GoaOAuth2Provider *provider)
+get_request_uri (GoaOAuth2Provider *oauth2_provider)
 {
   return "https://getpocket.com/v3/oauth/request";;
 }
 
 static const gchar *
-get_authorization_uri (GoaOAuth2Provider *provider)
+get_authorization_uri (GoaOAuth2Provider *oauth2_provider)
 {
   return "https://getpocket.com/auth/authorize";;
 }
 
 static const gchar *
-get_token_uri (GoaOAuth2Provider *provider)
+get_token_uri (GoaOAuth2Provider *oauth2_provider)
 {
   return NULL;
 }
 
 static const gchar *
-get_redirect_uri (GoaOAuth2Provider *provider)
+get_redirect_uri (GoaOAuth2Provider *oauth2_provider)
 {
   return "https://localhost";;
 }
 
 static const gchar *
-get_client_id (GoaOAuth2Provider *provider)
+get_client_id (GoaOAuth2Provider *oauth2_provider)
 {
   return GOA_POCKET_CLIENT_ID;
 }
 
 static const gchar *
-get_client_secret (GoaOAuth2Provider *provider)
+get_client_secret (GoaOAuth2Provider *oauth2_provider)
 {
   return NULL;
 }
 
 static gchar *
-build_authorization_uri (GoaOAuth2Provider  *provider,
+build_authorization_uri (GoaOAuth2Provider  *oauth2_provider,
                          const gchar        *authorization_uri,
                          const gchar        *escaped_redirect_uri,
                          const gchar        *escaped_client_id,
                          const gchar        *escaped_scope)
 {
-  GoaPocketProvider *pocket = GOA_POCKET_PROVIDER (provider);
+  GoaPocketProvider *self = GOA_POCKET_PROVIDER (oauth2_provider);
   RestProxy *proxy;
   RestProxyCall *call;
   const gchar *payload;
@@ -133,21 +133,21 @@ build_authorization_uri (GoaOAuth2Provider  *provider,
   GError *error = NULL;
   GHashTable *hash;
 
-  g_clear_pointer (&pocket->code, g_free);
+  g_clear_pointer (&self->code, g_free);
 
   url = NULL;
 
-  proxy = rest_proxy_new (get_request_uri (provider), FALSE);
+  proxy = rest_proxy_new (get_request_uri (oauth2_provider), FALSE);
   call = rest_proxy_new_call (proxy);
 
   rest_proxy_call_set_method (call, "POST");
   rest_proxy_call_add_header (call, "Content-Type", "application/x-www-form-urlencoded");
   rest_proxy_call_add_param (call, "consumer_key", GOA_POCKET_CLIENT_ID);
-  rest_proxy_call_add_param (call, "redirect_uri", get_redirect_uri (provider));
+  rest_proxy_call_add_param (call, "redirect_uri", get_redirect_uri (oauth2_provider));
 
   if (!rest_proxy_call_sync (call, &error))
     {
-      g_debug ("Call to %s failed: %s", get_redirect_uri (provider), error->message);
+      g_debug ("Call to %s failed: %s", get_redirect_uri (oauth2_provider), error->message);
       g_error_free (error);
       goto out;
     }
@@ -159,7 +159,7 @@ build_authorization_uri (GoaOAuth2Provider  *provider,
 
   if (!code)
     {
-      g_debug ("Failed to get code from answer to %s", get_redirect_uri (provider));
+      g_debug ("Failed to get code from answer to %s", get_redirect_uri (oauth2_provider));
       goto out;
     }
 
@@ -170,7 +170,7 @@ build_authorization_uri (GoaOAuth2Provider  *provider,
                          code,
                          escaped_redirect_uri);
 
-  pocket->code = code;
+  self->code = code;
 
 out:
   g_clear_object (&call);
@@ -179,12 +179,12 @@ out:
 }
 
 static gboolean
-process_redirect_url (GoaOAuth2Provider            *provider,
+process_redirect_url (GoaOAuth2Provider            *oauth2_provider,
                       const gchar                  *redirect_url,
                       gchar                       **access_token,
                       GError                      **error)
 {
-  GoaPocketProvider *pocket = GOA_POCKET_PROVIDER (provider);
+  GoaPocketProvider *self = GOA_POCKET_PROVIDER (oauth2_provider);
   RestProxy *proxy;
   RestProxyCall *call;
   GHashTable *hash;
@@ -199,24 +199,24 @@ process_redirect_url (GoaOAuth2Provider            *provider,
   rest_proxy_call_set_method (call, "POST");
   rest_proxy_call_add_header (call, "Content-Type", "application/x-www-form-urlencoded");
   rest_proxy_call_add_param (call, "consumer_key", GOA_POCKET_CLIENT_ID);
-  rest_proxy_call_add_param (call, "code", pocket->code);
+  rest_proxy_call_add_param (call, "code", self->code);
 
   if (!rest_proxy_call_sync (call, error))
     goto out;
 
   payload = rest_proxy_call_get_payload (call);
   hash = soup_form_decode (payload);
-  pocket->identity = g_strdup (g_hash_table_lookup (hash, "username"));
+  self->identity = g_strdup (g_hash_table_lookup (hash, "username"));
   *access_token = g_strdup (g_hash_table_lookup (hash, "access_token"));
   g_hash_table_unref (hash);
 
-  if (pocket->identity == NULL|| *access_token == NULL)
+  if (self->identity == NULL|| *access_token == NULL)
     {
       g_set_error (error,
                    GOA_ERROR,
                    GOA_ERROR_FAILED, /* TODO: more specific */
                    _("No username or access_token"));
-      g_clear_pointer (&pocket->identity, g_free);
+      g_clear_pointer (&self->identity, g_free);
       g_clear_pointer (access_token, g_free);
       goto out;
     }
@@ -230,7 +230,7 @@ out:
 }
 
 static const gchar *
-get_authentication_cookie (GoaOAuth2Provider *provider)
+get_authentication_cookie (GoaOAuth2Provider *oauth2_provider)
 {
   return NULL;
 }
@@ -238,22 +238,22 @@ get_authentication_cookie (GoaOAuth2Provider *provider)
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gchar *
-get_identity_sync (GoaOAuth2Provider  *provider,
+get_identity_sync (GoaOAuth2Provider  *oauth2_provider,
                    const gchar        *access_token,
                    gchar             **out_presentation_identity,
                    GCancellable       *cancellable,
                    GError            **error)
 {
-  GoaPocketProvider *pocket = GOA_POCKET_PROVIDER (provider);
+  GoaPocketProvider *self = GOA_POCKET_PROVIDER (oauth2_provider);
   if (out_presentation_identity != NULL)
-    *out_presentation_identity = g_strdup (pocket->identity);
-  return g_strdup (pocket->identity);
+    *out_presentation_identity = g_strdup (self->identity);
+  return g_strdup (self->identity);
 }
 
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gboolean
-is_deny_node (GoaOAuth2Provider *provider, WebKitDOMNode *node)
+is_deny_node (GoaOAuth2Provider *oauth2_provider, WebKitDOMNode *node)
 {
   WebKitDOMElement *element;
   gboolean ret;
@@ -300,7 +300,7 @@ is_deny_node (GoaOAuth2Provider *provider, WebKitDOMNode *node)
 }
 
 static gboolean
-is_identity_node (GoaOAuth2Provider *provider, WebKitDOMHTMLInputElement *element)
+is_identity_node (GoaOAuth2Provider *oauth2_provider, WebKitDOMHTMLInputElement *element)
 {
   gboolean ret;
   gchar *name;
@@ -411,7 +411,7 @@ show_account (GoaProvider         *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static void
-add_account_key_values (GoaOAuth2Provider *provider,
+add_account_key_values (GoaOAuth2Provider *oauth2_provider,
                         GVariantBuilder   *builder)
 {
   g_variant_builder_add (builder, "{ss}", "ReadLaterEnabled", "true");
@@ -420,17 +420,17 @@ add_account_key_values (GoaOAuth2Provider *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static void
-goa_pocket_provider_init (GoaPocketProvider *client)
+goa_pocket_provider_init (GoaPocketProvider *self)
 {
 }
 
 static void
 goa_pocket_provider_finalize (GObject *object)
 {
-  GoaPocketProvider *provider = GOA_POCKET_PROVIDER (object);
+  GoaPocketProvider *self = GOA_POCKET_PROVIDER (object);
 
-  g_clear_pointer (&provider->code, g_free);
-  g_clear_pointer (&provider->identity, g_free);
+  g_clear_pointer (&self->code, g_free);
+  g_clear_pointer (&self->identity, g_free);
 
   G_OBJECT_CLASS (goa_pocket_provider_parent_class)->finalize (object);
 }
diff --git a/src/goabackend/goawindowsliveprovider.c b/src/goabackend/goawindowsliveprovider.c
index ac6fe46..cbc2b58 100644
--- a/src/goabackend/goawindowsliveprovider.c
+++ b/src/goabackend/goawindowsliveprovider.c
@@ -65,26 +65,26 @@ G_DEFINE_TYPE_WITH_CODE (GoaWindowsLiveProvider, goa_windows_live_provider, GOA_
 /* ---------------------------------------------------------------------------------------------------- */
 
 static const gchar *
-get_provider_type (GoaProvider *_provider)
+get_provider_type (GoaProvider *provider)
 {
   return GOA_WINDOWS_LIVE_NAME;
 }
 
 static gchar *
-get_provider_name (GoaProvider *_provider,
+get_provider_name (GoaProvider *provider,
                    GoaObject   *object)
 {
   return g_strdup (_("Windows Live"));
 }
 
 static GoaProviderGroup
-get_provider_group (GoaProvider *_provider)
+get_provider_group (GoaProvider *provider)
 {
   return GOA_PROVIDER_GROUP_BRANDED;
 }
 
 static GoaProviderFeatures
-get_provider_features (GoaProvider *_provider)
+get_provider_features (GoaProvider *provider)
 {
   return GOA_PROVIDER_FEATURE_BRANDED |
          GOA_PROVIDER_FEATURE_MAIL |
@@ -92,27 +92,27 @@ get_provider_features (GoaProvider *_provider)
 }
 
 static const gchar *
-get_authorization_uri (GoaOAuth2Provider *provider)
+get_authorization_uri (GoaOAuth2Provider *oauth2_provider)
 {
   return "https://login.live.com/oauth20_authorize.srf";;
 }
 
 
 static const gchar *
-get_token_uri (GoaOAuth2Provider *provider)
+get_token_uri (GoaOAuth2Provider *oauth2_provider)
 {
   return "https://login.live.com/oauth20_token.srf";;
 }
 
 
 static const gchar *
-get_redirect_uri (GoaOAuth2Provider *provider)
+get_redirect_uri (GoaOAuth2Provider *oauth2_provider)
 {
   return "https://login.live.com/oauth20_desktop.srf";;
 }
 
 static const gchar *
-get_scope (GoaOAuth2Provider *provider)
+get_scope (GoaOAuth2Provider *oauth2_provider)
 {
   return "wl.imap,"
          "wl.offline_access,"
@@ -127,19 +127,19 @@ get_credentials_generation (GoaProvider *provider)
 }
 
 static const gchar *
-get_client_id (GoaOAuth2Provider *provider)
+get_client_id (GoaOAuth2Provider *oauth2_provider)
 {
   return GOA_WINDOWS_LIVE_CLIENT_ID;
 }
 
 static const gchar *
-get_client_secret (GoaOAuth2Provider *provider)
+get_client_secret (GoaOAuth2Provider *oauth2_provider)
 {
   return NULL;
 }
 
 static const gchar *
-get_authentication_cookie (GoaOAuth2Provider *provider)
+get_authentication_cookie (GoaOAuth2Provider *oauth2_provider)
 {
   return "PPAuth";
 }
@@ -147,7 +147,7 @@ get_authentication_cookie (GoaOAuth2Provider *provider)
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gchar *
-get_identity_sync (GoaOAuth2Provider  *provider,
+get_identity_sync (GoaOAuth2Provider  *oauth2_provider,
                    const gchar        *access_token,
                    gchar             **out_presentation_identity,
                    GCancellable       *cancellable,
@@ -252,7 +252,7 @@ get_identity_sync (GoaOAuth2Provider  *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gboolean
-is_identity_node (GoaOAuth2Provider *provider, WebKitDOMHTMLInputElement *element)
+is_identity_node (GoaOAuth2Provider *oauth2_provider, WebKitDOMHTMLInputElement *element)
 {
   gboolean ret;
   gchar *element_type;
@@ -424,7 +424,7 @@ show_account (GoaProvider         *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static void
-add_account_key_values (GoaOAuth2Provider *provider,
+add_account_key_values (GoaOAuth2Provider *oauth2_provider,
                         GVariantBuilder   *builder)
 {
   g_variant_builder_add (builder, "{ss}", "MailEnabled", "true");
@@ -434,7 +434,7 @@ add_account_key_values (GoaOAuth2Provider *provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static void
-goa_windows_live_provider_init (GoaWindowsLiveProvider *client)
+goa_windows_live_provider_init (GoaWindowsLiveProvider *self)
 {
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]