libkdav

Daniel Vrátil dvratil at kde.org
Sun Dec 18 14:05:37 GMT 2016


On Friday, December 16, 2016 2:43:23 PM CET Sandro Knauß wrote:
> Hey,
> 
> thanks for the response.
> If no further answers enters the next days, I'll request an new repo kdav
> from sysadmins and will move the code around and preserve history of kdav.
> > > * adding everything to a namespace (KDAV?)
> > 
> > Yup, KDAV sounds good
> 
> mmh KDAV or KDav ?

KDAV, since DAV is an acronym?

> 
> > > * install public headers
> 
> done
> 
> > > * mark symbols as public
> 
> done
> 
> > > * move akonadi specific parts into kdepim-runtime
> > 
> > Looking in the code, you probably want everything except for the
> > "resource"
> > directory, possibly just extracting some "utlity.cpp" stuff from there?
> 
> moved Akonadi parts already into own files, that can be enter into
> kdepim-runtime.

Are you willing to port the dav resource to KDAV, once its released?

> > > * remove translations of error strings
> > 
> > I understand the reason why, but I think that simply just doing s/i18n/
> > QStringLiteral/ is not good enough, because we want to show localized
> > errors to users. You need to have a rich-enough Error enum, so that
> > client applications can generate their own localized and useful-enough
> > error message based on context (what failed) + the error value. How do
> > you plan to solve localized error messages in Kube? For sure you don't
> > want to show errors in English to all your users?
> 
> Well this is a little bit difficult discussion, cause on the other hand devs
> want to get the English error msg. But well in the end I'll create unique
> error numbers and move the translation to the outside. And all args I add
> to the jobs to request thems.

Cool :)

> 
> > > longer planed goals:
> > > *get rid of kio dependencies
> > 
> > As long as an API to set cookiejar/proxy is provided so we can still
> > integrate with KDE at least manually...
> 
> because KIO is an internal dependency, this will be addressed later. But a
> good point to think about :)
> 
> Lisencend checked : everything is GPL 2+
> Copyrightholder:
>     2009-2014 Gregory Oestreicher <greg at kamago.net>
>     2016 Sandro Knauß <sknauss at kde.org>
>     2010 Tobias König <tokoe at kde.org>
> 
> An additional issue poped up, when I starting to look more into the code.
> For requesting collections/items we need urls with auth info and the
> protocol, we want to talk, therefor DavUrl exists. But currently all urls
> are returned are QString without auth informations, this makes it very
> cumbersome to request things. Here a sample to request all items from
> collections:
> 
> auto *job = new KDAV::DavCollectionsFetchJob(davUrl);
> job->exec();
> foreach(const auto collection, job->collections()) {
>   QUrl collectionUrl(collection.url());
>   collectionUrl.setUserName(mainUrl.userName());
>   collectionUrl.setPassword(mainUrl.password());
>   auto itemListJob = new
> KDAV::DavItemsListJob(KDAV::Utils::DavUrl(collectionUrl,
> KDAV::Utils::CardDav), &cache); itemListJob->exec()
> }
> 
> I already fixed CollectionFetchJob (see 
> ec38a3c7aa2964117ee0c72d0150e28b0d59dcdc test/testserver.cpp):
> 
> auto *job = new KDAV::DavCollectionsFetchJob(davUrl);
> foreach(const auto collection, job->collections()) {
>   auto collectionUrl = collection.url();
>   auto itemListJob = new KDAV::DavItemsListJob(collectionUrl,
> KDAV::Utils::CardDav), &cache); }
> 
> I would also do this for other Jobs that returns Collections or Items. What
> do you think?

Yep, I certainly think making DavCollection::url() return a QUrl is the right 
way to go.

Any chance you could backport your patch to kdepim-runtime 16.12?

Thanks,
Dan

> 
> Best Regards,
> 
> sandro


-- 
Daniel Vrátil
www.dvratil.cz | dvratil at kde.org
IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20161218/156eae35/attachment.sig>


More information about the kde-pim mailing list