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 523632 - Google contacts backend
Google contacts backend
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Contacts
2.24.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
: 522656 (view as bug list)
Depends on: 523630
Blocks:
 
 
Reported: 2008-03-20 20:59 UTC by Jörgen Scheibengruber
Modified: 2013-09-14 16:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for trunk that adds the backend (69.46 KB, patch)
2008-04-25 21:19 UTC, Jörgen Scheibengruber
committed Details | Review
An eplugin that adds the configuration UI (12.77 KB, patch)
2008-05-24 14:32 UTC, Jörgen Scheibengruber
none Details | Review
This one integrates within the existing plugin, instead of creating a new (12.82 KB, patch)
2008-05-24 15:05 UTC, Jörgen Scheibengruber
none Details | Review
Woops, next try ;-) (12.94 KB, patch)
2008-05-24 15:10 UTC, Jörgen Scheibengruber
none Details | Review
Double free traces (44.58 KB, text/plain)
2008-05-27 10:25 UTC, Akhil Laddha
  Details
UI Patch with base directory path (13.28 KB, patch)
2008-05-27 10:29 UTC, Akhil Laddha
committed Details | Review
Attaching that patch here, too. (1.03 KB, patch)
2008-08-15 18:19 UTC, Jörgen Scheibengruber
committed Details | Review

Description Jörgen Scheibengruber 2008-03-20 20:59:51 UTC
I'm proposing the inclusion of a google contacts backend into EDS.

I've started working on this; the result can be found here (git repository): http://www.wh-hms.uni-ulm.de/~mfcn/eds-google-contacts.git/

Besides offline-mode all major features should be already implemented. There is of course still a lot of details that needs to be improved, but I think it's ready enough to get some attention and hopefully someone is interessted in reviewing it :-)
Comment 1 Suman Manjunath 2008-04-14 18:10:40 UTC
*** Bug 522656 has been marked as a duplicate of this bug. ***
Comment 2 Srinivasa Ragavan 2008-04-15 09:14:47 UTC
Wow. Jorgen, can you make a patch out of it and post it? I would be interested in taking it for GNOME 2.24's Evolution release. I can review and comment it for sure. (You can mail to me or attach to the bug). Thx for your awesome work.
Comment 3 Srinivasa Ragavan 2008-04-17 05:10:52 UTC
now bug 523630 is in svn, so this can get in if reviewed and seems fine.
Comment 4 Jörgen Scheibengruber 2008-04-17 18:50:21 UTC
Ok, cool :-) will do a patch over the weekend!
Comment 5 Jörgen Scheibengruber 2008-04-25 21:19:36 UTC
Created attachment 109934 [details] [review]
Patch for trunk that adds the backend

Hope this works (should apply and build fine with trunk). I haven't actually done 'make install' though, since i miss some dependencies to build the full e-d-s.
Comment 6 Chenthill P 2008-05-06 18:25:20 UTC
Ebby, the above patch needs some review love :-)
Comment 7 Srinivasa Ragavan 2008-05-14 06:37:44 UTC
Jörgen, your base code seems fine interms of the api implementation for the backend. You haven't yet impl the offline thing, that should be pretty simple to do. I haven't tested it, I will ask some one to  test it and may be we'll commit after that and we can fix bugs in the code after that.
Comment 8 Akhil Laddha 2008-05-15 11:06:00 UTC
Hey Jorgen,
            I applied your patch for testing but i couldn't find any GUI to access google contacts. Am i missed any thing ?

I got build error during compilation  

/bin/sh ../../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../.. -DG_LOG_DOMAIN=\"libebookbackendgoogle\" -I../../../addressbook -I../../../addressbook -I../../../servers/google/libgdata -I../../../servers/google/libgdata -I../../../servers/google/libgdata-google -I../../../servers/google/libgdata-google -I/home/build/opt/gnome2/include/libsoup-2.4 -I/home/build/opt/gnome2/include/libxml2 -I/home/build/opt/gnome2/include -I/home/build/opt/gnome2/include/glib-2.0 -I/home/build/opt/gnome2/lib/glib-2.0/include     -DORBIT2=1 -pthread -I/home/build/opt/gnome2/include/libxml2 -I/home/build/opt/gnome2/include/libgnome-2.0 -I/home/build/opt/gnome2/include/orbit-2.0 -I/home/build/opt/gnome2/include/gconf/2 -I/home/build/opt/gnome2/include/gnome-vfs-2.0 -I/home/build/opt/gnome2/lib/gnome-vfs-2.0/include -I/home/build/opt/gnome2/include -I/home/build/opt/gnome2/include/glib-2.0 -I/home/build/opt/gnome2/lib/glib-2.0/include -I/home/build/opt/gnome2/include/libbonobo-2.0 -I/home/build/opt/gnome2/include/bonobo-activation-2.0        -g -O2 -Wl,--allow-shlib-undefined -Wall -Wmissing-prototypes  -Wno-sign-compare -Wno-pointer-sign -MT e-book-backend-google-factory.lo -MD -MP -MF .deps/e-book-backend-google-factory.Tpo -c -o e-book-backend-google-factory.lo e-book-backend-google-factory.c
 gcc -DHAVE_CONFIG_H -I. -I../../.. -DG_LOG_DOMAIN=\"libebookbackendgoogle\" -I../../../addressbook -I../../../addressbook -I../../../servers/google/libgdata -I../../../servers/google/libgdata -I../../../servers/google/libgdata-google -I../../../servers/google/libgdata-google -I/home/build/opt/gnome2/include/libsoup-2.4 -I/home/build/opt/gnome2/include/libxml2 -I/home/build/opt/gnome2/include -I/home/build/opt/gnome2/include/glib-2.0 -I/home/build/opt/gnome2/lib/glib-2.0/include -DORBIT2=1 -pthread -I/home/build/opt/gnome2/include/libxml2 -I/home/build/opt/gnome2/include/libgnome-2.0 -I/home/build/opt/gnome2/include/orbit-2.0 -I/home/build/opt/gnome2/include/gconf/2 -I/home/build/opt/gnome2/include/gnome-vfs-2.0 -I/home/build/opt/gnome2/lib/gnome-vfs-2.0/include -I/home/build/opt/gnome2/include -I/home/build/opt/gnome2/include/glib-2.0 -I/home/build/opt/gnome2/lib/glib-2.0/include -I/home/build/opt/gnome2/include/libbonobo-2.0 -I/home/build/opt/gnome2/include/bonobo-activation-2.0 -g -O2 -Wl,--allow-shlib-undefined -Wall -Wmissing-prototypes -Wno-sign-compare -Wno-pointer-sign -MT e-book-backend-google-factory.lo -MD -MP -MF .deps/e-book-backend-google-factory.Tpo -c e-book-backend-google-factory.c  -fPIC -DPIC -o .libs/e-book-backend-google-factory.o
e-book-backend-google-factory.c:24:49: error: libedataserver/e-data-server-module.h: No such file or directory
e-book-backend-google-factory.c:81: warning: no previous prototype for 'eds_module_initialize'
e-book-backend-google-factory.c:87: warning: no previous prototype for 'eds_module_shutdown'
e-book-backend-google-factory.c:92: warning: no previous prototype for 'eds_module_list_types'
make[4]: *** [e-book-backend-google-factory.lo] Error 1
make[4]: Leaving directory `/home/build/svn/gnome2/evolution-data-server/addressbook/backends/google'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/build/svn/gnome2/evolution-data-server/addressbook/backends'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/build/svn/gnome2/evolution-data-server/addressbook'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/build/svn/gnome2/evolution-data-server'
make: *** [all] Error 2

For the time being i commented line 24 in e-book-backend-google-factory.c and after that build completed successfully. 
Comment 9 Srinivasa Ragavan 2008-05-16 03:16:35 UTC
I think you missed to add the EPlugin code.
Comment 10 Jörgen Scheibengruber 2008-05-17 10:54:56 UTC
No, there is no UI to configure this. I just hacked a gconf key to include sources for the google contacts. There is a README in the git tree above, I'll post that later.
Comment 11 Srinivasa Ragavan 2008-05-19 04:25:13 UTC
Ideally, you should extend the Google accounts EPlugin to add a google addressbook.  It should be pretty easy to get, also will be easy for users to add addressbook.
Comment 12 Jörgen Scheibengruber 2008-05-21 20:36:24 UTC
Sure I can do that. I'm a bit busy right now, so it might take a while though, so if someone else is faster I wouldn't mind either :-)
Comment 13 Srinivasa Ragavan 2008-05-22 04:44:43 UTC
I'll try to find some time before 2.23.3.
Comment 14 Jörgen Scheibengruber 2008-05-24 14:32:00 UTC
Created attachment 111455 [details] [review]
An eplugin that adds the configuration UI

I had time today, so here you are.
Comment 15 Jörgen Scheibengruber 2008-05-24 15:05:11 UTC
Created attachment 111457 [details] [review]
This one integrates within the existing plugin, instead of creating a new
Comment 16 Jörgen Scheibengruber 2008-05-24 15:10:49 UTC
Created attachment 111458 [details] [review]
Woops, next try ;-)
Comment 17 Akhil Laddha 2008-05-27 10:24:56 UTC
Hey Jorgen, i tried your patch. Congrats , it successfully fetches google contacts. I modified a contact in evolution and it synced in gmail . Wow 

Here is list of the issues :  

1) It fetched only 100 contacts in evolution, i have 300 contacts in my google address book.

2) It doesn't allow to delete/remove address book.

3) Minor UI changes in configuration dialog will be required. Srag can give more comments as he is UI expert in evolution.

4) I removed address book from gconf but next time when i created, it didn't ask me gmail account password.

5) There is a double free crash when ever i try to add/copy/move any contact in google address book ,traces are attached.

6) Few warnings in eds terminal 

impl_GNOME_Evolution_Addressbook_Book_getContactList
feed.xml:8: namespace error : Namespace prefix gd on email is not defined
emas.google.com/g/2005#other" address="resumeservices@xxx.com" primary="true"
                                                                               ^

(evolution-data-server-2.24:796): libebookbackendgoogle-WARNING **: unsupported vcard field: VERSION: 3.0

(evolution-data-server-2.24:796): libebookbackendgoogle-WARNING **: unsupported vcard field: X-MOZILLA-HTML: FALSE

(evolution-data-server-2.24:796): libebookbackendgoogle-WARNING **: unsupported vcard field: X-EVOLUTION-FILE-AS: service, Resume

(evolution-data-server-2.24:796): libebookbackendgoogle-WARNING **: unsupported vcard field: UID: http://www.google.com/m8/feeds/contacts/user%40gmail.com/base/d




Comment 18 Akhil Laddha 2008-05-27 10:25:35 UTC
Created attachment 111593 [details]
Double free traces
Comment 19 Akhil Laddha 2008-05-27 10:29:48 UTC
Created attachment 111594 [details] [review]
UI Patch with base directory path

Patch attached in comment#16 cannot be applied as it misses base directory path. Thanks bharath for modifying it so that i could apply the patch. Now anyone wants to try,he can apply easily.
Comment 20 Akhil Laddha 2008-05-27 11:58:58 UTC
Valgrind of eds during double-free

==5247== 
==5247== Thread 3:
==5247== Invalid free() / delete / delete[]
==5247==    at 0x402243F: free (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==5247==    by 0x4D5C330: g_free (gmem.c:190)
==5247==    by 0x52A9A58: gdata_entry_finalize (gdata-entry.c:270)
==5247==    by 0x4CE9CB7: g_object_unref (gobject.c:1793)
==5247==    by 0x529ED14: e_book_backend_google_create_contact (e-book-backend-google.c:123)
==5247==    by 0x40F81E5: e_book_backend_sync_create_contact (e-book-backend-sync.c:61)
==5247==    by 0x40F82B8: _e_book_backend_create_contact (e-book-backend-sync.c:374)
==5247==    by 0x40F990E: e_book_backend_create_contact (e-book-backend.c:185)
==5247==    by 0x40FDFF8: impl_GNOME_Evolution_Addressbook_Book_addContact (e-data-book.c:103)
==5247==    by 0x40EEEA9: _ORBIT_skel_small_GNOME_Evolution_Addressbook_Book_addContact (Evolution-DataServer-Addressbook-common.c:64)
==5247==    by 0x4CA11BD: ORBit_POAObject_invoke (poa.c:1148)
==5247==    by 0x4CA716A: ORBit_OAObject_invoke (orbit-adaptor.c:340)
==5247==  Address 0x4F9E0A0 is 0 bytes inside a block of size 360 free'd
==5247==    at 0x402243F: free (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==5247==    by 0x4D5C330: g_free (gmem.c:190)
==5247==    by 0x496D3A5: soup_buffer_free (soup-message-body.c:262)
==5247==    by 0x496D549: soup_message_body_truncate (soup-message-body.c:451)
==5247==    by 0x496D5CE: soup_message_body_free (soup-message-body.c:648)
==5247==    by 0x496D0FB: finalize (soup-message.c:154)
==5247==    by 0x4CE9CB7: g_object_unref (gobject.c:1793)
==5247==    by 0x42443A5: gdata_google_service_insert_entry (gdata-google-service.c:298)
==5247==    by 0x52A9D77: gdata_service_insert_entry (gdata-service-iface.c:43)
==5247==    by 0x529ED07: e_book_backend_google_create_contact (e-book-backend-google.c:121)
==5247==    by 0x40F81E5: e_book_backend_sync_create_contact (e-book-backend-sync.c:61)
==5247==    by 0x40F82B8: _e_book_backend_create_contact (e-book-backend-sync.c:374)
==5247== 
==5247== Use of uninitialised value of size 4
==5247==    at 0x4D822D7: g_utf8_offset_to_pointer (gutf8.c:302)
==5247==    by 0x41C30B4: e_vcard_to_string (e-vcard.c:914)
==5247==    by 0x529C676: vcard_from_gdata_entry (util.c:356)
==5247==    by 0x529C6B4: e_contact_from_gdata_entry (util.c:342)
==5247==    by 0x529ED2A: e_book_backend_google_create_contact (e-book-backend-google.c:129)
==5247==    by 0x40F81E5: e_book_backend_sync_create_contact (e-book-backend-sync.c:61)
==5247==    by 0x40F82B8: _e_book_backend_create_contact (e-book-backend-sync.c:374)
==5247==    by 0x40F990E: e_book_backend_create_contact (e-book-backend.c:185)
==5247==    by 0x40FDFF8: impl_GNOME_Evolution_Addressbook_Book_addContact (e-data-book.c:103)
==5247==    by 0x40EEEA9: _ORBIT_skel_small_GNOME_Evolution_Addressbook_Book_addContact (Evolution-DataServer-Addressbook-common.c:64)
==5247==    by 0x4CA11BD: ORBit_POAObject_invoke (poa.c:1148)
==5247==    by 0x4CA716A: ORBit_OAObject_invoke (orbit-adaptor.c:340)
==5247== 
==5247== Invalid read of size 1
==5247==    at 0x4D822E3: g_utf8_offset_to_pointer (gutf8.c:301)
==5247==    by 0x41C30B4: e_vcard_to_string (e-vcard.c:914)
==5247==    by 0x529C676: vcard_from_gdata_entry (util.c:356)
==5247==    by 0x529C6B4: e_contact_from_gdata_entry (util.c:342)
==5247==    by 0x529ED2A: e_book_backend_google_create_contact (e-book-backend-google.c:129)
==5247==    by 0x40F81E5: e_book_backend_sync_create_contact (e-book-backend-sync.c:61)
==5247==    by 0x40F82B8: _e_book_backend_create_contact (e-book-backend-sync.c:374)
==5247==    by 0x40F990E: e_book_backend_create_contact (e-book-backend.c:185)
==5247==    by 0x40FDFF8: impl_GNOME_Evolution_Addressbook_Book_addContact (e-data-book.c:103)
==5247==    by 0x40EEEA9: _ORBIT_skel_small_GNOME_Evolution_Addressbook_Book_addContact (Evolution-DataServer-Addressbook-common.c:64)
==5247==    by 0x4CA11BD: ORBit_POAObject_invoke (poa.c:1148)
==5247==    by 0x4CA716A: ORBit_OAObject_invoke (orbit-adaptor.c:340)
==5247==  Address 0x90E1490 is 0 bytes after a block of size 128 alloc'd
==5247==    at 0x4022922: realloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==5247==    by 0x4D5C384: g_realloc (gmem.c:170)
==5247==    by 0x4D760E7: g_string_maybe_expand (gstring.c:359)
==5247==    by 0x4D76C19: g_string_insert_len (gstring.c:694)
==5247==    by 0x4D76FF0: g_string_append (gstring.c:815)
==5247==    by 0x41C2E10: e_vcard_to_string (e-vcard.c:885)
==5247==    by 0x529C676: vcard_from_gdata_entry (util.c:356)
==5247==    by 0x529C6B4: e_contact_from_gdata_entry (util.c:342)
==5247==    by 0x529ED2A: e_book_backend_google_create_contact (e-book-backend-google.c:129)
==5247==    by 0x40F81E5: e_book_backend_sync_create_contact (e-book-backend-sync.c:61)
==5247==    by 0x40F82B8: _e_book_backend_create_contact (e-book-backend-sync.c:374)
==5247==    by 0x40F990E: e_book_backend_create_contact (e-book-backend.c:185)
==5247== 
==5247== Invalid read of size 1
==5247==    at 0x4D822D1: g_utf8_offset_to_pointer (gutf8.c:302)
==5247==    by 0x41C30B4: e_vcard_to_string (e-vcard.c:914)
==5247==    by 0x529C676: vcard_from_gdata_entry (util.c:356)
==5247==    by 0x529C6B4: e_contact_from_gdata_entry (util.c:342)
==5247==    by 0x529ED2A: e_book_backend_google_create_contact (e-book-backend-google.c:129)
==5247==    by 0x40F81E5: e_book_backend_sync_create_contact (e-book-backend-sync.c:61)
==5247==    by 0x40F82B8: _e_book_backend_create_contact (e-book-backend-sync.c:374)
==5247==    by 0x40F990E: e_book_backend_create_contact (e-book-backend.c:185)
==5247==    by 0x40FDFF8: impl_GNOME_Evolution_Addressbook_Book_addContact (e-data-book.c:103)
==5247==    by 0x40EEEA9: _ORBIT_skel_small_GNOME_Evolution_Addressbook_Book_addContact (Evolution-DataServer-Addressbook-common.c:64)
==5247==    by 0x4CA11BD: ORBit_POAObject_invoke (poa.c:1148)
==5247==    by 0x4CA716A: ORBit_OAObject_invoke (orbit-adaptor.c:340)
==5247==  Address 0x90E1491 is 1 bytes after a block of size 128 alloc'd
==5247==    at 0x4022922: realloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==5247==    by 0x4D5C384: g_realloc (gmem.c:170)
==5247==    by 0x4D760E7: g_string_maybe_expand (gstring.c:359)
==5247==    by 0x4D76C19: g_string_insert_len (gstring.c:694)
==5247==    by 0x4D76FF0: g_string_append (gstring.c:815)
==5247==    by 0x41C2E10: e_vcard_to_string (e-vcard.c:885)
==5247==    by 0x529C676: vcard_from_gdata_entry (util.c:356)
==5247==    by 0x529C6B4: e_contact_from_gdata_entry (util.c:342)
==5247==    by 0x529ED2A: e_book_backend_google_create_contact (e-book-backend-google.c:129)
==5247==    by 0x40F81E5: e_book_backend_sync_create_contact (e-book-backend-sync.c:61)
==5247==    by 0x40F82B8: _e_book_backend_create_contact (e-book-backend-sync.c:374)
==5247==    by 0x40F990E: e_book_backend_create_contact (e-book-backend.c:185)
==5247== 
Comment 21 Srinivasa Ragavan 2008-05-27 17:42:28 UTC
Jörgen,

Great job. I think it works mostly and some issues still pending. Im favor of the patch. Can we chat on #evolution on irc.gnome.org for further progress? Thanks for your awesome work.
Comment 22 Jörgen Scheibengruber 2008-05-27 18:27:32 UTC
(In reply to comment #17)
> Hey Jorgen, i tried your patch. Congrats , it successfully fetches google
> contacts. I modified a contact in evolution and it synced in gmail . Wow 
> 
> Here is list of the issues :  
> 
> 1) It fetched only 100 contacts in evolution, i have 300 contacts in my google
> address book.

Per default, google does not send all contacts in a query, but only a few. There is a max-results parameter to the query, the api says you should set it to a "very big number" in order to get all contacts. That would however delay the initial bookview population significantly for big contact sets.

I think the correct approach here is to implement offline mode and thus cache the contacts locally.
And then only download the diff, which the google api nicely allows (by using timestamps).

That needs a bit of work though, more than i will have in the next couple of weeks.

> 2) It doesn't allow to delete/remove address book.

Well :-) You cannot remove your google addressbook, can you? But i guess it should just return Success and don't do anything, so that the entry in evolution can be removed successfully. I guess thats what you want?

> 3) Minor UI changes in configuration dialog will be required. Srag can give
> more comments as he is UI expert in evolution.

Well, it could also have more options. "Use ssl" comes to my mind for example.

> 4) I removed address book from gconf but next time when i created, it didn't
> ask me gmail account password.

I dont think this is a problem with the backend. The password is simply still in the keyring.

> 5) There is a double free crash when ever i try to add/copy/move any contact in
> google address book ,traces are attached.

Thanks :-)

> 6) Few warnings in eds terminal 
> 
> impl_GNOME_Evolution_Addressbook_Book_getContactList
> feed.xml:8: namespace error : Namespace prefix gd on email is not defined
> emas.google.com/g/2005#other" address="resumeservices@xxx.com" primary="true"

That needs a change inside libgdata that i was too afraid would break other things, so i didn't include it in my patch to libgdata. The warning is harmless however, basically libxml is just a bit disappointed that libgata doesn't prefix stuff correctly.

> (evolution-data-server-2.24:796): libebookbackendgoogle-WARNING **: unsupported
> vcard field: VERSION: 3.0
> 
> (evolution-data-server-2.24:796): libebookbackendgoogle-WARNING **: unsupported
> vcard field: X-MOZILLA-HTML: FALSE
> 
> (evolution-data-server-2.24:796): libebookbackendgoogle-WARNING **: unsupported
> vcard field: X-EVOLUTION-FILE-AS: service, Resume

Those should be just made to shut up i guess.

> (evolution-data-server-2.24:796): libebookbackendgoogle-WARNING **: unsupported
> vcard field: UID:
> http://www.google.com/m8/feeds/contacts/user%40gmail.com/base/d

Hmm, not sure if this can be ignored or should be handled, i would need to check.
Comment 23 Akhil Laddha 2008-05-28 03:17:58 UTC
Jörgen, by removing google address book, i meant we should be able to delete configured one from evolution as we do in google calendar. It doesn't mean that we would be able to delete from google account. You can check in google calendar, when you right click and say 'delete', it will remove calender from evolution. I hope i am clear now :-)
Comment 24 Srinivasa Ragavan 2008-06-18 15:05:36 UTC
 Jörgen: Is there a possibility of a chat with you in the next few days? I'm considering taking this for GNOME 2.24 and wanted to discuss a few things with you. I'm 'srag' on #evolution/GimpNet and Im on UTC +5:30 timezone. 
Comment 25 Jörgen Scheibengruber 2008-07-03 19:42:00 UTC
Hey, sorry for the latency - I've been on vacation.

Sure, I can do that. Another option would be to have a chat next week in Istanbul (in case you are coming :-))
Comment 26 Srinivasa Ragavan 2008-07-04 11:40:17 UTC
Im there at GUADEC. Lets meet there :)
Comment 27 Srinivasa Ragavan 2008-07-16 09:29:01 UTC
Ok. I approve to commit it for 2.23.5 (freezes start there). We can fix bugs there. Akhil, can you provide a exhaustive bug list. There are some assumptions like offline isn't implemented.. consider this while testing.
Comment 28 André Klapper 2008-07-18 15:13:32 UTC
Please also note this at http://live.gnome.org/RoadMap when committing. Thanks.
Comment 29 Bharath Acharya 2008-07-21 04:14:01 UTC
Committed to EDS Trunk as r9151
http://svn.gnome.org/viewvc/evolution-data-server?view=revision&revision=9151

Committed to Evo Trunk as r35797
http://svn.gnome.org/viewvc/evolution?view=revision&revision=35797

Srini would update the RoadMap page in a few minutes.
Comment 30 Bharath Acharya 2008-07-21 05:27:19 UTC
Fixed a build break in this revision
http://svn.gnome.org/viewvc/evolution-data-server?view=revision&revision=9153
Comment 31 Damien Carbery 2008-07-22 14:13:15 UTC
This feature breaks build on Solaris in EDS 2.23.5.

"util.c", line 535: operands have incompatible types:
         void ":" int

This is because of the definition of __debug in util.h
g_log returns void, but 0 is an int type.
The Sun Studio compiler must require that both sides of the colon in ?: be the same type (though that seems broken).

I tried changing 0 to '\0', return and void but still failed to compile.
If __debug was an actual function then it would be easy (though ... and __VA_ARGS__ is different on Solaris).
Comment 32 Jörgen Scheibengruber 2008-07-22 19:46:35 UTC
Cool that this has been committed! Thanks Srini!

I have started on implementing offline mode. It's almost done; though i've mostly replaced the previous in-memory storage with a on-disc storage. I later realized that there is a setting to not sync things to disc when in offline mode though, that of course again makes things more complicated. So what is needed is both a cache on disc and a cache in memory i guess, depending on whether this setting is enabled.

Regarding the __debug__. This debugging should probably be removed at some point altogether. For now could you try if the following things help to make it compile on solaris?

a) remove the "0" altogether? i'm not entirely sure, but i think (a ? b : ) is valid c.
b) if that does not help, try to replace the definition of __debug__ with the following:
#define __debug__(...) if (__e_book_backend_google_debug__) { \
                       g_log (G_LOG_DOMAIN,         \
                              G_LOG_LEVEL_DEBUG,    \
                              __VA_ARGS__); }
Comment 33 Damien Carbery 2008-07-22 21:51:22 UTC
Option b works perfectly. (I didn't try option a).
Comment 34 Srinivasa Ragavan 2008-07-23 04:10:19 UTC
(In reply to comment #32)
> Cool that this has been committed! Thanks Srini!
> 
> I have started on implementing offline mode. It's almost done; though i've
> mostly replaced the previous in-memory storage with a on-disc storage. I later
> realized that there is a setting to not sync things to disc when in offline
> mode though, that of course again makes things more complicated. So what is
> needed is both a cache on disc and a cache in memory i guess, depending on
> whether this setting is enabled.
> 

Jörgen, Awesome. Waiting to get that in asap.
Comment 35 Jörgen Scheibengruber 2008-08-12 21:08:07 UTC
Srini, I have now implemented offline mode and refactored the thing a bit. Is it ok if I commit directly to svn? Otherwise I could also attach a patch...
Comment 36 Srinivasa Ragavan 2008-08-13 04:01:55 UTC
Jörgen, You know the code best. Im fine if you want to commit directly. Make sure, if you change any STRING/UI you must announce it gnome-i18n@ and gnome-doc-list@.

Comment 37 Jörgen Scheibengruber 2008-08-13 23:19:02 UTC
Ok, submitted :-)

There is still a few small issues lurking around in the conversion between google-format and vcard, but I hope I will manage to fix those still before 2.24.

And there is probably bugs :-)

Other than that, I noticed that Google have updated their API. It's now also possible to retrieve and edit the photos of contacts. That would be very nice to have IMHO, but I guess I won't have time to implement that before 2.24 anymore.

Another thing they now allow is custom properties for entries. This means that even fields that Google does not support could be saved on the server. I don't know how usefull that would be though, given that those properties are only visible in evolution then...
Comment 38 Srinivasa Ragavan 2008-08-14 02:58:28 UTC
(In reply to comment #37)
> Ok, submitted :-)
> 
> There is still a few small issues lurking around in the conversion between
> google-format and vcard, but I hope I will manage to fix those still before
> 2.24.
> 

Awesome.
> And there is probably bugs :-)
Which we all can fix ;-)

> 
> Other than that, I noticed that Google have updated their API. It's now also
> possible to retrieve and edit the photos of contacts. That would be very nice
> to have IMHO, but I guess I won't have time to implement that before 2.24
> anymore.

We can take it stages, I think this work is really good and has lots of Value.

I think now what I should do is a google account setup, which can automatically setup (mail[pop/imap]/calendar/addressbook] as any other groupware provider. I'll see when I can find time to do it. Thanks for you awesome work.

> 
> Another thing they now allow is custom properties for entries. This means that
> even fields that Google does not support could be saved on the server. I don't
> know how usefull that would be though, given that those properties are only
> visible in evolution then...
> 
I need to think more, how we can utilize it.
Comment 39 André Klapper 2008-08-14 09:18:43 UTC
Srini, please add to the Roadmap wikipage (for the 2.24 release notes). Thanks ;-)
Comment 40 Milan Crha 2008-08-15 09:30:36 UTC
I see this when compiling eds:
google-book.c: In function ‘google_book_connect_to_google’:
google-book.c:748: warning: implicit declaration of function ‘gdata_google_service_authenticate’

I consider this quite serious. I noticed some recent commits mentioning this function, but it doesn't work, seems to me. Can you take care of that, please?
Comment 41 Jörgen Scheibengruber 2008-08-15 18:17:21 UTC
I've sent a patch to evolution-patches, that makes that function in libgdata-google public. Srini said it's ok to commit and I'll do so tomorrow, if nobody is faster than me ;-)
Comment 42 Jörgen Scheibengruber 2008-08-15 18:19:00 UTC
Created attachment 116689 [details] [review]
Attaching that patch here, too.
Comment 43 Srinivasa Ragavan 2008-08-18 03:21:06 UTC
Commit it fast :-)
Comment 44 Suman Manjunath 2008-08-18 03:53:41 UTC
Accepted patch was committed in r9356 and r9357. 
Comment 45 Matthew Barnes 2008-08-30 12:24:14 UTC
Can this be closed now?
Comment 46 Akhil Laddha 2008-09-01 04:25:36 UTC
I haven't tried google contact after i tested the patch so i am not sure how many issues got resolved. Better to close the bug, i guess we will have to open separate bugs for each issue. Just thoughts, you can disagree :) 
Comment 47 Akhil Laddha 2008-09-01 08:43:29 UTC
All issues mentioned in comment#17 are fixed, just tried today with trunk, thanks Jorgen. I am closing the bug as Fixed.