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
1=== modified file 'libsyncdaemon/syncdaemon-authentication.c'
2--- libsyncdaemon/syncdaemon-authentication.c 2010-08-26 14:25:29 +0000
3+++ libsyncdaemon/syncdaemon-authentication.c 2010-09-17 11:58:42 +0000
4@@ -252,18 +252,32 @@
5 void
6 syncdaemon_authentication_login_or_register (SyncdaemonAuthentication *auth)
7 {
8+ g_return_if_fail (SYNCDAEMON_IS_AUTHENTICATION (auth));
9+
10+ dbus_g_proxy_call_no_reply (auth->priv->proxy, "login_or_register_to_get_credentials",
11+ G_TYPE_STRING, SSO_APP_NAME,
12+ G_TYPE_STRING, SSO_TC_URL,
13+ G_TYPE_STRING, _(SSO_DESCRIPTION),
14+ G_TYPE_INT64, 0, /* FIXME */
15+ G_TYPE_INVALID,
16+ G_TYPE_INVALID);
17+}
18+
19+/**
20+ * syncdaemon_authentication_clear_token:
21+ */
22+void
23+syncdaemon_authentication_clear_token (SyncdaemonAuthentication *auth)
24+{
25 GError *error = NULL;
26
27 g_return_if_fail (SYNCDAEMON_IS_AUTHENTICATION (auth));
28
29- if (!dbus_g_proxy_call (auth->priv->proxy, "login_or_register_to_get_credentials", &error,
30+ if (!dbus_g_proxy_call (auth->priv->proxy, "clear_token", &error,
31 G_TYPE_STRING, SSO_APP_NAME,
32- G_TYPE_STRING, SSO_TC_URL,
33- G_TYPE_STRING, _(SSO_DESCRIPTION),
34- G_TYPE_INT64, 0, /* FIXME */
35 G_TYPE_INVALID,
36 G_TYPE_INVALID)) {
37- g_warning ("Could not login or register for 'ubuntuone': %s", error->message);
38+ g_warning ("Error calling 'clear_token': %s", error->message);
39 g_error_free (error);
40 }
41 }
42
43=== modified file 'libsyncdaemon/syncdaemon-authentication.h'
44--- libsyncdaemon/syncdaemon-authentication.h 2010-08-11 08:48:24 +0000
45+++ libsyncdaemon/syncdaemon-authentication.h 2010-09-17 11:58:42 +0000
46@@ -55,6 +55,7 @@
47 SyncdaemonCredentials *syncdaemon_authentication_find_credentials (SyncdaemonAuthentication *auth);
48 gboolean syncdaemon_authentication_has_credentials (SyncdaemonAuthentication *auth);
49 void syncdaemon_authentication_login_or_register (SyncdaemonAuthentication *auth);
50+void syncdaemon_authentication_clear_token (SyncdaemonAuthentication *auth);
51
52 G_END_DECLS
53

Subscribers

People subscribed via source and target branches