diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /udkapi/com/sun/star/uri | |
parent | Initial commit. (diff) | |
download | libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
15 files changed, 1208 insertions, 0 deletions
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 <com/sun/star/uri/XExternalUriReferenceTranslator.idl> + +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 (“<code>..</code>”) + 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. + + <p>See <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a> for a + description of URI references and related terms.</p> + + <p>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.</p> + + <p>Locating a scheme-specific parser works as follows: A scheme consists of + Latin capital letters + “<code>A</code>”–“<code>Z</code>”, Latin small + letters “<code>a</code>”–“<code>z</code>”, + digits “<code>0</code>”–“<code>9</code>”, + “<code>+</code>”, “<code>-</code>”, and + “<code>.</code>”. A scheme <var>s</var> is transformed into + a string <var>s</var>′ character-by-character, by translating + Latin capital letters to their small counterparts, translating + “<code>+</code>” to “<code>PLUS</code>”, + “<code>-</code>” to “<code>HYPHEN</code>”, + “<code>.</code>” to “<code>DOT</code>”, and copying + Latin small letters and digits unchanged. If the component context used + while creating this <code>UriReferenceFactory</code> instance offers a + service manager, and there is a service available at that service manager + whose name is the concatenation of + “<code>com.sun.star.uri.UriSchemeParser_</code>” and + <var>s</var>′, then that service is used. It is an error if that + service does not support + com::sun::star::uri::XUriSchemeParser.</p> + + @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. + + <p>The argument <code>scheme</code> of method + com::sun::star::uri::XUriSchemeParser::parse() must + always be equal to the `string` + <code>"vnd.sun.star.expand"</code>, ignoring case. The objects returned by + com::sun::star::uri::XUriSchemeParser::parse() + implement + com::sun::star::uri::XVndSunStarExpandUrlReference.</p> + + <p>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.</p> + + @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. + + <p>The argument <code>scheme</code> of method + com::sun::star::uri::XUriSchemeParser::parse() must + always be equal to the `string` + <code>"vnd.sun.star.script"</code>, ignoring case. The objects returned by + com::sun::star::uri::XUriSchemeParser::parse() + implement + com::sun::star::uri::XVndSunStarScriptUrlReference.</p> + + <p>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.</p> + + @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 <com/sun/star/uno/XInterface.idl> + +module com { module sun { module star { module uri { + +/** + translates between external and internal URI references. + + <p>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 <dfn>internal</dfn> URIs (e.g., UTF-8–encoded “file” + URLs used within the UNO environment) and <dfn>external</dfn> URIs (e.g., + byte-sequence–oriented “file” URLs used by other + applications). Typically, only “file” URLs are affected by this + translation.</p> + + <p>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.</p> + + @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 <com/sun/star/uno/XInterface.idl> + +module com { module sun { module star { module uri { + +/** + represents generic, mutable URI references. + + <p>See <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a> for a + description of URI references and related terms.</p> + + <p>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.</p> + + @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. + + <p>A URI is absolute if it has a scheme.</p> + + @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 “<code>:</code>”), if this + is an absolute URI reference; otherwise, an empty `string` is + returned. + */ + string getScheme(); + + /** + returns the scheme-specific part of this URI reference. + + <p>For an absolute URI reference, the scheme-specific part is everything + after the scheme part and the delimiting “<code>:</code>”, + and before the optional “<code>#</code>” and fragment part. + For a relative URI reference, the scheme-specific part is everything + before the optional “<code>#</code>” and fragment part.</p> + + @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. + + <p>An absolute URI reference is hierarchical if its scheme-specific part + starts with “<code>/</code>”. A relative URI reference is + always hierarchical.</p> + + @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. + + <p>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 “<code>/</code>” delimiters. + For a URI reference with a relative, non-empty path, the + number of path segments equals the number of “<code>/</code>” + delimiters, plus one.</p> + + @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 “<code>/</code>”), + if this URI reference has that many path segments; + otherwise, and in particular if <code>index</code> 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 “<code>?</code>”), 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 “<code>#</code>”), 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 <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uri/RelativeUriExcessParentSegments.idl> +#include <com/sun/star/uri/XUriReference.idl> + +module com { module sun { module star { module uri { + +/** + creates URI references. + + <p>See <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a> for a + description of URI references and related terms.</p> + + @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 <code>uriReference</code> is a + same-document reference, <code>baseUriReference</code> 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 (“<code>.</code>” and + “<code>..</code>”) within the path of the base URI (except + for the last, cut-off segment), and within an already absolute <code>uriReference</code>, 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 + (“<code>..</code>”) 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 + <code>uriReference</code> can be resolved + to an absolute URI reference, relative to the given + <code>baseUriReference</code>; otherwise, `NULL` is returned. + Especially, if <code>baseUriReference</code> is `NULL`, or is not an + absolute URI reference, or if <code>uriReference</code> 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 + <code>baseUriReference</code> (e.g., + “<code>scheme://auth/a/b</code>”) and + <code>uriReference</code> (e.g., + “<code>scheme://auth//c/d</code>”) have the same scheme and + authority components, and the path component of <code>uriReference</code> + starts with “<code>//</code>”. If `TRUE`, the generated + relative URI reference includes an authority component (e.g., + “<code>//auth//c/d</code>”); if `FALSE`, the generated + relative URI reference has a relative path (e.g., + “<code>..//c/d</code>”). + + @param preferAbsoluteOverRelativePath + controls how a relative URI reference is generated when both + <code>baseUriReference</code> (e.g., + “<code>scheme://auth/a/b</code>”) and + <code>uriReference</code> (e.g., + “<code>scheme://auth/c/d</code>”) 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., + “<code>/c/d</code>”); if `FALSE`, the generated relative URI + reference has a relative path (e.g., “<code>../c/d</code>”). + + @param encodeRetainedSpecialSegments + if `TRUE`, special segments (“<code>.</code>” and + “<code>..</code>”) that are already present in the path + component of the given <code>uriReference</code> and which end up in a + relative path returned from this method, are encoded (as + “<code>%2E</code>” and “<code>%2E%2E</code>”, + respectively). + + @returns + a fresh object that supports + com::sun::star::uri::XUriReference, if the given + <code>uriReference</code> is either already relative, or has a relative + path, or is of a different scheme than the given + <code>baseUriReference</code>, or can be changed to a relative URI + reference, relative to the given <code>baseUriReference</code>; + otherwise, `NULL` is returned. Especially, if + <code>baseUriReference</code> is `NULL`, or is not an absolute + URI reference, or if <code>uriReference</code> 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 <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uri/XUriReference.idl> + +module com { module sun { module star { module uri { + +/** + parses textual representations of absolute URIs. + + <p>See <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a> for a + description of URIs and related terms.</p> + + @since OOo 2.0 + */ +published interface XUriSchemeParser: com::sun::star::uno::XInterface { + /** + parses the textual representation of an absolute URI. + + <p>This method is used to parse URIs (with no fragment part), not URI + references (with an optional fragment part).</p> + + <p>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.</p> + + @param scheme + the textual representation of the scheme part (without the delimiting + “<code>:</code>”). + + @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 <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/uno/XInterface.idl> + +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. + + <p>These URLs are of the form<br/> + <var>vnd-sun-star-expand-url</var> = + <code>"VND.SUN.STAR.EXPAND:"</code> <var>opaque_part</var><br/> + where the <var>opaque_part</var> is a UTF-8 string as described in + <a href="http://udk.openoffice.org/common/man/concept/micro_deployment.html"> + Bootstrap Arguments and Micro Deployment</a>. See + <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a> + <a href="http://www.ietf.org/rfc/rfc2234.txt">RFC 2234</a> for + details.</p> + + @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 + <code>expander</code> 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 <com/sun/star/uri/XUriReference.idl> +#include <com/sun/star/uri/XVndSunStarExpandUrl.idl> + +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. + + <p>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.</p> + */ + 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 <com/sun/star/uno/XInterface.idl> + +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. + + <p>The returned URL reference has the given authority, an empty path, and + no fragment.</p> + + @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 <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/uno/XInterface.idl> + +module com { module sun { module star { module uri { + +/** + represents absolute “vnd.sun.star.script” URLs. + + <p>These URLs are of the form<br/> + <var>vnd-sun-star-script-url</var> = + <code>"VND.SUN.STAR.SCRIPT:"</code> <var>name</var> [<code>"?"</code> + <var>parameter</var> *(<code>"&"</code> <var>parameter</var>)]<br/> + <var>name</var> = 1*<var>schar</var><br/> + <var>parameter</var> = <var>key</var> <code>"="</code> + <var>value</var><br/> + <var>key</var> = 1*<var>schar</var><br/> + <var>value</var> = *<var>schar</var><br/> + <var>schar</var> = <var>unreserved</var> / <var>escaped</var> / + <code>"$"</code> / <code>"+"</code> / <code>","</code> / <code>":"</code> / + <code>";"</code> / <code>"@"</code> / <code>"["</code> / + <code>"]"</code><br/> + See <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a> + <a href="http://www.ietf.org/rfc/rfc2234.txt">RFC 2234</a> for + details.</p> + + <p>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.</p> + + @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 <code>key</code> 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 <code>key</code> 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 <com/sun/star/uri/XUriReference.idl> +#include <com/sun/star/uri/XVndSunStarScriptUrl.idl> + +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. + + <p>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.</p> + */ + interface XUriReference; + + /** + represents the scheme-specific features of the URL reference. + */ + interface XVndSunStarScriptUrl; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |