From 7165b05968ed7d6a52986382877e82e09f7150aa Mon Sep 17 00:00:00 2001 From: Ariel Constenla-Haile Date: Sun, 24 Mar 2013 12:23:39 +0000 Subject: i121946 - Use enums to identify WebDAV/HTTP methods (cherry picked from commit 122e10cfd23b379b97e2d8ec002e7f0562ebd6f7) Conflicts: extensions/source/update/feed/updatefeed.cxx offapi/com/sun/star/ucb/makefile.mk offapi/type_reference/typelibrary_history.txt offapi/type_reference/types.rdb ucb/source/ucp/webdav/DAVResourceAccess.cxx ucb/source/ucp/webdav/DAVResourceAccess.hxx plus headerize.pl (Would be an incompatible API CHANGE if we had not unpublished XWebDAVCommandEnvironment with 78cca63070ae6cf82b45ec3bc75fafa2db31a7f2 "Revert publishing of lots of UNO types.") Change-Id: I153e394a194d0fcad29d3e3b27d5b24f7c259fc4 --- offapi/UnoApi_offapi.mk | 1 + offapi/com/sun/star/ucb/WebDAVHTTPMethod.idl | 114 +++++++++++++++++++++ .../com/sun/star/ucb/XWebDAVCommandEnvironment.idl | 8 +- 3 files changed, 120 insertions(+), 3 deletions(-) create mode 100644 offapi/com/sun/star/ucb/WebDAVHTTPMethod.idl (limited to 'offapi') diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 26652d47c7da..8aff46bb2f39 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -1530,6 +1530,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/ucb,\ WebDAVContentProvider \ WebDAVDocumentContent \ WebDAVFolderContent \ + WebDAVHTTPMethod \ )) $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/ui,\ ActionTrigger \ diff --git a/offapi/com/sun/star/ucb/WebDAVHTTPMethod.idl b/offapi/com/sun/star/ucb/WebDAVHTTPMethod.idl new file mode 100644 index 000000000000..81fed33857ae --- /dev/null +++ b/offapi/com/sun/star/ucb/WebDAVHTTPMethod.idl @@ -0,0 +1,114 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_ucb_WebDAVHTTPMethod_idl__ +#define __com_sun_star_ucb_WebDAVHTTPMethod_idl__ + +module com { module sun { module star { module ucb { + + +/** Standard WebDAV/HTTP methods. + + @since Apache OpenOffice 4.0 +*/ +enum WebDAVHTTPMethod +{ + /** HTTP request method as defined in + RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1 + */ + GET, + + /** HTTP request method as defined in + RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1 + */ + HEAD, + + /** HTTP request method as defined in + RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1 + */ + POST, + + /** HTTP request method as defined in + RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1 + */ + PUT, + + /** HTTP request method as defined in + RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1 + */ + DELETE, + + /** HTTP request method as defined in + RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1 + */ + TRACE, + + /** HTTP request method as defined in + RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1 + */ + OPTIONS, + + /** HTTP request method as defined in + RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1 + */ + CONNECT, + + /** HTTP request method as defined in + RFC 5789: PATCH Method for HTTP + */ + PATCH, + + /** WebDAV methods as defined in + HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV) + */ + PROPFIND, + + /** WebDAV methods as defined in + HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV) + */ + PROPPATCH, + + /** WebDAV methods as defined in + HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV) + */ + MKCOL, + + /** WebDAV methods as defined in + HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV) + */ + COPY, + + /** WebDAV methods as defined in + HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV) + */ + MOVE, + + /** WebDAV methods as defined in + HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV) + */ + LOCK, + + /** WebDAV methods as defined in + HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV) + */ + UNLOCK + +}; + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl b/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl index 7bc17321ca30..bbf072ce3061 100644 --- a/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl +++ b/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl @@ -20,6 +20,7 @@ #define __com_sun_star_ucb_XWebDAVCommandEnvironment_idl__ #include +#include #include @@ -38,15 +39,16 @@ interface XWebDAVCommandEnvironment : XCommandEnvironment The request URI. @param aMethod - The WebDAV/HTTP method ("GET","PUT","MKCOL",...). + The WebDAV/HTTP method ("GET","PUT","MKCOL",...) as defined in + WebDAVHTTPMethod. @return A sequence of header name, header value pairs. The header names must be the plain names and contain no trailing ":". */ sequence getUserRequestHeaders( - [in] string aURI, - [in] string aMethod); + [in] string aURI, + [in] WebDAVHTTPMethod eMethod); }; }; }; }; }; -- cgit