fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / udkapi / com / sun / star / uri / XUriReferenceFactory.idl
blob133f1f3cf23d9dcacac357d2537333229d332b2c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_uri_XUriReferenceFactory_idl__
21 #define __com_sun_star_uri_XUriReferenceFactory_idl__
23 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/uri/RelativeUriExcessParentSegments.idl>
25 #include <com/sun/star/uri/XUriReference.idl>
27 module com { module sun { module star { module uri {
29 /**
30 creates URI references.
32 <p>See <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC&nbsp;2396</a> for a
33 description of URI references and related terms.</p>
35 @since OOo 2.0
37 published interface XUriReferenceFactory: com::sun::star::uno::XInterface {
38 /**
39 parses the textual representation of a URI reference.
41 @param uriReference
42 the textual representation of a URI reference.
44 @returns
45 an object that supports
46 com::sun::star::uri::XUriReference (and possibly also
47 additional, scheme-specific interfaces), if the given input can be parsed
48 into a URI reference; otherwise, `NULL` is returned.
50 XUriReference parse([in] string uriReference);
52 /**
53 resolves a relative URI reference to absolute form.
55 @param baseUriReference
56 the base URI reference. If the given <code>uriReference</code> is a
57 same-document reference, <code>baseUriReference</code> is used as a
58 reference to the current document.
60 @param uriReference
61 any URI reference. Backwards-compatible relative URI references starting
62 with a scheme component (see RFC&nbsp;2396, Section&nbsp;5.2,
63 step&nbsp;3) are not supported; instead, they are interpreted as absolute
64 URI references.
66 @param processSpecialBaseSegments
67 if `TRUE`, special segments (&ldquo;<code>.</code>&rdquo; and
68 &ldquo;<code>..</code>&rdquo;) within the path of the base URI (except
69 for the last, cut-off segment) are processed as suggested by
70 RFC&nbsp;2396. If `FALSE`, special segments within the path of the base
71 URI are treated like ordinary segments.
73 @param excessParentSegments
74 details how excess special parent segments
75 (&ldquo;<code>..</code>&rdquo;) are handled.
77 @returns
78 a fresh object that supports
79 com::sun::star::uri::XUriReference (and possibly also
80 additional, scheme-specific interfaces), if the given
81 <code>uriReference</code> is either already absolute, or can be resolved
82 to an absolute URI reference, relative to the given
83 <code>baseUriReference</code>; otherwise, `NULL` is returned.
84 Especially, if <code>baseUriReference</code> is `NULL`, or is not an
85 absolute, hierarchical URI reference, or if <code>uriReference</code> is
86 `NULL`, then `NULL` is always returned.
88 XUriReference makeAbsolute(
89 [in] XUriReference baseUriReference, [in] XUriReference uriReference,
90 [in] boolean processSpecialBaseSegments,
91 [in] RelativeUriExcessParentSegments excessParentSegments);
93 /**
94 changes an absolute URI reference to relative form.
96 @param baseUriReference
97 the base URI reference.
99 @param uriReference
100 any URI reference.
102 @param preferAuthorityOverRelativePath
103 controls how a relative URI reference is generated when both
104 <code>baseUriReference</code> (e.g.,
105 &ldquo;<code>scheme://auth/a/b</code>&rdquo;) and
106 <code>uriReference</code> (e.g.,
107 &ldquo;<code>scheme://auth//c/d</code>&rdquo;) have the same scheme and
108 authority components, and the path component of <code>uriReference</code>
109 starts with &ldquo;<code>//</code>&rdquo;. If `TRUE`, the generated
110 relative URI reference includes an authority component (e.g.,
111 &ldquo;<code>//auth//c/d</code>&rdquo;); if `FALSE`, the generated
112 relative URI reference has a relative path (e.g.,
113 &ldquo;<code>..//c/d</code>&rdquo;).
115 @param preferAbsoluteOverRelativePath
116 controls how a relative URI reference is generated when both
117 <code>baseUriReference</code> (e.g.,
118 &ldquo;<code>scheme://auth/a/b</code>&rdquo;) and
119 <code>uriReference</code> (e.g.,
120 &ldquo;<code>scheme://auth/c/d</code>&rdquo;) have the same scheme and
121 authority components (if present), but share no common path segments. If
122 `TRUE`, the generated relative URI reference has an absolute path (e.g.,
123 &ldquo;<code>/c/d</code>&rdquo;); if `FALSE`, the generated relative URI
124 reference has a relative path (e.g., &ldquo;<code>../c/d</code>&rdquo;).
126 @param encodeRetainedSpecialSegments
127 if `TRUE`, special segments (&ldquo;<code>.</code>&rdquo; and
128 &ldquo;<code>..</code>&rdquo;) that are already present in the path
129 component of the given <code>uriReference</code> and which end up in a
130 relative path returned from this method, are encoded (as
131 &ldquo;<code>%2E</code>&rdquo; and &ldquo;<code>%2E%2E</code>&rdquo;,
132 respectively).
134 @returns
135 a fresh object that supports
136 com::sun::star::uri::XUriReference, if the given
137 <code>uriReference</code> is either already relative, or is not
138 hierarchical, or is of a different scheme than the given
139 <code>baseUriReference</code>, or can be changed to a relative URI
140 reference, relative to the given <code>baseUriReference</code>;
141 otherwise, `NULL` is returned. Especially, if
142 <code>baseUriReference</code> is `NULL`, or is not an absolute,
143 hierarchical URI reference, or if <code>uriReference</code> is `NULL`,
144 then `NULL` is always returned.
146 XUriReference makeRelative(
147 [in] XUriReference baseUriReference, [in] XUriReference uriReference,
148 [in] boolean preferAuthorityOverRelativePath,
149 [in] boolean preferAbsoluteOverRelativePath,
150 [in] boolean encodeRetainedSpecialSegments);
153 }; }; }; };
155 #endif
157 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */