From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- .../star/uri/ExternalUriReferenceTranslator.idl | 39 ++++ .../star/uri/RelativeUriExcessParentSegments.idl | 56 +++++ udkapi/com/sun/star/uri/UriReferenceFactory.idl | 71 +++++++ .../UriSchemeParser_vndDOTsunDOTstarDOTexpand.idl | 52 +++++ .../UriSchemeParser_vndDOTsunDOTstarDOTscript.idl | 52 +++++ .../star/uri/VndSunStarPkgUrlReferenceFactory.idl | 39 ++++ .../star/uri/XExternalUriReferenceTranslator.idl | 85 ++++++++ udkapi/com/sun/star/uri/XUriReference.idl | 227 +++++++++++++++++++++ udkapi/com/sun/star/uri/XUriReferenceFactory.idl | 160 +++++++++++++++ udkapi/com/sun/star/uri/XUriSchemeParser.idl | 69 +++++++ udkapi/com/sun/star/uri/XVndSunStarExpandUrl.idl | 69 +++++++ .../sun/star/uri/XVndSunStarExpandUrlReference.idl | 53 +++++ .../star/uri/XVndSunStarPkgUrlReferenceFactory.idl | 55 +++++ udkapi/com/sun/star/uri/XVndSunStarScriptUrl.idl | 130 ++++++++++++ .../sun/star/uri/XVndSunStarScriptUrlReference.idl | 51 +++++ 15 files changed, 1208 insertions(+) create mode 100644 udkapi/com/sun/star/uri/ExternalUriReferenceTranslator.idl create mode 100644 udkapi/com/sun/star/uri/RelativeUriExcessParentSegments.idl create mode 100644 udkapi/com/sun/star/uri/UriReferenceFactory.idl create mode 100644 udkapi/com/sun/star/uri/UriSchemeParser_vndDOTsunDOTstarDOTexpand.idl create mode 100644 udkapi/com/sun/star/uri/UriSchemeParser_vndDOTsunDOTstarDOTscript.idl create mode 100644 udkapi/com/sun/star/uri/VndSunStarPkgUrlReferenceFactory.idl create mode 100644 udkapi/com/sun/star/uri/XExternalUriReferenceTranslator.idl create mode 100644 udkapi/com/sun/star/uri/XUriReference.idl create mode 100644 udkapi/com/sun/star/uri/XUriReferenceFactory.idl create mode 100644 udkapi/com/sun/star/uri/XUriSchemeParser.idl create mode 100644 udkapi/com/sun/star/uri/XVndSunStarExpandUrl.idl create mode 100644 udkapi/com/sun/star/uri/XVndSunStarExpandUrlReference.idl create mode 100644 udkapi/com/sun/star/uri/XVndSunStarPkgUrlReferenceFactory.idl create mode 100644 udkapi/com/sun/star/uri/XVndSunStarScriptUrl.idl create mode 100644 udkapi/com/sun/star/uri/XVndSunStarScriptUrlReference.idl (limited to 'udkapi/com/sun/star/uri') diff --git a/udkapi/com/sun/star/uri/ExternalUriReferenceTranslator.idl b/udkapi/com/sun/star/uri/ExternalUriReferenceTranslator.idl new file mode 100644 index 000000000..baf7cdb3b --- /dev/null +++ b/udkapi/com/sun/star/uri/ExternalUriReferenceTranslator.idl @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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_uri_ExternalUriReferenceTranslator_idl__ +#define __com_sun_star_uri_ExternalUriReferenceTranslator_idl__ + +#include + +module com { module sun { module star { module uri { + +/** + translates between external and internal URI references. + + @since OOo 2.0 + */ +published service ExternalUriReferenceTranslator: + XExternalUriReferenceTranslator; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/uri/RelativeUriExcessParentSegments.idl b/udkapi/com/sun/star/uri/RelativeUriExcessParentSegments.idl new file mode 100644 index 000000000..59572166d --- /dev/null +++ b/udkapi/com/sun/star/uri/RelativeUriExcessParentSegments.idl @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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_uri_RelativeUriExcessParentSegments_idl__ +#define __com_sun_star_uri_RelativeUriExcessParentSegments_idl__ + +module com { module sun { module star { module uri { + +/** + details how excess special parent segments (“..”) + are handled when resolving a relative URI reference to absolute form. + + @see com::sun::star::uri::XUriReferenceFactory::makeAbsolute + for a method that uses this enumeration. + + @since OOo 2.0 + */ +published enum RelativeUriExcessParentSegments { + /** + causes excess special parent segments to be treated as an error. + */ + ERROR, + + /** + causes excess special parent segments to be retained, treating them like + ordinary segments. + */ + RETAIN, + + /** + causes excess special parent segments to be removed. + */ + REMOVE +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/uri/UriReferenceFactory.idl b/udkapi/com/sun/star/uri/UriReferenceFactory.idl new file mode 100644 index 000000000..c19e8167d --- /dev/null +++ b/udkapi/com/sun/star/uri/UriReferenceFactory.idl @@ -0,0 +1,71 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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_uri_UriReferenceFactory_idl__ +#define __com_sun_star_uri_UriReferenceFactory_idl__ + +module com { module sun { module star { module uri { + +published interface XUriReferenceFactory; + +/** + creates URI references. + +

See RFC 3986 for a + description of URI references and related terms.

+ +

For parsing absolute URI references, this service tries to use a + scheme-specific parser. Such a scheme-specific parser will typically enforce + additional restrictions during parsing, and will typically return objects + that support extra, scheme-specific interfaces in addition to + com::sun::star::uri::XUriReference. If no such parser + is found, and for relative URI references, a generic parser is used, which + returns objects that only support + com::sun::star::uri::XUriReference.

+ +

Locating a scheme-specific parser works as follows: A scheme consists of + Latin capital letters + “A”–“Z”, Latin small + letters “a”–“z”, + digits “0”–“9”, + “+”, “-”, and + “.”. A scheme s is transformed into + a string s′ character-by-character, by translating + Latin capital letters to their small counterparts, translating + “+” to “PLUS”, + “-” to “HYPHEN”, + “.” to “DOT”, and copying + Latin small letters and digits unchanged. If the component context used + while creating this UriReferenceFactory instance offers a + service manager, and there is a service available at that service manager + whose name is the concatenation of + “com.sun.star.uri.UriSchemeParser_” and + s′, then that service is used. It is an error if that + service does not support + com::sun::star::uri::XUriSchemeParser.

+ + @since OOo 2.0 + */ +published service UriReferenceFactory: XUriReferenceFactory; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/uri/UriSchemeParser_vndDOTsunDOTstarDOTexpand.idl b/udkapi/com/sun/star/uri/UriSchemeParser_vndDOTsunDOTstarDOTexpand.idl new file mode 100644 index 000000000..d146d91a8 --- /dev/null +++ b/udkapi/com/sun/star/uri/UriSchemeParser_vndDOTsunDOTstarDOTexpand.idl @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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_uri_UriSchemeParser_vndDOTsunDOTstarDOTexpand_idl__ +#define __com_sun_star_uri_UriSchemeParser_vndDOTsunDOTstarDOTexpand_idl__ + +module com { module sun { module star { module uri { + +published interface XUriSchemeParser; + +/** + parses textual representations of absolute “vnd.sun.star.expand” + URLs. + +

The argument scheme of method + com::sun::star::uri::XUriSchemeParser::parse() must + always be equal to the `string` + "vnd.sun.star.expand", ignoring case. The objects returned by + com::sun::star::uri::XUriSchemeParser::parse() + implement + com::sun::star::uri::XVndSunStarExpandUrlReference.

+ +

This service is not intended to be instantiated directly by client code. + Rather, it should be used indirectly through the + com::sun::star::uri::UriReferenceFactory service.

+ + @since OOo 2.3 + */ +published service UriSchemeParser_vndDOTsunDOTstarDOTexpand: XUriSchemeParser +{}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/uri/UriSchemeParser_vndDOTsunDOTstarDOTscript.idl b/udkapi/com/sun/star/uri/UriSchemeParser_vndDOTsunDOTstarDOTscript.idl new file mode 100644 index 000000000..861be045c --- /dev/null +++ b/udkapi/com/sun/star/uri/UriSchemeParser_vndDOTsunDOTstarDOTscript.idl @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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_uri_UriSchemeParser_vndDOTsunDOTstarDOTscript_idl__ +#define __com_sun_star_uri_UriSchemeParser_vndDOTsunDOTstarDOTscript_idl__ + +module com { module sun { module star { module uri { + +published interface XUriSchemeParser; + +/** + parses textual representations of absolute “vnd.sun.star.script” + URLs. + +

The argument scheme of method + com::sun::star::uri::XUriSchemeParser::parse() must + always be equal to the `string` + "vnd.sun.star.script", ignoring case. The objects returned by + com::sun::star::uri::XUriSchemeParser::parse() + implement + com::sun::star::uri::XVndSunStarScriptUrlReference.

+ +

This service is not intended to be instantiated directly by client code. + Rather, it should be used indirectly through the + com::sun::star::uri::UriReferenceFactory service.

+ + @since OOo 2.0 + */ +published service UriSchemeParser_vndDOTsunDOTstarDOTscript: XUriSchemeParser +{}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/uri/VndSunStarPkgUrlReferenceFactory.idl b/udkapi/com/sun/star/uri/VndSunStarPkgUrlReferenceFactory.idl new file mode 100644 index 000000000..68eb8ecbf --- /dev/null +++ b/udkapi/com/sun/star/uri/VndSunStarPkgUrlReferenceFactory.idl @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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_uri_VndSunStarPkgUrlReferenceFactory_idl__ +#define __com_sun_star_uri_VndSunStarPkgUrlReferenceFactory_idl__ + +module com { module sun { module star { module uri { + +published interface XVndSunStarPkgUrlReferenceFactory; + +/** + creates “vnd.sun.star.pkg” URL references. + + @since OOo 2.0 + */ +published service VndSunStarPkgUrlReferenceFactory: + XVndSunStarPkgUrlReferenceFactory; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/uri/XExternalUriReferenceTranslator.idl b/udkapi/com/sun/star/uri/XExternalUriReferenceTranslator.idl new file mode 100644 index 000000000..05743329b --- /dev/null +++ b/udkapi/com/sun/star/uri/XExternalUriReferenceTranslator.idl @@ -0,0 +1,85 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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_uri_XExternalUriReferenceTranslator_idl__ +#define __com_sun_star_uri_XExternalUriReferenceTranslator_idl__ + +#include + +module com { module sun { module star { module uri { + +/** + translates between external and internal URI references. + +

Some URI schemes leave unspecified important aspects of how to interpret + URIs of those schemes. For example, it is unspecified for “file” + URLs how to map the byte sequences that constitute the path segments of a + “file” URL to filenames on a given platform: The UNO environment + always assumes that path segments of “file” URLs represent + UTF-8–encoded strings (which have to be mapped to filenames in a + platform-specific way), while other applications typically assume that path + segments of “file” URLs directly represent a platform's + byte-sequence filenames. This interface offers methods to translate between + such internal URIs (e.g., UTF-8–encoded “file” + URLs used within the UNO environment) and external URIs (e.g., + byte-sequence–oriented “file” URLs used by other + applications). Typically, only “file” URLs are affected by this + translation.

+ +

Since the translation process is based on URI schemes, relative URI + references (that do not include a scheme) are left unmodified by the + translation process.

+ + @since OOo 2.0 + */ +published interface XExternalUriReferenceTranslator { + /** + returns the internal counterpart of an external URI reference. + + @param externalUriReference + an external URI reference. + + @returns + the internal counterpart of the given external URI reference. An empty + string is returned if the given external URI reference either is an empty + string or cannot be converted (for example, because it contains illegal + characters). + */ + string translateToInternal([in] string externalUriReference); + + /** + returns the external counterpart of an internal URI reference. + + @param internalUriReference + an internal URI reference. + + @returns + the external counterpart of the given internal URI reference. An empty + string is returned if the given internal URI reference either is an empty + string or cannot be converted (for example, because it contains illegal + characters). + */ + string translateToExternal([in] string internalUriReference); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/uri/XUriReference.idl b/udkapi/com/sun/star/uri/XUriReference.idl new file mode 100644 index 000000000..ba42f283f --- /dev/null +++ b/udkapi/com/sun/star/uri/XUriReference.idl @@ -0,0 +1,227 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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_uri_XUriReference_idl__ +#define __com_sun_star_uri_XUriReference_idl__ + +#include + +module com { module sun { module star { module uri { + +/** + represents generic, mutable URI references. + +

See RFC 3986 for a + description of URI references and related terms.

+ +

This interface only handles generic URI references (both absolute and + relative). For specific URI schemes, there will be additional interfaces + that offer extra, scheme-specific functionality.

+ + @see com::sun::star::uri::UriReferenceFactory + which allows to create URI reference objects that support + com::sun::star::uri::XUriReference and additional, + scheme-specific interfaces. + + @since OOo 2.0 + */ +published interface XUriReference: com::sun::star::uno::XInterface { + /** + returns the textual representation of the complete URI reference. + + @returns + the textual representation of the complete URI reference. The exact + spelling of the URI reference is retained. + */ + string getUriReference(); + + /** + returns whether this URI reference is absolute or relative. + +

A URI is absolute if it has a scheme.

+ + @returns + `TRUE` if this URI reference is absolute, `FALSE` if it is relative. + */ + boolean isAbsolute(); + + /** + returns the scheme part of this (absolute) URI reference. + + @returns + the textual representation of the scheme part (with the exact spelling + retained; without the delimiting “:”), if this + is an absolute URI reference; otherwise, an empty `string` is + returned. + */ + string getScheme(); + + /** + returns the scheme-specific part of this URI reference. + +

For an absolute URI reference, the scheme-specific part is everything + after the scheme part and the delimiting “:”, + and before the optional “#” and fragment part. + For a relative URI reference, the scheme-specific part is everything + before the optional “#” and fragment part.

+ + @returns + the textual representation of the scheme-specific part (with the exact + spelling retained). + */ + string getSchemeSpecificPart(); + + /** + returns whether this URI reference is hierarchical or opaque, in the sense of RFC 2396. + +

An absolute URI reference is hierarchical if its scheme-specific part + starts with “/”. A relative URI reference is + always hierarchical.

+ + @returns + `TRUE` if this URI reference is hierarchical, `FALSE` if it is opaque. + + @deprecated RFC 3986 no longer differentiates between hierarchical and opaque URIs. + */ + boolean isHierarchical(); + + /** + returns whether this URI reference has an authority part. + + @returns + `TRUE` if this URI reference has an authority part. + */ + boolean hasAuthority(); + + /** + returns the authority part of this URI reference. + + @returns + the textual representation of the authority part (with the exact spelling + retained), if this is a URI reference that has an authority + part; otherwise, an empty `string` is returned. + */ + string getAuthority(); + + /** + returns the path part of this URI reference. + + @returns + the textual representation of the path part (with the exact spelling + retained). + */ + string getPath(); + + /** + returns whether this URI reference has a relative path. + + @returns + `TRUE` if this URI reference has a relative path. + */ + boolean hasRelativePath(); + + /** + returns the number of path segments of this URI reference. + +

For a URI reference with + an empty path, the number of path segments is zero. For a + URI reference with an absolute, non-empty path, the number of path + segments equals the number of “/” delimiters. + For a URI reference with a relative, non-empty path, the + number of path segments equals the number of “/” + delimiters, plus one.

+ + @returns + the number of path segments. + */ + long getPathSegmentCount(); + + /** + returns a given path segment of this URI reference. + + @param index + the index of the path segment, starting at zero. + + @returns + the textual representation of the given path segment (with the exact + spelling retained, without any delimiting “/”), + if this URI reference has that many path segments; + otherwise, and in particular if index is negative, an empty + `string` is returned. + */ + string getPathSegment([in] long index); + + /** + returns whether this URI reference has a query part. + + @returns + `TRUE` if this URI reference has a query part. + */ + boolean hasQuery(); + + /** + returns the query part of this URI reference. + + @returns + the textual representation of the query part (with the exact spelling + retained; without the delimiting “?”), if this + is a URI reference that has a query part; otherwise, an + empty `string` is returned. + */ + string getQuery(); + + /** + returns whether this URI reference has a fragment part. + + @returns + `TRUE` if this URI reference has a fragment part. + */ + boolean hasFragment(); + + /** + returns the fragment part of this URI reference. + + @returns + the textual representation of the fragment part (with the exact spelling + retained; without the delimiting “#”), if this + is a URI reference that has a fragment part; otherwise, an empty + `string` is returned. + */ + string getFragment(); + + /** + sets the fragment part of this URI reference. + + @param fragment + the textual representation of the new fragment part. The exact spelling + will be preserved, and no escaping is performed. + */ + void setFragment([in] string fragment); + + /** + clears the fragment part of this URI reference. + */ + void clearFragment(); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/uri/XUriReferenceFactory.idl b/udkapi/com/sun/star/uri/XUriReferenceFactory.idl new file mode 100644 index 000000000..e87542aa4 --- /dev/null +++ b/udkapi/com/sun/star/uri/XUriReferenceFactory.idl @@ -0,0 +1,160 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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_uri_XUriReferenceFactory_idl__ +#define __com_sun_star_uri_XUriReferenceFactory_idl__ + +#include +#include +#include + +module com { module sun { module star { module uri { + +/** + creates URI references. + +

See RFC 3986 for a + description of URI references and related terms.

+ + @since OOo 2.0 + */ +published interface XUriReferenceFactory: com::sun::star::uno::XInterface { + /** + parses the textual representation of a URI reference. + + @param uriReference + the textual representation of a URI reference. + + @returns + an object that supports + com::sun::star::uri::XUriReference (and possibly also + additional, scheme-specific interfaces), if the given input can be parsed + into a URI reference; otherwise, `NULL` is returned. + */ + XUriReference parse([in] string uriReference); + + /** + resolves a relative URI reference to absolute form. + + @param baseUriReference + the base URI reference. If the given uriReference is a + same-document reference, baseUriReference is used as a + reference to the current document. + + @param uriReference + any URI reference. Backwards-compatible relative URI references starting + with a scheme component (see RFC 3986, Sections 5.2.2 and 5.4,2) + are not supported; instead, they are interpreted as absolute + URI references. + + @param processAdditionalSpecialSegments + if `TRUE`, special segments (“.” and + “..”) within the path of the base URI (except + for the last, cut-off segment), and within an already absolute uriReference, are + processed as required by + RFC 3986. If `FALSE`, such special segments + are treated like ordinary segments. + Conformance with RFC 3986 requires `TRUE` to be passed. + + @param excessParentSegments + details how excess special parent segments + (“..”) are handled. + Conformance with RFC 3986 requires REMOVE to be passed. + + @returns + a fresh object that supports + com::sun::star::uri::XUriReference (and possibly also + additional, scheme-specific interfaces), if the given + uriReference can be resolved + to an absolute URI reference, relative to the given + baseUriReference; otherwise, `NULL` is returned. + Especially, if baseUriReference is `NULL`, or is not an + absolute URI reference, or if uriReference is + `NULL`, then `NULL` is always returned. + */ + XUriReference makeAbsolute( + [in] XUriReference baseUriReference, [in] XUriReference uriReference, + [in] boolean processAdditionalSpecialSegments, + [in] RelativeUriExcessParentSegments excessParentSegments); + + /** + changes an absolute URI reference to relative form. + + @param baseUriReference + the base URI reference. + + @param uriReference + any URI reference. + + @param preferAuthorityOverRelativePath + controls how a relative URI reference is generated when both + baseUriReference (e.g., + “scheme://auth/a/b”) and + uriReference (e.g., + “scheme://auth//c/d”) have the same scheme and + authority components, and the path component of uriReference + starts with “//”. If `TRUE`, the generated + relative URI reference includes an authority component (e.g., + “//auth//c/d”); if `FALSE`, the generated + relative URI reference has a relative path (e.g., + “..//c/d”). + + @param preferAbsoluteOverRelativePath + controls how a relative URI reference is generated when both + baseUriReference (e.g., + “scheme://auth/a/b”) and + uriReference (e.g., + “scheme://auth/c/d”) have the same scheme and + authority components (if present), but share no common path segments. If + `TRUE`, the generated relative URI reference has an absolute path (e.g., + “/c/d”); if `FALSE`, the generated relative URI + reference has a relative path (e.g., “../c/d”). + + @param encodeRetainedSpecialSegments + if `TRUE`, special segments (“.” and + “..”) that are already present in the path + component of the given uriReference and which end up in a + relative path returned from this method, are encoded (as + “%2E” and “%2E%2E”, + respectively). + + @returns + a fresh object that supports + com::sun::star::uri::XUriReference, if the given + uriReference is either already relative, or has a relative + path, or is of a different scheme than the given + baseUriReference, or can be changed to a relative URI + reference, relative to the given baseUriReference; + otherwise, `NULL` is returned. Especially, if + baseUriReference is `NULL`, or is not an absolute + URI reference, or if uriReference is `NULL`, + then `NULL` is always returned. + */ + XUriReference makeRelative( + [in] XUriReference baseUriReference, [in] XUriReference uriReference, + [in] boolean preferAuthorityOverRelativePath, + [in] boolean preferAbsoluteOverRelativePath, + [in] boolean encodeRetainedSpecialSegments); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/uri/XUriSchemeParser.idl b/udkapi/com/sun/star/uri/XUriSchemeParser.idl new file mode 100644 index 000000000..573a3cfb9 --- /dev/null +++ b/udkapi/com/sun/star/uri/XUriSchemeParser.idl @@ -0,0 +1,69 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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_uri_XUriSchemeParser_idl__ +#define __com_sun_star_uri_XUriSchemeParser_idl__ + +#include +#include + +module com { module sun { module star { module uri { + +/** + parses textual representations of absolute URIs. + +

See RFC 3986 for a + description of URIs and related terms.

+ + @since OOo 2.0 + */ +published interface XUriSchemeParser: com::sun::star::uno::XInterface { + /** + parses the textual representation of an absolute URI. + +

This method is used to parse URIs (with no fragment part), not URI + references (with an optional fragment part).

+ +

If an object is returned, the behaviour of its + com::sun::star::uri::XUriReference methods must + reflect the fact that the object represents an absolute URI reference + with the given scheme and scheme-specific part, and without a fragment + part.

+ + @param scheme + the textual representation of the scheme part (without the delimiting + “:”). + + @param schemeSpecificPart + the textual representation of the scheme-specific part. + + @returns + an object that supports + com::sun::star::uri::XUriReference (and possibly also + additional, scheme-specific interfaces), if the given input can be parsed + into an absolute URI; otherwise, `NULL` is returned. + */ + XUriReference parse([in] string scheme, [in] string schemeSpecificPart); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/uri/XVndSunStarExpandUrl.idl b/udkapi/com/sun/star/uri/XVndSunStarExpandUrl.idl new file mode 100644 index 000000000..8de9d5380 --- /dev/null +++ b/udkapi/com/sun/star/uri/XVndSunStarExpandUrl.idl @@ -0,0 +1,69 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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_uri_XVndSunStarExpandUrl_idl__ +#define __com_sun_star_uri_XVndSunStarExpandUrl_idl__ + +#include +#include + +module com { module sun { module star { module util { + published interface XMacroExpander; +}; }; }; }; + +module com { module sun { module star { module uri { + +/** + represents absolute “vnd.sun.star.expand” URLs. + +

These URLs are of the form
+    vnd-sun-star-expand-url = + "VND.SUN.STAR.EXPAND:" opaque_part
+ where the opaque_part is a UTF-8 string as described in + + Bootstrap Arguments and Micro Deployment. See + RFC 3986 + RFC 2234 for + details.

+ + @since OOo 2.3 + */ +published interface XVndSunStarExpandUrl { + /** + returns the expanded content of this URL. + + @param expander + a macro expander; must not be `NULL`. + + @returns + the expanded content of this URL. + + @throws com::sun::star::lang::IllegalArgumentException + if calling com::sun::star::util::XMacroExpander::expandMacros() on + expander raises any such exception. + */ + string expand([in] com::sun::star::util::XMacroExpander expander) + raises (com::sun::star::lang::IllegalArgumentException); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/uri/XVndSunStarExpandUrlReference.idl b/udkapi/com/sun/star/uri/XVndSunStarExpandUrlReference.idl new file mode 100644 index 000000000..ab7f07dd6 --- /dev/null +++ b/udkapi/com/sun/star/uri/XVndSunStarExpandUrlReference.idl @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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_uri_XVndSunStarExpandUrlReference_idl__ +#define __com_sun_star_uri_XVndSunStarExpandUrlReference_idl__ + +#include +#include + +module com { module sun { module star { module uri { + +/** + represents absolute “vnd.sun.star.expand” URL references. + + @since OOo 2.3 + */ +published interface XVndSunStarExpandUrlReference { + /** + represents the generic features of the URL reference. + +

The behaviour of the methods of this interface will always reflect the + fact that the represented URI reference is an absolute + “vnd.sun.star.expand” URL reference.

+ */ + interface XUriReference; + + /** + represents the scheme-specific features of the URL reference. + */ + interface XVndSunStarExpandUrl; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/uri/XVndSunStarPkgUrlReferenceFactory.idl b/udkapi/com/sun/star/uri/XVndSunStarPkgUrlReferenceFactory.idl new file mode 100644 index 000000000..03b58b718 --- /dev/null +++ b/udkapi/com/sun/star/uri/XVndSunStarPkgUrlReferenceFactory.idl @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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_uri_XVndSunStarPkgUrlReferenceFactory_idl__ +#define __com_sun_star_uri_XVndSunStarPkgUrlReferenceFactory_idl__ + +#include + +module com { module sun { module star { module uri { + +published interface XUriReference; + +/** + creates “vnd.sun.star.pkg” URL references. + + @since OOo 2.0 + */ +published interface XVndSunStarPkgUrlReferenceFactory { + /** + creates a new “vnd.sun.star.pkg” URL reference. + +

The returned URL reference has the given authority, an empty path, and + no fragment.

+ + @param authority the authority of the created URL reference; must not be + `NULL`, and should be an absolute URI reference with no fragment + + @return a new “vnd.sun.star.pkg” URL reference, or `NULL` if + the given authority is either not an absolute URI reference or has a + fragment + */ + XUriReference createVndSunStarPkgUrlReference([in] XUriReference authority); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/uri/XVndSunStarScriptUrl.idl b/udkapi/com/sun/star/uri/XVndSunStarScriptUrl.idl new file mode 100644 index 000000000..ca703bcf4 --- /dev/null +++ b/udkapi/com/sun/star/uri/XVndSunStarScriptUrl.idl @@ -0,0 +1,130 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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_uri_XVndSunStarScriptUrl_idl__ +#define __com_sun_star_uri_XVndSunStarScriptUrl_idl__ + +#include +#include + +module com { module sun { module star { module uri { + +/** + represents absolute “vnd.sun.star.script” URLs. + +

These URLs are of the form
+    vnd-sun-star-script-url = + "VND.SUN.STAR.SCRIPT:" name ["?" + parameter *("&" parameter)]
+    name = 1*schar
+    parameter = key "=" + value
+    key = 1*schar
+    value = *schar
+    schar = unreserved / escaped / + "$" / "+" / "," / ":" / + ";" / "@" / "[" / + "]"
+ See RFC 3986 + RFC 2234 for + details.

+ +

The names, keys, and values are arbitrary Unicode strings (non-empty + Unicode strings in the case of names and keys), encoded as UTF-8 byte + sequences. It is an error if any of them does not represent a valid UTF-8 + byte sequence. Keys are compared for equality character-by-character, + without considering case folding or normalization. There may be multiple + parameters with equal keys.

+ + @since OOo 2.0 + */ +published interface XVndSunStarScriptUrl: com::sun::star::uno::XInterface { + /** + returns the name part of this URL. + + @returns + the non-escaped value of the name part. + */ + string getName(); + + /** + sets the name part of this URL. + + @param name + specifies the non-escaped new name part of the URL. + + @throws ::com::sun::star::lang::IllegalArgumentException + if name is empty + + @since OOo 3.0 + */ + void setName([in] string name) + raises ( ::com::sun::star::lang::IllegalArgumentException ); + + /** + returns whether this URL has a parameter with a given key. + + @param key + a non-escaped key. + + @returns + `TRUE` if this URL has at least one parameter with the given key. In + particular, if key is an empty `string`, `FALSE` + is returned. + */ + boolean hasParameter([in] string key); + + /** + returns the value of a parameter with a given key. + + @param key + a non-escaped key. + + @returns + the non-escaped value of the first parameter with the given key. If + there is no parameter with the given key, or if key is an + empty `string`, an empty `string` is returned. + */ + string getParameter([in] string key); + + /** + sets the value of a parameter with a given key. + + @param key + a non-escaped key + + @param value + the non-escaped value to be set for the parameter. If there already is a + parameter with this key, the value of its first appearance will be replaced. + Otherwise, a parameter with the given key/value will be appended. + + @throws ::com::sun::star::lang::IllegalArgumentException + if key is empty + + @since OOo 3.0 + */ + void setParameter( [in] string key, [in] string value ) + raises ( ::com::sun::star::lang::IllegalArgumentException ); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/uri/XVndSunStarScriptUrlReference.idl b/udkapi/com/sun/star/uri/XVndSunStarScriptUrlReference.idl new file mode 100644 index 000000000..77209068f --- /dev/null +++ b/udkapi/com/sun/star/uri/XVndSunStarScriptUrlReference.idl @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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_uri_XVndSunStarScriptUrlReference_idl__ +#define __com_sun_star_uri_XVndSunStarScriptUrlReference_idl__ + +#include +#include + +module com { module sun { module star { module uri { + +/** + represents absolute “vnd.sun.star.script” URL references. + */ +published interface XVndSunStarScriptUrlReference { + /** + represents the generic features of the URL reference. + +

The behaviour of the methods of this interface will always reflect the + fact that the represented URI reference is an absolute + “vnd.sun.star.script” URL reference.

+ */ + interface XUriReference; + + /** + represents the scheme-specific features of the URL reference. + */ + interface XVndSunStarScriptUrl; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3