Merge lp:~rodrigo-moya/ubuntuone-client/fix-634384 into lp:ubuntuone-client

Proposed by Rodrigo Moya
Status: Merged
Approved by: Rodrigo Moya
Approved revision: 706
Merged at revision: 713
Proposed branch: lp:~rodrigo-moya/ubuntuone-client/fix-634384
Merge into: lp:ubuntuone-client
Diff against target: 52 lines (+20/-5)
2 files modified
libsyncdaemon/syncdaemon-authentication.c (+19/-5)
libsyncdaemon/syncdaemon-authentication.h (+1/-0)
To merge this branch: bzr merge lp:~rodrigo-moya/ubuntuone-client/fix-634384
Reviewer Review Type Date Requested Status
Manuel de la Peña (community) Approve
Rick McBride (community) Approve
Review via email: mp+35805@code.launchpad.net

Commit message

Add syncdaemon_authentication_clear_token API for the music store to deal with invalid tokens

Description of the change

Add syncdaemon_authentication_clear_token API for the music store to deal with invalid tokens

To post a comment you must log in.
706. By Rodrigo Moya

Merge from trunk

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

This is part of the fix needed for lp:~rodrigo-moya/libubuntuone/fix-634384

Revision history for this message
Rick McBride (rmcbride) :
review: Approve
Revision history for this message
Manuel de la Peña (mandel) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libsyncdaemon/syncdaemon-authentication.c'
--- libsyncdaemon/syncdaemon-authentication.c 2010-08-26 14:25:29 +0000
+++ libsyncdaemon/syncdaemon-authentication.c 2010-09-17 11:58:42 +0000
@@ -252,18 +252,32 @@
252void252void
253syncdaemon_authentication_login_or_register (SyncdaemonAuthentication *auth)253syncdaemon_authentication_login_or_register (SyncdaemonAuthentication *auth)
254{254{
255 g_return_if_fail (SYNCDAEMON_IS_AUTHENTICATION (auth));
256
257 dbus_g_proxy_call_no_reply (auth->priv->proxy, "login_or_register_to_get_credentials",
258 G_TYPE_STRING, SSO_APP_NAME,
259 G_TYPE_STRING, SSO_TC_URL,
260 G_TYPE_STRING, _(SSO_DESCRIPTION),
261 G_TYPE_INT64, 0, /* FIXME */
262 G_TYPE_INVALID,
263 G_TYPE_INVALID);
264}
265
266/**
267 * syncdaemon_authentication_clear_token:
268 */
269void
270syncdaemon_authentication_clear_token (SyncdaemonAuthentication *auth)
271{
255 GError *error = NULL;272 GError *error = NULL;
256273
257 g_return_if_fail (SYNCDAEMON_IS_AUTHENTICATION (auth));274 g_return_if_fail (SYNCDAEMON_IS_AUTHENTICATION (auth));
258275
259 if (!dbus_g_proxy_call (auth->priv->proxy, "login_or_register_to_get_credentials", &error,276 if (!dbus_g_proxy_call (auth->priv->proxy, "clear_token", &error,
260 G_TYPE_STRING, SSO_APP_NAME,277 G_TYPE_STRING, SSO_APP_NAME,
261 G_TYPE_STRING, SSO_TC_URL,
262 G_TYPE_STRING, _(SSO_DESCRIPTION),
263 G_TYPE_INT64, 0, /* FIXME */
264 G_TYPE_INVALID,278 G_TYPE_INVALID,
265 G_TYPE_INVALID)) {279 G_TYPE_INVALID)) {
266 g_warning ("Could not login or register for 'ubuntuone': %s", error->message);280 g_warning ("Error calling 'clear_token': %s", error->message);
267 g_error_free (error);281 g_error_free (error);
268 }282 }
269}283}
270284
=== modified file 'libsyncdaemon/syncdaemon-authentication.h'
--- libsyncdaemon/syncdaemon-authentication.h 2010-08-11 08:48:24 +0000
+++ libsyncdaemon/syncdaemon-authentication.h 2010-09-17 11:58:42 +0000
@@ -55,6 +55,7 @@
55SyncdaemonCredentials *syncdaemon_authentication_find_credentials (SyncdaemonAuthentication *auth);55SyncdaemonCredentials *syncdaemon_authentication_find_credentials (SyncdaemonAuthentication *auth);
56gboolean syncdaemon_authentication_has_credentials (SyncdaemonAuthentication *auth);56gboolean syncdaemon_authentication_has_credentials (SyncdaemonAuthentication *auth);
57void syncdaemon_authentication_login_or_register (SyncdaemonAuthentication *auth);57void syncdaemon_authentication_login_or_register (SyncdaemonAuthentication *auth);
58void syncdaemon_authentication_clear_token (SyncdaemonAuthentication *auth);
5859
59G_END_DECLS60G_END_DECLS
6061

Subscribers

People subscribed via source and target branches