GNOME Bugzilla – Bug 761510
Factorize common code in GoaBackend::build_object()
Last modified: 2016-03-15 18:50:42 UTC
This patch series adds some helpers to attach the various GoaBackend features (calendar, documents, contacts, ..) to a GoaBackend
Created attachment 320368 [details] [review] Add goa_object_skeleton_attach_calendar() helper
Created attachment 320369 [details] [review] providers: Use goa_object_skeleton_attach_calendar() helper
Created attachment 320370 [details] [review] Add goa_object_skeleton_attach_files() helper
Created attachment 320371 [details] [review] providers: Use goa_object_skeleton_attach_files() helper
Created attachment 320372 [details] [review] Add goa_object_skeleton_attach_contacts() helper
Created attachment 320373 [details] [review] providers: Use goa_object_skeleton_attach_contacts() helper
Created attachment 320374 [details] [review] Add goa_object_skeleton_attach_documents() helper
Created attachment 320375 [details] [review] providers: Use goa_object_skeleton_attach_documents() helper
Created attachment 320376 [details] [review] Add goa_object_skeleton_attach_chat() helper
Created attachment 320377 [details] [review] providers: Use goa_object_skeleton_attach_chat() helper
Created attachment 320378 [details] [review] Add goa_object_skeleton_attach_photos() helper
Created attachment 320379 [details] [review] providers: Use goa_object_skeleton_attach_photos() helper
Created attachment 320380 [details] [review] Add goa_object_skeleton_attach_printers() helper
Created attachment 320381 [details] [review] providers: Use goa_object_skeleton_attach_printers() helper
Created attachment 320382 [details] [review] Add goa_object_skeleton_attach_maps() helper
Created attachment 320383 [details] [review] providers: Use goa_object_skeleton_attach_maps() helper
Created attachment 320384 [details] [review] Add and use goa_object_skeleton_attach_read_later
Review of attachment 320368 [details] [review]: Thanks for the patches, Christophe. Looks quite good except a few minor things. ::: src/goabackend/goaobjectskeletonutils.c @@ +23,3 @@ + +#include "goaprovider.h" +#include "goautils.h" We don't need these two. ::: src/goabackend/goaobjectskeletonutils.h @@ +25,3 @@ +#include <gio/gio.h> +#include <glib.h> +#include <goabackend/goabackendtypes.h> Nitpick: we only need glib.h and goa/goa.h. @@ +32,3 @@ + const gchar *uri, + gboolean calendar_enabled, + gboolean accept_ssl_errors); Nitpick: we might as well align the alphabets since we are taking the trouble to align things. :)
Review of attachment 320369 [details] [review]: ::: src/goabackend/goaexchangeprovider.c @@ +175,3 @@ + NULL, + calendar_enabled, + FALSE); Could be in the same line. (We usually go till 120 columns - helps with GObject boilerplate.) ::: src/goabackend/goagoogleprovider.c @@ +403,3 @@ + email_address, + "/user", + NULL); It is simpler to not check calendar_enabled and keeps it consistent with the way you did it elsewhere.
Created attachment 320994 [details] [review] backend: Add goa_object_skeleton_attach_calendar helper Pushed after adding the bug URL and making the above adjustments.
Created attachment 320995 [details] [review] backend: Use goa_object_skeleton_attach_calendar helper
Review of attachment 320370 [details] [review]: Looks good.
Review of attachment 320371 [details] [review]: Looks quite good, except a few minor details. ::: src/goabackend/goagoogleprovider.c @@ +492,2 @@ if (files_enabled) + uri_drive = g_strconcat ("google-drive://", email_address, "/", NULL); We can get rid of the check as you did elsewhere. ::: src/goabackend/goaowncloudprovider.c @@ +261,3 @@ + uri_webdav, + files_enabled, + accept_ssl_errors); Nitpick: could be on the same line.
Created attachment 320997 [details] [review] backend: Add goa_object_skeleton_attach_files helper Pushed after adding the bug URL.
Created attachment 320998 [details] [review] backend: Use goa_object_skeleton_attach_files helper
Review of attachment 320372 [details] [review]: Thanks, Christophe. Looks good.
Review of attachment 320373 [details] [review]: Looks good, apart from the missing bug URL.
Created attachment 321002 [details] [review] backend: Add goa_object_skeleton_attach_contacts helper
Created attachment 321003 [details] [review] backend: Use goa_object_skeleton_attach_contacts helper
Review of attachment 320374 [details] [review]: Looks good. Pushed.
Review of attachment 320375 [details] [review]: Looks good. Pushed.
Hey, Christophe! Can you please try to rebase the remaining patches on top of master? For some reason, I can't get git am (--3way) to apply them.
Created attachment 321289 [details] [review] backend: Add goa_object_skeleton_attach_chat() helper
Created attachment 321290 [details] [review] backend: Use goa_object_skeleton_attach_chat() helper
Created attachment 321291 [details] [review] backend: Add goa_object_skeleton_attach_photos() helper
Created attachment 321292 [details] [review] backend: Use goa_object_skeleton_attach_photos() helper
Created attachment 321293 [details] [review] backend: Add goa_object_skeleton_attach_printers() helper
Created attachment 321294 [details] [review] backend: Use goa_object_skeleton_attach_printers() helper
Created attachment 321295 [details] [review] backend: Add goa_object_skeleton_attach_maps() helper
Created attachment 321296 [details] [review] backend: Use goa_object_skeleton_attach_maps() helper
Created attachment 321297 [details] [review] backend: Add and use goa_object_skeleton_attach_read_later
(In reply to Debarshi Ray from comment #32) > Hey, Christophe! Can you please try to rebase the remaining patches on top > of master? For some reason, I can't get git am (--3way) to apply them. Here you are. Only change compared to what was in the bug is that the first remaining patch was rebased to account for changes in earlier patches, and I amended the commit logs to match what you have pushed so far.
Review of attachment 321290 [details] [review]: Thanks, Christophe. Perfect.
Review of attachment 321289 [details] [review]: ::: src/goabackend/goaobjectskeletonutils.c @@ +160,3 @@ +#endif + + Minor: couple of spurious newlines.
Created attachment 324034 [details] [review] backend: Add goa_object_skeleton_attach_chat() helper Fixed and pushed.
Review of attachment 321291 [details] [review]: Looks good to me. Pushed.
Review of attachment 321292 [details] [review]: Looks good to me. Pushed.
Review of attachment 321293 [details] [review]: Looks good to me.
Review of attachment 321294 [details] [review]: ::: src/goabackend/goagoogleprovider.c @@ -436,1 @@ Minor: one extra newline left behind.
Created attachment 324036 [details] [review] backend: Use goa_object_skeleton_attach_printers() helper Fixed and pushed.
Review of attachment 321295 [details] [review]: Thanks, Christophe. Perfect.
Review of attachment 321296 [details] [review]: ::: src/goabackend/goafacebookprovider.c @@ -372,3 @@ - if (maps != NULL) - goa_object_skeleton_set_maps (object, NULL); - } We should do the same in the Foursquare provider.
Created attachment 324037 [details] [review] backend: Use goa_object_skeleton_attach_maps() helper Fixed and pushed.
Review of attachment 321297 [details] [review]: Looks good to me.
Thanks for all the patches!