From 267c6f2ac71f92999e969232431ba04678e7437e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 07:54:39 +0200 Subject: Adding upstream version 4:24.2.0. Signed-off-by: Daniel Baumann --- udkapi/com/sun/star/uri/XUriReference.idl | 220 ++++++++++++++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 udkapi/com/sun/star/uri/XUriReference.idl (limited to 'udkapi/com/sun/star/uri/XUriReference.idl') diff --git a/udkapi/com/sun/star/uri/XUriReference.idl b/udkapi/com/sun/star/uri/XUriReference.idl new file mode 100644 index 0000000000..c2b971935f --- /dev/null +++ b/udkapi/com/sun/star/uri/XUriReference.idl @@ -0,0 +1,220 @@ +/* -*- 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 . + */ + +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(); +}; + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3