[Kde-pim] Review Request 118915: Some changes to IMAP resource to make it easier to use by subclasses

Dan Vrátil dvratil at redhat.com
Tue Jun 24 12:20:56 BST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118915/
-----------------------------------------------------------

Review request for KDEPIM and Christian Mollekopf.


Repository: kdepim-runtime


Description
-------

This contains changes that I made to the IMAP resource so that I could implement the Gmail resource reusing as much code as possible. You can check the changes in context in gmail-resource branch in kdepim-runtime.


    Split ImapResource to ImapResourceBase and ImapResource
    ImapResourceBase contains generic implementation (most of the code), and ImapResource
    contains code that links against specific classes, like configuration dialog etc.,
    which some more specialized IMAP subclasses might want to replace by their own
    implementation.

This is the biggest change. If I would subclass ImapResource, I'd need to have the IMAP's configuration dialog, password requester etc. built and linked into the Gmail resource too, which is not desirable, since the Gmail implements it's own versions of these. So I renamed ImapResource to ImapResourceBase which is now present in libimapresource.a and moved all the specific classes, like settings dialog and password requester) to ImapResource, which is built in the akonadi_imap_resource binary. The Kolab resource is still subclass of ImapResource (it wants to share these dialogs, etc.), but Gmail is subclass of ImapResourceBase.


    ResourceTask: Make serverSupports* virtual methods

Some implementations might need to override the default detection (like Gmail's CONDSTORE support.


    Make private members of RetrieveCollectionsTask protected to allow subclassing

Most implementations that might need custom handling of collections (like Gmail) will only need to handle the final processing, but want to reuse the actual retrieval code.


    Move BatchFether to it's own file and port to extended KIMAP signals

Signals introduced in review 118781.


Diffs
-----

  resources/imap/CMakeLists.txt 053d7159134c2774d8b826bdfd4f3bd5c4633a45 
  resources/imap/batchfetcher.h PRE-CREATION 
  resources/imap/batchfetcher.cpp PRE-CREATION 
  resources/imap/changeitemsflagstask.h 86a1c768d7c9fd1b097feb042d597f6a68c525db 
  resources/imap/imapidlemanager.h f34a7183f9d3f34443c499668650758c3a00a8a3 
  resources/imap/imapidlemanager.cpp f5fb73b5b1d434d2818414198a6b4d73ac1f3169 
  resources/imap/imapresource.h b20d610b14daff8d72c94dbee1dbdbd47eb66406 
  resources/imap/imapresource.cpp 8e35fd47dcd847f4c87e8effd1903e4c1152e336 
  resources/imap/imapresourcebase.h PRE-CREATION 
  resources/imap/imapresourcebase.cpp PRE-CREATION 
  resources/imap/messagehelper.h 96ce6b273d8ea7d4b30b8b4c3ddba36a63d2981a 
  resources/imap/messagehelper.cpp 929c521eeabddaaf10c5a792ca88b5dba02a0ae0 
  resources/imap/resourcestate.h 02c8ff8c4b527c9cb92f0f2020ad2b743165be0d 
  resources/imap/resourcestate.cpp 3f09a21cb8fdc46e6b03e13ecf3e8b32effad45e 
  resources/imap/resourcetask.h d012f17db102c74a9a4e20a069b6737b7f847ec7 
  resources/imap/retrievecollectionstask.h a3d154113e6fce6eec523324c5b789befd7a4780 
  resources/imap/retrieveitemstask.h 5cf469365d5b37573a60fd5788099ab014c17363 
  resources/imap/retrieveitemstask.cpp 5697fe66ba8e2689d73821583bd374e4ddc10495 
  resources/imap/retrieveitemtask.h d3c4fec722cf4bd67c6f3e94caca3dc23681bf6f 
  resources/imap/retrieveitemtask.cpp 0062c633bb1b65c12d81c8d0aad7c66153d1759e 
  resources/imap/serverinfodialog.h 6cc9646b0f0234378b6c44d3f835fd76075975b4 
  resources/imap/serverinfodialog.cpp 4508e5611e5ceda9a144457a1dfaebf45d919ceb 
  resources/imap/settingspasswordrequester.h 671ec167d78475b10fc362a6fd5dee6a9b3e0427 
  resources/imap/settingspasswordrequester.cpp 8d46dec64a119fb3d79bb473380df3a8e9f59aa6 
  resources/imap/setupserver.h cfc2ed7cf325aae5685391a08d918f809d3e7700 
  resources/imap/setupserver.cpp 0dae9ed122ca8f9b260863d7ecfa2d7d07316d52 
  resources/kolab/kolabmessagehelper.h ec978e63f9885bdb771e110786d055c292fccc1d 
  resources/kolab/kolabmessagehelper.cpp b97be4f304a7cf05ed09fb14d7b1d976eb48e526 
  resources/kolab/kolabresourcestate.cpp 47981e7f429064bdc091870b54e44c3867f3b1e0 

Diff: https://git.reviewboard.kde.org/r/118915/diff/


Testing
-------

Everything compiles and both IMAP and Kolab resources still work.


Thanks,

Dan Vrátil

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list