After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761510 - Factorize common code in GoaBackend::build_object()
Factorize common code in GoaBackend::build_object()
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-02-03 16:47 UTC by Christophe Fergeau
Modified: 2016-03-15 18:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add goa_object_skeleton_attach_calendar() helper (4.88 KB, patch)
2016-02-03 16:47 UTC, Christophe Fergeau
committed Details | Review
providers: Use goa_object_skeleton_attach_calendar() helper (7.20 KB, patch)
2016-02-03 16:47 UTC, Christophe Fergeau
committed Details | Review
Add goa_object_skeleton_attach_files() helper (2.47 KB, patch)
2016-02-03 16:47 UTC, Christophe Fergeau
committed Details | Review
providers: Use goa_object_skeleton_attach_files() helper (4.52 KB, patch)
2016-02-03 16:47 UTC, Christophe Fergeau
committed Details | Review
Add goa_object_skeleton_attach_contacts() helper (2.73 KB, patch)
2016-02-03 16:47 UTC, Christophe Fergeau
committed Details | Review
providers: Use goa_object_skeleton_attach_contacts() helper (6.18 KB, patch)
2016-02-03 16:47 UTC, Christophe Fergeau
committed Details | Review
Add goa_object_skeleton_attach_documents() helper (2.26 KB, patch)
2016-02-03 16:47 UTC, Christophe Fergeau
committed Details | Review
providers: Use goa_object_skeleton_attach_documents() helper (5.32 KB, patch)
2016-02-03 16:47 UTC, Christophe Fergeau
committed Details | Review
Add goa_object_skeleton_attach_chat() helper (2.31 KB, patch)
2016-02-03 16:47 UTC, Christophe Fergeau
none Details | Review
providers: Use goa_object_skeleton_attach_chat() helper (3.55 KB, patch)
2016-02-03 16:48 UTC, Christophe Fergeau
none Details | Review
Add goa_object_skeleton_attach_photos() helper (1.97 KB, patch)
2016-02-03 16:48 UTC, Christophe Fergeau
none Details | Review
providers: Use goa_object_skeleton_attach_photos() helper (6.54 KB, patch)
2016-02-03 16:48 UTC, Christophe Fergeau
none Details | Review
Add goa_object_skeleton_attach_printers() helper (2.03 KB, patch)
2016-02-03 16:48 UTC, Christophe Fergeau
none Details | Review
providers: Use goa_object_skeleton_attach_printers() helper (1.75 KB, patch)
2016-02-03 16:48 UTC, Christophe Fergeau
none Details | Review
Add goa_object_skeleton_attach_maps() helper (2.09 KB, patch)
2016-02-03 16:48 UTC, Christophe Fergeau
none Details | Review
providers: Use goa_object_skeleton_attach_maps() helper (1.51 KB, patch)
2016-02-03 16:48 UTC, Christophe Fergeau
none Details | Review
Add and use goa_object_skeleton_attach_read_later (3.65 KB, patch)
2016-02-03 16:48 UTC, Christophe Fergeau
none Details | Review
backend: Add goa_object_skeleton_attach_calendar helper (4.89 KB, patch)
2016-02-12 15:13 UTC, Debarshi Ray
committed Details | Review
backend: Use goa_object_skeleton_attach_calendar helper (6.80 KB, patch)
2016-02-12 15:14 UTC, Debarshi Ray
committed Details | Review
backend: Add goa_object_skeleton_attach_files helper (2.56 KB, patch)
2016-02-12 15:41 UTC, Debarshi Ray
committed Details | Review
backend: Use goa_object_skeleton_attach_files helper (4.34 KB, patch)
2016-02-12 15:41 UTC, Debarshi Ray
committed Details | Review
backend: Add goa_object_skeleton_attach_contacts helper (2.81 KB, patch)
2016-02-12 16:00 UTC, Debarshi Ray
committed Details | Review
backend: Use goa_object_skeleton_attach_contacts helper (6.05 KB, patch)
2016-02-12 16:00 UTC, Debarshi Ray
committed Details | Review
backend: Add goa_object_skeleton_attach_chat() helper (2.40 KB, patch)
2016-02-15 19:22 UTC, Christophe Fergeau
committed Details | Review
backend: Use goa_object_skeleton_attach_chat() helper (3.60 KB, patch)
2016-02-15 19:22 UTC, Christophe Fergeau
committed Details | Review
backend: Add goa_object_skeleton_attach_photos() helper (2.03 KB, patch)
2016-02-15 19:22 UTC, Christophe Fergeau
committed Details | Review
backend: Use goa_object_skeleton_attach_photos() helper (6.59 KB, patch)
2016-02-15 19:22 UTC, Christophe Fergeau
committed Details | Review
backend: Add goa_object_skeleton_attach_printers() helper (2.08 KB, patch)
2016-02-15 19:23 UTC, Christophe Fergeau
committed Details | Review
backend: Use goa_object_skeleton_attach_printers() helper (1.80 KB, patch)
2016-02-15 19:23 UTC, Christophe Fergeau
committed Details | Review
backend: Add goa_object_skeleton_attach_maps() helper (2.15 KB, patch)
2016-02-15 19:23 UTC, Christophe Fergeau
committed Details | Review
backend: Use goa_object_skeleton_attach_maps() helper (1.55 KB, patch)
2016-02-15 19:23 UTC, Christophe Fergeau
committed Details | Review
backend: Add and use goa_object_skeleton_attach_read_later (3.71 KB, patch)
2016-02-15 19:23 UTC, Christophe Fergeau
committed Details | Review
backend: Add goa_object_skeleton_attach_chat() helper (2.42 KB, patch)
2016-03-15 17:56 UTC, Debarshi Ray
committed Details | Review
backend: Use goa_object_skeleton_attach_printers() helper (1.81 KB, patch)
2016-03-15 18:29 UTC, Debarshi Ray
committed Details | Review
backend: Use goa_object_skeleton_attach_maps() helper (3.03 KB, patch)
2016-03-15 18:40 UTC, Debarshi Ray
committed Details | Review

Description Christophe Fergeau 2016-02-03 16:47:03 UTC
This patch series adds some helpers to attach the various GoaBackend features
(calendar, documents, contacts, ..) to a GoaBackend
Comment 1 Christophe Fergeau 2016-02-03 16:47:09 UTC
Created attachment 320368 [details] [review]
Add goa_object_skeleton_attach_calendar() helper
Comment 2 Christophe Fergeau 2016-02-03 16:47:15 UTC
Created attachment 320369 [details] [review]
providers: Use goa_object_skeleton_attach_calendar() helper
Comment 3 Christophe Fergeau 2016-02-03 16:47:21 UTC
Created attachment 320370 [details] [review]
Add goa_object_skeleton_attach_files() helper
Comment 4 Christophe Fergeau 2016-02-03 16:47:26 UTC
Created attachment 320371 [details] [review]
providers: Use goa_object_skeleton_attach_files() helper
Comment 5 Christophe Fergeau 2016-02-03 16:47:31 UTC
Created attachment 320372 [details] [review]
Add goa_object_skeleton_attach_contacts() helper
Comment 6 Christophe Fergeau 2016-02-03 16:47:37 UTC
Created attachment 320373 [details] [review]
providers: Use goa_object_skeleton_attach_contacts() helper
Comment 7 Christophe Fergeau 2016-02-03 16:47:42 UTC
Created attachment 320374 [details] [review]
Add goa_object_skeleton_attach_documents() helper
Comment 8 Christophe Fergeau 2016-02-03 16:47:48 UTC
Created attachment 320375 [details] [review]
providers: Use goa_object_skeleton_attach_documents() helper
Comment 9 Christophe Fergeau 2016-02-03 16:47:53 UTC
Created attachment 320376 [details] [review]
Add goa_object_skeleton_attach_chat() helper
Comment 10 Christophe Fergeau 2016-02-03 16:48:00 UTC
Created attachment 320377 [details] [review]
providers: Use goa_object_skeleton_attach_chat() helper
Comment 11 Christophe Fergeau 2016-02-03 16:48:05 UTC
Created attachment 320378 [details] [review]
Add goa_object_skeleton_attach_photos() helper
Comment 12 Christophe Fergeau 2016-02-03 16:48:11 UTC
Created attachment 320379 [details] [review]
providers: Use goa_object_skeleton_attach_photos() helper
Comment 13 Christophe Fergeau 2016-02-03 16:48:17 UTC
Created attachment 320380 [details] [review]
Add goa_object_skeleton_attach_printers() helper
Comment 14 Christophe Fergeau 2016-02-03 16:48:24 UTC
Created attachment 320381 [details] [review]
providers: Use goa_object_skeleton_attach_printers() helper
Comment 15 Christophe Fergeau 2016-02-03 16:48:30 UTC
Created attachment 320382 [details] [review]
Add goa_object_skeleton_attach_maps() helper
Comment 16 Christophe Fergeau 2016-02-03 16:48:36 UTC
Created attachment 320383 [details] [review]
providers: Use goa_object_skeleton_attach_maps() helper
Comment 17 Christophe Fergeau 2016-02-03 16:48:42 UTC
Created attachment 320384 [details] [review]
Add and use goa_object_skeleton_attach_read_later
Comment 18 Debarshi Ray 2016-02-12 15:08:57 UTC
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. :)
Comment 19 Debarshi Ray 2016-02-12 15:09:06 UTC
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.
Comment 20 Debarshi Ray 2016-02-12 15:13:29 UTC
Created attachment 320994 [details] [review]
backend: Add goa_object_skeleton_attach_calendar helper

Pushed after adding the bug URL and making the above adjustments.
Comment 21 Debarshi Ray 2016-02-12 15:14:00 UTC
Created attachment 320995 [details] [review]
backend: Use goa_object_skeleton_attach_calendar helper
Comment 22 Debarshi Ray 2016-02-12 15:39:17 UTC
Review of attachment 320370 [details] [review]:

Looks good.
Comment 23 Debarshi Ray 2016-02-12 15:40:19 UTC
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.
Comment 24 Debarshi Ray 2016-02-12 15:41:04 UTC
Created attachment 320997 [details] [review]
backend: Add goa_object_skeleton_attach_files helper

Pushed after adding the bug URL.
Comment 25 Debarshi Ray 2016-02-12 15:41:45 UTC
Created attachment 320998 [details] [review]
backend: Use goa_object_skeleton_attach_files helper
Comment 26 Debarshi Ray 2016-02-12 15:58:36 UTC
Review of attachment 320372 [details] [review]:

Thanks, Christophe. Looks good.
Comment 27 Debarshi Ray 2016-02-12 15:59:17 UTC
Review of attachment 320373 [details] [review]:

Looks good, apart from the missing bug URL.
Comment 28 Debarshi Ray 2016-02-12 16:00:09 UTC
Created attachment 321002 [details] [review]
backend: Add goa_object_skeleton_attach_contacts helper
Comment 29 Debarshi Ray 2016-02-12 16:00:42 UTC
Created attachment 321003 [details] [review]
backend: Use goa_object_skeleton_attach_contacts helper
Comment 30 Debarshi Ray 2016-02-12 17:40:12 UTC
Review of attachment 320374 [details] [review]:

Looks good. Pushed.
Comment 31 Debarshi Ray 2016-02-12 17:42:07 UTC
Review of attachment 320375 [details] [review]:

Looks good. Pushed.
Comment 32 Debarshi Ray 2016-02-15 10:28:20 UTC
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.
Comment 33 Christophe Fergeau 2016-02-15 19:22:37 UTC
Created attachment 321289 [details] [review]
backend: Add goa_object_skeleton_attach_chat() helper
Comment 34 Christophe Fergeau 2016-02-15 19:22:44 UTC
Created attachment 321290 [details] [review]
backend: Use goa_object_skeleton_attach_chat() helper
Comment 35 Christophe Fergeau 2016-02-15 19:22:50 UTC
Created attachment 321291 [details] [review]
backend: Add goa_object_skeleton_attach_photos() helper
Comment 36 Christophe Fergeau 2016-02-15 19:22:57 UTC
Created attachment 321292 [details] [review]
backend: Use goa_object_skeleton_attach_photos() helper
Comment 37 Christophe Fergeau 2016-02-15 19:23:04 UTC
Created attachment 321293 [details] [review]
backend: Add goa_object_skeleton_attach_printers() helper
Comment 38 Christophe Fergeau 2016-02-15 19:23:12 UTC
Created attachment 321294 [details] [review]
backend: Use goa_object_skeleton_attach_printers() helper
Comment 39 Christophe Fergeau 2016-02-15 19:23:18 UTC
Created attachment 321295 [details] [review]
backend: Add goa_object_skeleton_attach_maps() helper
Comment 40 Christophe Fergeau 2016-02-15 19:23:26 UTC
Created attachment 321296 [details] [review]
backend: Use goa_object_skeleton_attach_maps() helper
Comment 41 Christophe Fergeau 2016-02-15 19:23:32 UTC
Created attachment 321297 [details] [review]
backend: Add and use goa_object_skeleton_attach_read_later
Comment 42 Christophe Fergeau 2016-02-15 19:24:53 UTC
(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.
Comment 43 Debarshi Ray 2016-03-15 17:48:36 UTC
Review of attachment 321290 [details] [review]:

Thanks, Christophe. Perfect.
Comment 44 Debarshi Ray 2016-03-15 17:49:18 UTC
Review of attachment 321289 [details] [review]:

::: src/goabackend/goaobjectskeletonutils.c
@@ +160,3 @@
+#endif
+
+

Minor: couple of spurious newlines.
Comment 45 Debarshi Ray 2016-03-15 17:56:22 UTC
Created attachment 324034 [details] [review]
backend: Add goa_object_skeleton_attach_chat() helper

Fixed and pushed.
Comment 46 Debarshi Ray 2016-03-15 18:20:48 UTC
Review of attachment 321291 [details] [review]:

Looks good to me. Pushed.
Comment 47 Debarshi Ray 2016-03-15 18:21:31 UTC
Review of attachment 321292 [details] [review]:

Looks good to me. Pushed.
Comment 48 Debarshi Ray 2016-03-15 18:27:32 UTC
Review of attachment 321293 [details] [review]:

Looks good to me.
Comment 49 Debarshi Ray 2016-03-15 18:28:32 UTC
Review of attachment 321294 [details] [review]:

::: src/goabackend/goagoogleprovider.c
@@ -436,1 @@
 

Minor: one extra newline left behind.
Comment 50 Debarshi Ray 2016-03-15 18:29:28 UTC
Created attachment 324036 [details] [review]
backend: Use goa_object_skeleton_attach_printers() helper

Fixed and pushed.
Comment 51 Debarshi Ray 2016-03-15 18:38:40 UTC
Review of attachment 321295 [details] [review]:

Thanks, Christophe. Perfect.
Comment 52 Debarshi Ray 2016-03-15 18:39:52 UTC
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.
Comment 53 Debarshi Ray 2016-03-15 18:40:38 UTC
Created attachment 324037 [details] [review]
backend: Use goa_object_skeleton_attach_maps() helper

Fixed and pushed.
Comment 54 Debarshi Ray 2016-03-15 18:50:12 UTC
Review of attachment 321297 [details] [review]:

Looks good to me.
Comment 55 Debarshi Ray 2016-03-15 18:50:42 UTC
Thanks for all the patches!