Bug 97780 - Backends for the Trinity Desktop (TDE)
Summary: Backends for the Trinity Desktop (TDE)
Status: RESOLVED FIXED
Alias: None
Product: SyncEvolution
Classification: Unclassified
Component: SyncEvolution (show other bugs)
Version: 1.5.1
Hardware: All Linux (All)
: medium normal
Assignee: Patrick Ohly
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-12 20:38 UTC by EKO
Modified: 2018-01-03 09:29 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
code for the two backends for the Trinity Desktop (TDE) (17.81 KB, application/x-bzip)
2016-09-12 20:38 UTC, EKO
Details
code for the two backends for the Trinity Desktop (TDE) >= 14.1 (20.31 KB, patch)
2016-09-26 12:02 UTC, EKO
Details | Splinter Review

Description EKO 2016-09-12 20:38:37 UTC
Created attachment 126471 [details]
code for the two backends for the Trinity Desktop (TDE)

I attach here the code for the two backends for the Trinity Desktop (TDE).
1) tdepim - the PIM backend (addressbook, calendar/todo/journal and notes/knotes)
2) tde - untested backend for the tdewallet.

Unfortunately I could not manage the ITEM_NEEDS_MERGE as discussed on the mailing list, so the code performs an update as DEL+ADD in calendar/todo/journal and notes/knotes and replace in addressbook.

Unfortunately (again) I don't have test cases, which is on the TODO for the future.

Last but not least there is some useful information in the tdepim/README on configuring, compiling and testing

thanks in advance 

regards
Comment 1 Patrick Ohly 2016-09-13 07:32:47 UTC
Regarding testing: you can re-use the existing tests and get them applied to your new backend, using either the existing testcases or testcases specific to your backend.

See how AkonadiSyncSourceRegister.cpp instantiates one custom RegisterSyncSourceTest per item type:

static class vCard30Test : public RegisterSyncSourceTest {
public:
    vCard30Test() : RegisterSyncSourceTest("kde_contact", "eds_contact") {}

    virtual void updateConfig(ClientTestConfig &config) const
    {
        config.m_type = "kde-contacts";
    }
} vCard30Test;

This defines the "Client::Source::kde_contact" tests, using the existing eds_contact = syncevolution/test/testcases/eds_contact.vcf testcases.

Build with integration testing enabled, dynamic linking disabled (easier that way) and then you can run (without installation, directly in the "src" directory:
./client-test Client::Source::kde_contact (or whatever you are going to call it).

The HACKING document has some more information about this, although I can't vouch for it being entirely up-to-date.
Comment 2 EKO 2016-09-13 19:24:47 UTC
Thanks for the hint - will do next.
Comment 3 Patrick Ohly 2016-09-26 11:37:25 UTC
Do you have more recent code or shall I add the code from 2016-09-12?
Comment 4 EKO 2016-09-26 12:02:47 UTC
Created attachment 126786 [details] [review]
code for the two backends for the Trinity Desktop (TDE) >= 14.1

Thank you for asking. It is rather complicated.
The first patch (code) works with TDE as is at the moment.
However to make work with notes easier (get/set proper revision) I extended the knotes interface and have a new code now.

Perhaps it would be better to add both
1. for TDE < 14.1
2. for TDE => 14.1

2. is definitely the desired/targeted version.

So either both or 2, should go in.

Thanks in advance
Comment 5 Patrick Ohly 2016-09-26 19:19:24 UTC
I've imported both code drops, so now one can do a "git log -p" to see the changes. It seems that the more recent code also improves the non-note support (unit testing, more error checks).

See https://cgit.freedesktop.org/SyncEvolution/syncevolution/log/?h=tde

But now TDE >= 14.1 is required. If you want to support both, then you'll have to add a configure version check and ifdefs to the code.

Please let me know how you want to proceed - it's your call, I don't know enough about TDE to decide.
Comment 6 EKO 2016-09-26 20:20:36 UTC
I want to focus on the latter version.

There were some changes pushed to TDE to fix UTF8 and also I extended the knotes interface to handle revision(s) properly, so this is the primary and final target.
If someone is interested to build the plugins for TDE <14.1 s/he can pull the former version from the git repo.
I do not want to over-complicate things without a good reason and I really do not see any in this case.

As you see I started working on the testing as you suggested but was not able to advance that much. I do not expect this part to work.

Thank you Patrick for assisting in such a friendly way.
Comment 7 Patrick Ohly 2016-10-07 13:31:56 UTC
When adding the "tde" branch to the automated testing, I ran into build issues. I've fixed them for the "backend not enabled" case (see the latest commit in https://cgit.freedesktop.org/SyncEvolution/syncevolution/log/?h=for-master/tde: https://cgit.freedesktop.org/SyncEvolution/syncevolution/commit/?h=for-master/tde&id=e05817a4929873c72b8880f571b96e9ea7a4b786

But I'm wondering whether the untested "backend enabled" case really worked. To me it seemed that some includes were missing. I've changed that.

EKO, can you test that branch and if further changes are needed, submit patches here against it?
Comment 8 Patrick Ohly 2018-01-03 09:29:21 UTC
The backends were merged into 1.5.2 already.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.