Merge lp:~online-accounts/libsignon-glib/packaging into lp:libsignon-glib

Proposed by Alberto Mardegan
Status: Merged
Approved by: David Barth
Approved revision: no longer in the source branch.
Merged at revision: 150
Proposed branch: lp:~online-accounts/libsignon-glib/packaging
Merge into: lp:libsignon-glib
Diff against target: 354 lines (+79/-44)
8 files modified
NEWS (+14/-0)
configure.ac (+1/-1)
debian/changelog (+14/-0)
libsignon-glib/signon-auth-service.c (+2/-2)
libsignon-glib/signon-auth-session.c (+16/-21)
libsignon-glib/signon-identity.h (+1/-1)
libsignon-glib/signon.vapi (+17/-15)
tests/check_signon.c (+14/-4)
To merge this branch: bzr merge lp:~online-accounts/libsignon-glib/packaging
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
David Barth (community) Approve
Review via email: mp+244098@code.launchpad.net

Commit message

New upstream release

- Introspection: fix transfer type of some methods
- Update VALA bindings (bug 1382843)

Description of the change

New upstream release

- Introspection: fix transfer type of some methods
- Update VALA bindings (bug 1382843)

To post a comment you must log in.
Revision history for this message
David Barth (dbarth) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
150. By Alberto Mardegan

New upstream release

- Introspection: fix transfer type of some methods
- Update VALA bindings (bug 1382843)

Approved by: David Barth

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2013-06-05 11:28:59 +0000
3+++ NEWS 2014-12-09 13:40:34 +0000
4@@ -1,5 +1,19 @@
5 libsignon-glib NEWS
6
7+Version 1.12
8+------------
9+
10+* Introspection: fix transfer type of some methods
11+* Update VALA bindings
12+
13+Version 1.11
14+------------
15+
16+* Disconnect from signals when the remote AuthSession dies
17+ http://code.google.com/p/accounts-sso/issues/detail?id=229
18+* Avoid unreferencing a NULL GVariant
19+* Fix the linking problem when using check
20+
21 Version 1.10
22 ------------
23
24
25=== modified file 'configure.ac'
26--- configure.ac 2013-06-21 14:46:21 +0000
27+++ configure.ac 2014-12-09 13:40:34 +0000
28@@ -1,7 +1,7 @@
29 dnl Process this file with autoconf to produce a configure script.
30 AC_PREREQ([2.64])
31 AC_INIT([libsignon-glib],
32- [1.10],
33+ [1.12],
34 [http://code.google.com/p/accounts-sso/issues/entry],
35 [libsignon-glib],
36 [http://code.google.com/p/accounts-sso/])
37
38=== modified file 'debian/changelog'
39--- debian/changelog 2013-06-25 04:31:09 +0000
40+++ debian/changelog 2014-12-09 13:40:34 +0000
41@@ -1,3 +1,17 @@
42+libsignon-glib (1.12-0ubuntu1) UNRELEASED; urgency=medium
43+
44+ * New upstream release.
45+ - Introspection: fix transfer type of some methods
46+ - Update VALA bindings (LP: #1382843)
47+
48+ -- Alberto Mardegan <alberto.mardegan@canonical.com> Tue, 09 Dec 2014 11:21:44 +0200
49+
50+libsignon-glib (1.10daily13.06.25-0ubuntu2) trusty; urgency=medium
51+
52+ * Rebuild to drop files installed into /usr/share/pyshared.
53+
54+ -- Matthias Klose <doko@ubuntu.com> Sun, 23 Feb 2014 13:48:19 +0000
55+
56 libsignon-glib (1.10daily13.06.25-0ubuntu1) saucy; urgency=low
57
58 [ Jeremy Bicha ]
59
60=== modified file 'libsignon-glib/signon-auth-service.c'
61--- libsignon-glib/signon-auth-service.c 2012-11-29 12:00:52 +0000
62+++ libsignon-glib/signon-auth-service.c 2014-12-09 13:40:34 +0000
63@@ -176,7 +176,7 @@
64 /**
65 * SignonQueryMethodsCb:
66 * @auth_service: the #SignonAuthService.
67- * @methods: (transfer full) (type GStrv): list of available methods.
68+ * @methods: (transfer none) (type GStrv): list of available methods.
69 * @error: a #GError if an error occurred, %NULL otherwise.
70 * @user_data: the user data that was passed when installing this callback.
71 *
72@@ -218,7 +218,7 @@
73 * SignonQueryMechanismCb:
74 * @auth_service: the #SignonAuthService.
75 * @method: the authentication method being inspected.
76- * @mechanisms: (transfer full) (type GStrv): list of available mechanisms.
77+ * @mechanisms: (transfer none) (type GStrv): list of available mechanisms.
78 * @error: a #GError if an error occurred, %NULL otherwise.
79 * @user_data: the user data that was passed when installing this callback.
80 *
81
82=== modified file 'libsignon-glib/signon-auth-session.c'
83--- libsignon-glib/signon-auth-session.c 2013-02-05 14:23:39 +0000
84+++ libsignon-glib/signon-auth-session.c 2014-12-09 13:40:34 +0000
85@@ -244,13 +244,25 @@
86 if (reply != NULL)
87 g_hash_table_unref (reply);
88 }
89- g_variant_unref (v_reply);
90+
91+ if (v_reply != NULL)
92+ g_variant_unref (v_reply);
93
94 g_slice_free (AuthSessionProcessCbData, cb_data);
95 g_clear_error (&error);
96 g_object_unref (res);
97 }
98
99+static void
100+destroy_proxy (SignonAuthSessionPrivate *priv)
101+{
102+ g_signal_handler_disconnect (priv->proxy, priv->signal_state_changed);
103+ g_signal_handler_disconnect (priv->proxy, priv->signal_unregistered);
104+ g_object_unref (priv->proxy);
105+
106+ priv->proxy = NULL;
107+}
108+
109 static GQuark
110 auth_session_object_quark ()
111 {
112@@ -288,13 +300,7 @@
113 }
114
115 if (priv->proxy)
116- {
117- g_signal_handler_disconnect (priv->proxy, priv->signal_state_changed);
118- g_signal_handler_disconnect (priv->proxy, priv->signal_unregistered);
119- g_object_unref (priv->proxy);
120-
121- priv->proxy = NULL;
122- }
123+ destroy_proxy (priv);
124
125 if (priv->auth_service_proxy)
126 {
127@@ -503,7 +509,7 @@
128 /**
129 * SignonAuthSessionProcessCb:
130 * @self: the #SignonAuthSession.
131- * @session_data: (transfer full) (element-type utf8 GValue): a dictionary with
132+ * @session_data: (transfer none) (element-type utf8 GValue): a dictionary with
133 * the response.
134 * @error: a #GError if an error occurred, %NULL otherwise.
135 * @user_data: the user data that was passed when installing this callback.
136@@ -763,19 +769,8 @@
137 DEBUG ("remote object unregistered");
138
139 if (priv->proxy)
140- {
141- g_object_unref (priv->proxy);
142- priv->proxy = NULL;
143- }
144+ destroy_proxy (priv);
145
146- /*
147- * as remote object is destroyed only
148- * when the session core is destroyed,
149- * so there should not be any processes
150- * running
151- * */
152- priv->busy = FALSE;
153- priv->canceled = FALSE;
154 _signon_object_not_ready(self);
155 }
156
157
158=== modified file 'libsignon-glib/signon-identity.h'
159--- libsignon-glib/signon-identity.h 2012-01-27 10:24:27 +0000
160+++ libsignon-glib/signon-identity.h 2014-12-09 13:40:34 +0000
161@@ -165,7 +165,7 @@
162 /**
163 * SignonIdentityInfoCb:
164 * @self: the #SignonIdentity.
165- * @info: the #SignonIdentityInfo for @self.
166+ * @info: (transfer none): the #SignonIdentityInfo for @self.
167 * @error: a #GError if an error occurred, or %NULL otherwise.
168 * @user_data: the user data that was passed when installing this callback.
169 *
170
171=== modified file 'libsignon-glib/signon.vapi'
172--- libsignon-glib/signon.vapi 2012-07-16 12:29:34 +0000
173+++ libsignon-glib/signon.vapi 2014-12-09 13:40:34 +0000
174@@ -6,8 +6,8 @@
175 public class AuthService : GLib.Object {
176 [CCode (has_construct_function = false)]
177 public AuthService ();
178- public void query_mechanisms (string method, Signon.QueryMechanismCb cb);
179- public void query_methods (Signon.QueryMethodsCb cb);
180+ public void query_mechanisms (string method, [CCode (scope = "async")] owned Signon.QueryMechanismCb cb);
181+ public void query_methods ([CCode (scope = "async")] owned Signon.QueryMethodsCb cb);
182 }
183 [CCode (cheader_filename = "libsignon-glib/signon-glib.h", type_id = "signon_auth_session_get_type ()")]
184 public class AuthSession : GLib.Object {
185@@ -15,9 +15,11 @@
186 public AuthSession (uint id, string method_name) throws GLib.Error;
187 public void cancel ();
188 public unowned string get_method ();
189- public void process (GLib.HashTable<string,GLib.Value?> session_data, string mechanism, Signon.AuthSessionProcessCb cb);
190- public void query_available_mechanisms (string wanted_mechanisms, Signon.AuthSessionQueryAvailableMechanismsCb cb);
191- public signal void state_changed (int object, string p0);
192+ [Deprecated (since = "1.8")]
193+ public void process (GLib.HashTable<string,GLib.Value?> session_data, string mechanism, [CCode (scope = "async")] owned Signon.AuthSessionProcessCb cb);
194+ public async GLib.Variant process_async (GLib.Variant session_data, string mechanism, GLib.Cancellable? cancellable) throws GLib.Error;
195+ public void query_available_mechanisms (string wanted_mechanisms, [CCode (scope = "async")] owned Signon.AuthSessionQueryAvailableMechanismsCb cb);
196+ public signal void state_changed (int state, string message);
197 }
198 [CCode (cheader_filename = "libsignon-glib/signon-glib.h", type_id = "signon_identity_get_type ()")]
199 public class Identity : GLib.Object {
200@@ -28,12 +30,12 @@
201 [CCode (has_construct_function = false)]
202 public Identity.from_db (uint32 id);
203 public unowned GLib.Error get_last_error ();
204- public void query_info (Signon.IdentityInfoCb cb);
205- public void remove (Signon.IdentityRemovedCb cb, void* user_data);
206+ public void query_info ([CCode (scope = "async")] owned Signon.IdentityInfoCb cb);
207+ public void remove ([CCode (scope = "async")] owned Signon.IdentityRemovedCb cb, void* user_data);
208 public void remove_reference (string reference, Signon.IdentityReferenceRemovedCb cb, void* user_data);
209- public void store_credentials_with_args (string username, string secret, bool store_secret, GLib.HashTable<string,string[]> methods, string caption, string realms, string access_control_list, Signon.IdentityType type, Signon.IdentityStoreCredentialsCb cb);
210- public void store_credentials_with_info (Signon.IdentityInfo info, Signon.IdentityStoreCredentialsCb cb);
211- public void verify_secret (string secret, Signon.IdentityVerifyCb cb);
212+ public void store_credentials_with_args (string username, string secret, bool store_secret, GLib.HashTable<string,string[]> methods, string caption, string realms, string access_control_list, Signon.IdentityType type, [CCode (scope = "async")] owned Signon.IdentityStoreCredentialsCb cb);
213+ public void store_credentials_with_info (Signon.IdentityInfo info, [CCode (scope = "async")] owned Signon.IdentityStoreCredentialsCb cb);
214+ public void verify_secret (string secret, [CCode (scope = "async")] owned Signon.IdentityVerifyCb cb);
215 [NoAccessorMethod]
216 public uint id { get; set; }
217 [HasEmitter]
218@@ -65,7 +67,7 @@
219 public void set_secret (string secret, bool store_secret);
220 public void set_username (string username);
221 }
222- [CCode (cheader_filename = "libsignon-glib/signon-glib.h", cprefix = "SIGNON_IDENTITY_TYPE_")]
223+ [CCode (cheader_filename = "libsignon-glib/signon-glib.h", cprefix = "SIGNON_IDENTITY_TYPE_", type_id = "signon_identity_type_get_type ()")]
224 [Flags]
225 public enum IdentityType {
226 OTHER,
227@@ -73,7 +75,7 @@
228 WEB,
229 NETWORK
230 }
231- [CCode (cheader_filename = "libsignon-glib/signon-glib.h", cprefix = "SIGNON_POLICY_")]
232+ [CCode (cheader_filename = "libsignon-glib/signon-glib.h", cprefix = "SIGNON_POLICY_", type_id = "signon_session_data_ui_policy_get_type ()")]
233 public enum SessionDataUiPolicy {
234 DEFAULT,
235 REQUEST_PASSWORD,
236@@ -120,7 +122,7 @@
237 public static GLib.Quark quark ();
238 }
239 [CCode (cheader_filename = "libsignon-glib/signon-glib.h", instance_pos = 3.9)]
240- public delegate void AuthSessionProcessCb (Signon.AuthSession self, owned GLib.HashTable<string,GLib.Value?> session_data, GLib.Error error);
241+ public delegate void AuthSessionProcessCb (Signon.AuthSession self, GLib.HashTable<string,GLib.Value?> session_data, GLib.Error error);
242 [CCode (cheader_filename = "libsignon-glib/signon-glib.h", instance_pos = 3.9)]
243 public delegate void AuthSessionQueryAvailableMechanismsCb (Signon.AuthSession self, [CCode (array_length = false, array_null_terminated = true)] owned string[] mechanisms, GLib.Error error);
244 [CCode (cheader_filename = "libsignon-glib/signon-glib.h", instance_pos = 3.9)]
245@@ -142,9 +144,9 @@
246 [CCode (cheader_filename = "libsignon-glib/signon-glib.h", instance_pos = 2.9)]
247 public delegate void IdentityVoidCb (Signon.Identity self, GLib.Error error);
248 [CCode (cheader_filename = "libsignon-glib/signon-glib.h", instance_pos = 4.9)]
249- public delegate void QueryMechanismCb (Signon.AuthService auth_service, string method, [CCode (array_length = false, array_null_terminated = true)] owned string[] mechanisms, GLib.Error error);
250+ public delegate void QueryMechanismCb (Signon.AuthService auth_service, string method, [CCode (array_length = false, array_null_terminated = true)] string[] mechanisms, GLib.Error error);
251 [CCode (cheader_filename = "libsignon-glib/signon-glib.h", instance_pos = 3.9)]
252- public delegate void QueryMethodsCb (Signon.AuthService auth_service, [CCode (array_length = false, array_null_terminated = true)] owned string[] methods, GLib.Error error);
253+ public delegate void QueryMethodsCb (Signon.AuthService auth_service, [CCode (array_length = false, array_null_terminated = true)] string[] methods, GLib.Error error);
254 [CCode (cheader_filename = "libsignon-glib/signon-glib.h", cname = "SIGNON_SESSION_DATA_CAPTION")]
255 public const string SESSION_DATA_CAPTION;
256 [CCode (cheader_filename = "libsignon-glib/signon-glib.h", cname = "SIGNON_SESSION_DATA_PROXY")]
257
258=== modified file 'tests/check_signon.c'
259--- tests/check_signon.c 2013-06-05 07:34:33 +0000
260+++ tests/check_signon.c 2014-12-09 13:40:34 +0000
261@@ -648,6 +648,7 @@
262 {
263 SignonIdentityInfo *info;
264 SignonIdentity *identity;
265+ const gchar *const acl[] = { "*", NULL };
266
267 g_debug("%s", G_STRFUNC);
268
269@@ -659,6 +660,7 @@
270
271 info = signon_identity_info_new ();
272 signon_identity_info_set_username (info, "Nice user");
273+ signon_identity_info_set_access_control_list (info, acl);
274
275 signon_identity_store_credentials_with_info (identity,
276 info,
277@@ -716,6 +718,7 @@
278 {
279 SignonIdentity *identity;
280 GHashTable *methods;
281+ const gchar *const acl[] = { "*", NULL };
282 guint id = 0;
283
284 identity = signon_identity_new(NULL, NULL);
285@@ -728,7 +731,7 @@
286 methods,
287 "caption",
288 NULL,
289- NULL,
290+ acl,
291 0,
292 new_identity_store_credentials_cb,
293 &id);
294@@ -788,7 +791,8 @@
295 fail_unless (error != NULL);
296
297 fail_unless (error->domain == SIGNON_ERROR);
298- fail_unless (error->code == SIGNON_ERROR_IDENTITY_NOT_FOUND);
299+ fail_unless (error->code == SIGNON_ERROR_IDENTITY_NOT_FOUND ||
300+ error->code == SIGNON_ERROR_PERMISSION_DENIED);
301
302 end_test ();
303 }
304@@ -880,6 +884,8 @@
305
306 START_TEST(test_verify_secret_identity)
307 {
308+ const gchar *const acl[] = { "*", NULL };
309+
310 g_debug("%s", G_STRFUNC);
311 SignonIdentity *idty = signon_identity_new(NULL, NULL);
312 fail_unless (idty != NULL);
313@@ -899,7 +905,7 @@
314 methods,
315 caption,
316 NULL,
317- NULL,
318+ acl,
319 0,
320 store_credentials_identity_cb,
321 NULL);
322@@ -1069,6 +1075,7 @@
323
324 static SignonIdentityInfo *create_standard_info()
325 {
326+ const gchar *const acl[] = { "*", NULL };
327 g_debug("%s", G_STRFUNC);
328 SignonIdentityInfo *info = signon_identity_info_new ();
329 signon_identity_info_set_username (info, "James Bond");
330@@ -1085,12 +1092,15 @@
331 signon_identity_info_set_method (info, "method1", (const gchar **)mechanisms);
332 signon_identity_info_set_method (info, "method2", (const gchar **)mechanisms);
333 signon_identity_info_set_method (info, "method3", (const gchar **)mechanisms);
334+ signon_identity_info_set_access_control_list (info, acl);
335
336 return info;
337 }
338
339 START_TEST(test_info_identity)
340 {
341+ const gchar *const acl[] = { "*", NULL };
342+
343 g_debug("%s", G_STRFUNC);
344 SignonIdentity *idty = signon_identity_new();
345 fail_unless (idty != NULL);
346@@ -1114,7 +1124,7 @@
347 methods,
348 "caption",
349 NULL,
350- NULL,
351+ acl,
352 0,
353 store_credentials_identity_cb,
354 NULL);

Subscribers

No one subscribed via source and target branches