Bug 60235 - Implement getDatabases in ActiveSync
Summary: Implement getDatabases in ActiveSync
Status: RESOLVED FIXED
Alias: None
Product: SyncEvolution
Classification: Unclassified
Component: ActiveSync (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Patrick Ohly
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-03 14:31 UTC by Graham Cobb
Modified: 2013-03-05 12:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to implement getDatabases in ActiveSync (7.19 KB, text/plain)
2013-02-03 14:31 UTC, Graham Cobb
Details
Updated patch for getDatabases in ActiveSync (7.19 KB, patch)
2013-02-03 14:42 UTC, Graham Cobb
Details | Splinter Review
New patch, from git-format-patch (7.78 KB, patch)
2013-02-04 22:41 UTC, Graham Cobb
Details | Splinter Review

Description Graham Cobb 2013-02-03 14:31:01 UTC
Created attachment 74136 [details]
Patch to implement getDatabases in ActiveSync

The attached patch implements getDatabases in the ActiveSync backend.  This patch just lists the folders, it does not add support for specifying a folder name in the sync.  However, the user can use this information to work out which collection ID to specify in the sync.

This depends on the eas_sync_handler_get_folder_list function in libeasclient created by the patch in bug #60204.
Comment 1 Graham Cobb 2013-02-03 14:39:22 UTC
Oops, I posted the wrong patch.  Please ignore the first attachment.  I will add a new one in a moment.
Comment 2 Graham Cobb 2013-02-03 14:42:51 UTC
Created attachment 74139 [details] [review]
Updated patch for getDatabases in ActiveSync
Comment 3 Patrick Ohly 2013-02-04 10:37:51 UTC
(In reply to comment #2)
> Created attachment 74139 [details] [review] [review]
> Updated patch for getDatabases in ActiveSync

Looks good, except for some minor coding style nitpicking.

* please indent by four spaces
* mixed case instead of underscores:
  m_folder_paths -> m_folderPaths
  get_collection_path -> getCollectionPath

Please include a commit message in the patch and use "git format-patch".
Comment 4 Graham Cobb 2013-02-04 22:41:39 UTC
Created attachment 74199 [details] [review]
New patch, from git-format-patch

I have fixed the style issues, I think,  I also decided that the static functions should become methods of the Collection nested object, which I think is neater.

Commit message added and git-format-patch output attached.
Comment 5 Patrick Ohly 2013-02-12 14:01:45 UTC
I've included the patch in a test branch and will run it through the automated testing once before merging into master.
Comment 6 Patrick Ohly 2013-03-05 12:31:42 UTC
Patch included in master branch, with one minor improvement:

commit e96ff22fdd809dc44c0a38780a50d3cf05cabb24
Author: Patrick Ohly <patrick.ohly@intel.com>
Date:   Wed Feb 27 06:46:17 2013 -0800

    ActiveSync: avoid explicit g_object_unref for EasSyncHandler
    
    Better use a smart pointer - less code and harder to make mistakes.


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.