--Boundary-00=_Dih7K/+PDzCtr4x Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable [Repost of this message to the right ML after being redirected here. Sorry = for=20 the inconvenience to the kde-devel reader] Hi, Here is a patch against the SVN trunk that adds the WebDav REPORT query (RF= C=20 3253). It's mostly a copy-and-paste of other methods and it works OK for me= =20 against the CalDav implementations I could test. This is required for Akonadi CalDav support, which should be released soon. Cheers, Gr=E9gory --Boundary-00=_Dih7K/+PDzCtr4x Content-Type: text/x-patch; charset="utf-8"; name="kdelibs_add_dav_report.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kdelibs_add_dav_report.diff" Index: interfaces/kio/http.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- interfaces/kio/http.h (r=C3=A9vision 1041941) +++ interfaces/kio/http.h (copie de travail) @@ -28,6 +28,7 @@ namespace KIO { HTTP_OPTIONS, DAV_PROPFIND, DAV_PROPPATCH, DAV_MKCOL, DAV_COPY, DAV_MOVE, DAV_LOCK, DAV_UNLOCK, DAV_SEARCH, DAV_SUBSCRIBE, DAV_UNSUBSCRIBE, DAV_POLL, DAV_NOTIFY, + DAV_REPORT, HTTP_UNKNOWN =3D -1}; =20 } Index: kioslave/http/http.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- kioslave/http/http.cpp (r=C3=A9vision 1041941) +++ kioslave/http/http.cpp (copie de travail) @@ -269,6 +269,8 @@ static QString methodString(HTTP_METHOD=20 return "UNSUBSCRIBE "; case DAV_POLL: return "POLL "; + case DAV_REPORT: + return "REPORT "; default: Q_ASSERT(false); return QString(); @@ -1540,6 +1542,9 @@ QString HTTPProtocol::davError( int code case HTTP_GET: action =3D i18nc( "request type", "retrieve the contents of the spec= ified file or folder" ); break; + case DAV_REPORT: + action =3D i18nc( "request type", "run a report in the specified fol= der" ); + break; case HTTP_PUT: case HTTP_POST: case HTTP_HEAD: @@ -2231,6 +2236,7 @@ bool HTTPProtocol::sendQuery() davHeader =3D "Lock-token: " + metaData("davLockToken") + "\r\n"; break; case DAV_SEARCH: + case DAV_REPORT: hasDavData =3D true; /* fall through */ case DAV_SUBSCRIBE: Index: kio/kio/davjob.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- kio/kio/davjob.cpp (r=C3=A9vision 1041941) +++ kio/kio/davjob.cpp (copie de travail) @@ -162,4 +162,11 @@ DavJob* KIO::davSearch( const KUrl& url, return DavJobPrivate::newJob(url, KIO::DAV_SEARCH, doc.toString(), flags= ); } =20 +DavJob* KIO::davReport( const KUrl& url, const QDomDocument& report, const= QString &depth, JobFlags flags ) +{ + DavJob *job =3D DavJobPrivate::newJob(url, (int) KIO::DAV_REPORT, repo= rt.toString(), flags); + job->addMetaData( "davDepth", depth ); + return job; +} + #include "davjob.moc" Index: kio/kio/davjob.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- kio/kio/davjob.h (r=C3=A9vision 1041941) +++ kio/kio/davjob.h (copie de travail) @@ -107,6 +107,17 @@ namespace KIO { */ KIO_EXPORT DavJob* davSearch( const KUrl &url, const QString& nsURI, co= nst QString& qName, const QString& query, JobFlags flags =3D DefaultFlags ); =20 + /** + * Creates a new DavJob that issues a REPORT command. + * + * @param url the URL of the resource + * @param report a REPORT document that describes the request to make + * @param depth the depth of the request. Can be "0", "1" or "infinity" + * @param flags: We support HideProgressInfo here + * @return the new DavJob + */ + KIO_EXPORT DavJob* davReport( const KUrl& url, const QDomDocument& repo= rt, const QString &depth, JobFlags flags =3D DefaultFlags ); + } =20 #endif --Boundary-00=_Dih7K/+PDzCtr4x--