/soc/2015/nakulgulati/main: 4283c2023561: hangouts: authorizatio...
Nakul at rock.pidgin.im
Nakul at rock.pidgin.im
Thu Aug 6 21:02:33 EDT 2015
Changeset: 4283c20235611bc212c30e2238254a5255832bed
Author: Nakul Gulati
Date: 2015-08-07 09:01 +0800
Branch: hangouts
URL: https://hg.pidgin.im/soc/2015/nakulgulati/main/rev/4283c2023561
Description:
hangouts: authorization code input request
diffstat:
libpurple/protocols/hangouts/hangouts.c | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diffs (38 lines):
diff --git a/libpurple/protocols/hangouts/hangouts.c b/libpurple/protocols/hangouts/hangouts.c
--- a/libpurple/protocols/hangouts/hangouts.c
+++ b/libpurple/protocols/hangouts/hangouts.c
@@ -37,15 +37,32 @@
static PurpleProtocol *_hangouts_protocol = NULL;
static void
+hangouts_input_cb (gpointer data, const gchar *access_token)
+{
+ HangoutsApi *api;
+ api = data;
+
+ hangouts_api_auth_with_code (api, access_token);
+
+}
+
+static void
hangouts_login (PurpleAccount *acct)
{
PurpleConnection *gc;
gc = purple_account_get_connection (acct);
HangoutsApi *api;
+ api = hangouts_api_new (gc);
- api = hangouts_api_new (gc);
- hangouts_api_get_galx_cookie (api);
+ purple_notify_uri (acct, HANGOUTS_API_OAUTH2_AUTHORIZATION_CODE_URL);
+ purple_request_input (gc, _ ("Authorization Code"), NULL,
+ _ ("Please paste the authorization code here"),
+ NULL,
+ FALSE, NULL, NULL, _ ("OK"),
+ G_CALLBACK(hangouts_input_cb), _ ("Cancel"), NULL,
+ purple_request_cpar_from_connection (gc), api);
+
}
static void
More information about the Commits
mailing list