xref: /aoo4110/main/sal/inc/rtl/uri.h (revision b1cdbd2c)
1*b1cdbd2cSJim Jagielski /**************************************************************
2*b1cdbd2cSJim Jagielski  *
3*b1cdbd2cSJim Jagielski  * Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski  * or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski  * distributed with this work for additional information
6*b1cdbd2cSJim Jagielski  * regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski  * to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski  * "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski  * with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski  *
11*b1cdbd2cSJim Jagielski  *   http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski  *
13*b1cdbd2cSJim Jagielski  * Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski  * software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski  * KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski  * specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski  * under the License.
19*b1cdbd2cSJim Jagielski  *
20*b1cdbd2cSJim Jagielski  *************************************************************/
21*b1cdbd2cSJim Jagielski 
22*b1cdbd2cSJim Jagielski 
23*b1cdbd2cSJim Jagielski 
24*b1cdbd2cSJim Jagielski #ifndef _RTL_URI_H_
25*b1cdbd2cSJim Jagielski #define _RTL_URI_H_
26*b1cdbd2cSJim Jagielski 
27*b1cdbd2cSJim Jagielski #include "rtl/textenc.h"
28*b1cdbd2cSJim Jagielski #include "rtl/ustring.h"
29*b1cdbd2cSJim Jagielski #include "sal/types.h"
30*b1cdbd2cSJim Jagielski 
31*b1cdbd2cSJim Jagielski #if defined __cplusplus
32*b1cdbd2cSJim Jagielski extern "C" {
33*b1cdbd2cSJim Jagielski #endif /* __cplusplus */
34*b1cdbd2cSJim Jagielski 
35*b1cdbd2cSJim Jagielski /**  Various predefined URI 'char classes.'
36*b1cdbd2cSJim Jagielski 
37*b1cdbd2cSJim Jagielski      @descr
38*b1cdbd2cSJim Jagielski      A 'char class' defines which (ASCII) characters can be written 'as they
39*b1cdbd2cSJim Jagielski      are' in a part of a Uri, and which characters have to be written using
40*b1cdbd2cSJim Jagielski      escape sequences ('%' followed by two hex digits).  Characters outside
41*b1cdbd2cSJim Jagielski      the ASCII range are always written using escape sequences.
42*b1cdbd2cSJim Jagielski 
43*b1cdbd2cSJim Jagielski      @descr
44*b1cdbd2cSJim Jagielski      If there are other frequently used char classes, they can be added to
45*b1cdbd2cSJim Jagielski      this enumeration; the function rtl_getUriCharClass() has to be adapted
46*b1cdbd2cSJim Jagielski      then, too.
47*b1cdbd2cSJim Jagielski  */
48*b1cdbd2cSJim Jagielski typedef enum
49*b1cdbd2cSJim Jagielski {
50*b1cdbd2cSJim Jagielski     /** The empty char class.
51*b1cdbd2cSJim Jagielski 
52*b1cdbd2cSJim Jagielski         @descr
53*b1cdbd2cSJim Jagielski         All characters are written using escape sequences.
54*b1cdbd2cSJim Jagielski      */
55*b1cdbd2cSJim Jagielski     rtl_UriCharClassNone,
56*b1cdbd2cSJim Jagielski 
57*b1cdbd2cSJim Jagielski     /** The RFC 2732 <uric> char class.
58*b1cdbd2cSJim Jagielski 
59*b1cdbd2cSJim Jagielski         @descr
60*b1cdbd2cSJim Jagielski         The 'valid' characters are !$&'()*+,-./:;=?@[]_~ plus digits and
61*b1cdbd2cSJim Jagielski         letters.
62*b1cdbd2cSJim Jagielski      */
63*b1cdbd2cSJim Jagielski     rtl_UriCharClassUric,
64*b1cdbd2cSJim Jagielski 
65*b1cdbd2cSJim Jagielski     /** The RFC 2396 <uric_no_slash> char class.
66*b1cdbd2cSJim Jagielski 
67*b1cdbd2cSJim Jagielski         @descr
68*b1cdbd2cSJim Jagielski         The 'valid' characters are !$&'()*+,-.:;=?@_~ plus digits and letters.
69*b1cdbd2cSJim Jagielski      */
70*b1cdbd2cSJim Jagielski     rtl_UriCharClassUricNoSlash,
71*b1cdbd2cSJim Jagielski 
72*b1cdbd2cSJim Jagielski     /** The RFC 2396 <rel_segment> char class.
73*b1cdbd2cSJim Jagielski 
74*b1cdbd2cSJim Jagielski         @descr
75*b1cdbd2cSJim Jagielski         The 'valid' characters are !$&'()*+,-.;=@_~ plus digits and letters.
76*b1cdbd2cSJim Jagielski      */
77*b1cdbd2cSJim Jagielski     rtl_UriCharClassRelSegment,
78*b1cdbd2cSJim Jagielski 
79*b1cdbd2cSJim Jagielski     /** The RFC 2396 <reg_name> char class.
80*b1cdbd2cSJim Jagielski 
81*b1cdbd2cSJim Jagielski         @descr
82*b1cdbd2cSJim Jagielski         The 'valid' characters are !$&'()*+,-.:;=@_~ plus digits and letters.
83*b1cdbd2cSJim Jagielski      */
84*b1cdbd2cSJim Jagielski     rtl_UriCharClassRegName,
85*b1cdbd2cSJim Jagielski 
86*b1cdbd2cSJim Jagielski     /** The RFC 2396 <userinfo> char class.
87*b1cdbd2cSJim Jagielski 
88*b1cdbd2cSJim Jagielski         @descr
89*b1cdbd2cSJim Jagielski         The 'valid' characters are !$&'()*+,-.:;=_~ plus digits and letters.
90*b1cdbd2cSJim Jagielski      */
91*b1cdbd2cSJim Jagielski     rtl_UriCharClassUserinfo,
92*b1cdbd2cSJim Jagielski 
93*b1cdbd2cSJim Jagielski     /** The RFC 2396 <pchar> char class.
94*b1cdbd2cSJim Jagielski 
95*b1cdbd2cSJim Jagielski         @descr
96*b1cdbd2cSJim Jagielski         The 'valid' characters are !$&'()*+,-.:=@_~ plus digits and letters.
97*b1cdbd2cSJim Jagielski      */
98*b1cdbd2cSJim Jagielski     rtl_UriCharClassPchar,
99*b1cdbd2cSJim Jagielski 
100*b1cdbd2cSJim Jagielski     /** The char class for the values of uno URL parameters.
101*b1cdbd2cSJim Jagielski 
102*b1cdbd2cSJim Jagielski         @descr
103*b1cdbd2cSJim Jagielski         The 'valid' characters are !$&'()*+-./:?@_~ plus digits and letters.
104*b1cdbd2cSJim Jagielski      */
105*b1cdbd2cSJim Jagielski     rtl_UriCharClassUnoParamValue,
106*b1cdbd2cSJim Jagielski 
107*b1cdbd2cSJim Jagielski     rtl_UriCharClass_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
108*b1cdbd2cSJim Jagielski }
109*b1cdbd2cSJim Jagielski rtl_UriCharClass;
110*b1cdbd2cSJim Jagielski 
111*b1cdbd2cSJim Jagielski /** The mechanism describing how escape sequences in the input of
112*b1cdbd2cSJim Jagielski     rtl_uriEncode() are handled.
113*b1cdbd2cSJim Jagielski  */
114*b1cdbd2cSJim Jagielski typedef enum
115*b1cdbd2cSJim Jagielski {
116*b1cdbd2cSJim Jagielski     /** The special meaning of '%' is ignored (i.e., there are by definition
117*b1cdbd2cSJim Jagielski         no escape sequences in the input).
118*b1cdbd2cSJim Jagielski 
119*b1cdbd2cSJim Jagielski         @descr
120*b1cdbd2cSJim Jagielski         This mechanism is useful to encode user input as part of a URI (e.g.,
121*b1cdbd2cSJim Jagielski         the user-supplied password in an ftp URL---'%20abcde' is a valid
122*b1cdbd2cSJim Jagielski         password, so do not assume that the '%20' is an escaped space).
123*b1cdbd2cSJim Jagielski      */
124*b1cdbd2cSJim Jagielski     rtl_UriEncodeIgnoreEscapes,
125*b1cdbd2cSJim Jagielski 
126*b1cdbd2cSJim Jagielski     /** All escape sequences ('%' followed by two hex digits) are kept intact,
127*b1cdbd2cSJim Jagielski         even if they represent characters that need not be escaped or if they
128*b1cdbd2cSJim Jagielski         do not even map to characters in the given charset.
129*b1cdbd2cSJim Jagielski 
130*b1cdbd2cSJim Jagielski         @descr
131*b1cdbd2cSJim Jagielski         This mechanism is useful when passing on complete URIs more or less
132*b1cdbd2cSJim Jagielski         unmodified (e.g., within an HTTP proxy): missing escape sequences are
133*b1cdbd2cSJim Jagielski         added, but existing escape sequences are not touched (except that any
134*b1cdbd2cSJim Jagielski         lower case hex digits are replaced by upper case hex digits).
135*b1cdbd2cSJim Jagielski      */
136*b1cdbd2cSJim Jagielski     rtl_UriEncodeKeepEscapes,
137*b1cdbd2cSJim Jagielski 
138*b1cdbd2cSJim Jagielski     /** All escape sequences ('%' followed by two hex digits) are resolved in
139*b1cdbd2cSJim Jagielski         a first step; only those that represent characters that need to be
140*b1cdbd2cSJim Jagielski         escaped are kept intact.
141*b1cdbd2cSJim Jagielski 
142*b1cdbd2cSJim Jagielski         @descr
143*b1cdbd2cSJim Jagielski         This mechanism is useful to properly encode complete URIs entered by
144*b1cdbd2cSJim Jagielski         the user: the URI is brought into a 'canonic form,' but care is taken
145*b1cdbd2cSJim Jagielski         not to damage (valid) escape sequences the (careful) user already
146*b1cdbd2cSJim Jagielski         entered as such.
147*b1cdbd2cSJim Jagielski      */
148*b1cdbd2cSJim Jagielski     rtl_UriEncodeCheckEscapes,
149*b1cdbd2cSJim Jagielski 
150*b1cdbd2cSJim Jagielski     /** Like rtl_UriEncodeIgnoreEscapes, but indicating failure when converting
151*b1cdbd2cSJim Jagielski         unmappable characters.
152*b1cdbd2cSJim Jagielski 
153*b1cdbd2cSJim Jagielski         @since UDK 3.2.0
154*b1cdbd2cSJim Jagielski      */
155*b1cdbd2cSJim Jagielski     rtl_UriEncodeStrict,
156*b1cdbd2cSJim Jagielski 
157*b1cdbd2cSJim Jagielski     /** Like rtl_UriEncodeKeepEscapes, but indicating failure when converting
158*b1cdbd2cSJim Jagielski         unmappable characters.
159*b1cdbd2cSJim Jagielski 
160*b1cdbd2cSJim Jagielski         @since UDK 3.2.7
161*b1cdbd2cSJim Jagielski      */
162*b1cdbd2cSJim Jagielski     rtl_UriEncodeStrictKeepEscapes,
163*b1cdbd2cSJim Jagielski 
164*b1cdbd2cSJim Jagielski     rtl_UriEncode_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
165*b1cdbd2cSJim Jagielski }
166*b1cdbd2cSJim Jagielski rtl_UriEncodeMechanism;
167*b1cdbd2cSJim Jagielski 
168*b1cdbd2cSJim Jagielski /** The mechanism describing how rtl_uriDecode() translates (part of) a URI
169*b1cdbd2cSJim Jagielski     into a Unicode string.
170*b1cdbd2cSJim Jagielski  */
171*b1cdbd2cSJim Jagielski typedef enum
172*b1cdbd2cSJim Jagielski {
173*b1cdbd2cSJim Jagielski     /** The text is returned completely unmodified.
174*b1cdbd2cSJim Jagielski      */
175*b1cdbd2cSJim Jagielski     rtl_UriDecodeNone,
176*b1cdbd2cSJim Jagielski 
177*b1cdbd2cSJim Jagielski     /** The text is returned in the form of an IURI (cf.
178*b1cdbd2cSJim Jagielski         draft-masinter-url-i18n-05.txt).
179*b1cdbd2cSJim Jagielski 
180*b1cdbd2cSJim Jagielski         @descr
181*b1cdbd2cSJim Jagielski         All escape sequences representing ASCII characters (%00--%7F) are
182*b1cdbd2cSJim Jagielski         kept, all other escape sequences are interpreted as UTF-8 characters
183*b1cdbd2cSJim Jagielski         and translated to Unicode, if possible.
184*b1cdbd2cSJim Jagielski      */
185*b1cdbd2cSJim Jagielski     rtl_UriDecodeToIuri,
186*b1cdbd2cSJim Jagielski 
187*b1cdbd2cSJim Jagielski     /** The text is decoded.
188*b1cdbd2cSJim Jagielski 
189*b1cdbd2cSJim Jagielski         @descr
190*b1cdbd2cSJim Jagielski         All escape sequences representing characters from the given charset
191*b1cdbd2cSJim Jagielski         are decoded and translated to Unicode, if possible.
192*b1cdbd2cSJim Jagielski      */
193*b1cdbd2cSJim Jagielski     rtl_UriDecodeWithCharset,
194*b1cdbd2cSJim Jagielski 
195*b1cdbd2cSJim Jagielski     /** Like rtl_UriDecodeWithCharset, but indicating failure when converting
196*b1cdbd2cSJim Jagielski         unmappable characters.
197*b1cdbd2cSJim Jagielski 
198*b1cdbd2cSJim Jagielski         @since UDK 3.2.0
199*b1cdbd2cSJim Jagielski      */
200*b1cdbd2cSJim Jagielski     rtl_UriDecodeStrict,
201*b1cdbd2cSJim Jagielski 
202*b1cdbd2cSJim Jagielski     rtl_UriDecode_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
203*b1cdbd2cSJim Jagielski }
204*b1cdbd2cSJim Jagielski rtl_UriDecodeMechanism;
205*b1cdbd2cSJim Jagielski 
206*b1cdbd2cSJim Jagielski /** Map a predefined rtl_UriCharClass to a form usable by rtl_uriEncode().
207*b1cdbd2cSJim Jagielski 
208*b1cdbd2cSJim Jagielski     @descr
209*b1cdbd2cSJim Jagielski     The function rtl_uriEncode() expects an array of 128 booleans, and this
210*b1cdbd2cSJim Jagielski     function maps rtl_UriCharClass enumeration members to such arrays.
211*b1cdbd2cSJim Jagielski 
212*b1cdbd2cSJim Jagielski     @param eCharClass
213*b1cdbd2cSJim Jagielski     Any valid member of rtl_UriCharClass.
214*b1cdbd2cSJim Jagielski 
215*b1cdbd2cSJim Jagielski     @return
216*b1cdbd2cSJim Jagielski     An array of 128 booleans, to be used in calls to rtl_uriEncode().
217*b1cdbd2cSJim Jagielski  */
218*b1cdbd2cSJim Jagielski sal_Bool const * SAL_CALL rtl_getUriCharClass(rtl_UriCharClass eCharClass)
219*b1cdbd2cSJim Jagielski     SAL_THROW_EXTERN_C();
220*b1cdbd2cSJim Jagielski 
221*b1cdbd2cSJim Jagielski /** Encode a text as (part of) a URI.
222*b1cdbd2cSJim Jagielski 
223*b1cdbd2cSJim Jagielski     @param pText
224*b1cdbd2cSJim Jagielski     Any Unicode string.  Must not be null.
225*b1cdbd2cSJim Jagielski 
226*b1cdbd2cSJim Jagielski     @param pCharClass
227*b1cdbd2cSJim Jagielski     A char class, represented as an array of 128 booleans (true means keep the
228*b1cdbd2cSJim Jagielski     corresponding ASCII character unencoded, false means encode it).  Must not
229*b1cdbd2cSJim Jagielski     be null, and the boolean corresponding to the percent sign (0x25) must be
230*b1cdbd2cSJim Jagielski     false.  (See rtl_getUriCharClass() for a function mapping from
231*b1cdbd2cSJim Jagielski     rtl_UriCharClass to such arrays.)
232*b1cdbd2cSJim Jagielski 
233*b1cdbd2cSJim Jagielski     @param eMechanism
234*b1cdbd2cSJim Jagielski     The mechanism describing how escape sequences in the input text are
235*b1cdbd2cSJim Jagielski     handled.
236*b1cdbd2cSJim Jagielski 
237*b1cdbd2cSJim Jagielski     @param eCharset
238*b1cdbd2cSJim Jagielski     When Unicode characters from the input text have to be written using
239*b1cdbd2cSJim Jagielski     escape sequences (because they are either outside the ASCII range or do
240*b1cdbd2cSJim Jagielski     not belong to the given char class), they are first translated into this
241*b1cdbd2cSJim Jagielski     charset before being encoded using escape sequences.
242*b1cdbd2cSJim Jagielski 
243*b1cdbd2cSJim Jagielski     Also, if the encode mechanism is rtl_UriEncodeCheckEscapes, all escape
244*b1cdbd2cSJim Jagielski     sequences already present in the input text are interpreted as characters
245*b1cdbd2cSJim Jagielski     from this charset.
246*b1cdbd2cSJim Jagielski 
247*b1cdbd2cSJim Jagielski     @param pResult
248*b1cdbd2cSJim Jagielski     Returns an encoded representation of the input text.  Must itself not be
249*b1cdbd2cSJim Jagielski     null, and must point to either null or a valid string.
250*b1cdbd2cSJim Jagielski 
251*b1cdbd2cSJim Jagielski     If the encode mechanism is rtl_UriEncodeStrict, and pText cannot be
252*b1cdbd2cSJim Jagielski     converted to eCharset because it contains unmappable characters (which
253*b1cdbd2cSJim Jagielski     implies that pText is not empty), then an empty string is returned.
254*b1cdbd2cSJim Jagielski  */
255*b1cdbd2cSJim Jagielski void SAL_CALL rtl_uriEncode(rtl_uString * pText,
256*b1cdbd2cSJim Jagielski                             sal_Bool const * pCharClass,
257*b1cdbd2cSJim Jagielski                             rtl_UriEncodeMechanism eMechanism,
258*b1cdbd2cSJim Jagielski                             rtl_TextEncoding eCharset,
259*b1cdbd2cSJim Jagielski                             rtl_uString ** pResult)
260*b1cdbd2cSJim Jagielski     SAL_THROW_EXTERN_C();
261*b1cdbd2cSJim Jagielski 
262*b1cdbd2cSJim Jagielski /** Decode (a part of) a URI.
263*b1cdbd2cSJim Jagielski 
264*b1cdbd2cSJim Jagielski     @param pText
265*b1cdbd2cSJim Jagielski     Any Unicode string.  Must not be null.  (If the input is indeed part of a
266*b1cdbd2cSJim Jagielski     valid URI, this string will only contain a subset of the ASCII characters,
267*b1cdbd2cSJim Jagielski     but this function also handles other Unicode characters properly.)
268*b1cdbd2cSJim Jagielski 
269*b1cdbd2cSJim Jagielski     @param eMechanism
270*b1cdbd2cSJim Jagielski     The mechanism describing how the input text is translated into a Unicode
271*b1cdbd2cSJim Jagielski     string.
272*b1cdbd2cSJim Jagielski 
273*b1cdbd2cSJim Jagielski     @param eCharset
274*b1cdbd2cSJim Jagielski     When the decode mechanism is rtl_UriDecodeWithCharset, all escape
275*b1cdbd2cSJim Jagielski     sequences in the input text are interpreted as characters from this
276*b1cdbd2cSJim Jagielski     charset.  Those characters are translated to Unicode characters in the
277*b1cdbd2cSJim Jagielski     resulting output, if possible.
278*b1cdbd2cSJim Jagielski 
279*b1cdbd2cSJim Jagielski     When the decode mechanism is rtl_UriDecodeNone or rtl_UriDecodeToIuri,
280*b1cdbd2cSJim Jagielski     this parameter is ignored (and is best specified as
281*b1cdbd2cSJim Jagielski     RTL_TEXTENCODING_UTF8).
282*b1cdbd2cSJim Jagielski 
283*b1cdbd2cSJim Jagielski     @param pResult
284*b1cdbd2cSJim Jagielski     Returns a decoded representation of the input text.  Must itself not be
285*b1cdbd2cSJim Jagielski     null, and must point to either null or a valid string.
286*b1cdbd2cSJim Jagielski 
287*b1cdbd2cSJim Jagielski     If the decode mechanism is rtl_UriDecodeStrict, and pText cannot be
288*b1cdbd2cSJim Jagielski     converted to eCharset because it contains (encodings of) unmappable
289*b1cdbd2cSJim Jagielski     characters (which implies that pText is not empty), then an empty string is
290*b1cdbd2cSJim Jagielski     returned.
291*b1cdbd2cSJim Jagielski  */
292*b1cdbd2cSJim Jagielski void SAL_CALL rtl_uriDecode(rtl_uString * pText,
293*b1cdbd2cSJim Jagielski                             rtl_UriDecodeMechanism eMechanism,
294*b1cdbd2cSJim Jagielski                             rtl_TextEncoding eCharset,
295*b1cdbd2cSJim Jagielski                             rtl_uString ** pResult)
296*b1cdbd2cSJim Jagielski     SAL_THROW_EXTERN_C();
297*b1cdbd2cSJim Jagielski 
298*b1cdbd2cSJim Jagielski /** Convert a relative URI reference into an absolute one.
299*b1cdbd2cSJim Jagielski 
300*b1cdbd2cSJim Jagielski     A URI reference is a URI plus an optional <"#" fragment> part.
301*b1cdbd2cSJim Jagielski 
302*b1cdbd2cSJim Jagielski     This function uses the algorithm described in RFC 2396, section 5.2, with
303*b1cdbd2cSJim Jagielski     the following clarifications:  (1) Backwards-compatible relative URIs
304*b1cdbd2cSJim Jagielski     starting with a scheme component (see RFC 2396, section 5.2, step 3) are not
305*b1cdbd2cSJim Jagielski     supported.  (2) Segments "." and ".." within the path of the base URI are
306*b1cdbd2cSJim Jagielski     not considered special, RFC 2396 seems a bit unlcear about that point.
307*b1cdbd2cSJim Jagielski     (3) Erroneous excess segments ".." within the path of the relative URI (if
308*b1cdbd2cSJim Jagielski     it is indeed relative) are left intact, as the examples in RFC 2396,
309*b1cdbd2cSJim Jagielski     section C.2, suggest.  (4) If the relative URI is a reference to the
310*b1cdbd2cSJim Jagielski     "current document," the "current document" is taken to be the base URI.
311*b1cdbd2cSJim Jagielski 
312*b1cdbd2cSJim Jagielski     This function signals exceptions by returning false and letting pException
313*b1cdbd2cSJim Jagielski     point to a message explaining the exception.
314*b1cdbd2cSJim Jagielski 
315*b1cdbd2cSJim Jagielski     @param pBaseUriRef
316*b1cdbd2cSJim Jagielski     An absolute, hierarchical URI reference that serves as the base URI.  If it
317*b1cdbd2cSJim Jagielski     has to be inspected (i.e., pRelUriRef is not an absolute URI already), and
318*b1cdbd2cSJim Jagielski     if it either is not an absolute URI (i.e., does not begin with a
319*b1cdbd2cSJim Jagielski     <scheme ":"> part) or has a path that is non-empty but does not start
320*b1cdbd2cSJim Jagielski     with "/", an exception will be signaled.
321*b1cdbd2cSJim Jagielski 
322*b1cdbd2cSJim Jagielski     @param pRelUriRef
323*b1cdbd2cSJim Jagielski     An URI reference that may be either absolute or relative.  If it is
324*b1cdbd2cSJim Jagielski     absolute, it will be returned unmodified (and it need not be hierarchical
325*b1cdbd2cSJim Jagielski     then).
326*b1cdbd2cSJim Jagielski 
327*b1cdbd2cSJim Jagielski     @param pResult
328*b1cdbd2cSJim Jagielski     Returns an absolute URI reference.  Must itself not be null, and must point
329*b1cdbd2cSJim Jagielski     to either null or a valid string.  If an exception is signalled, it is left
330*b1cdbd2cSJim Jagielski     unchanged.
331*b1cdbd2cSJim Jagielski 
332*b1cdbd2cSJim Jagielski     @param pException
333*b1cdbd2cSJim Jagielski     Returns an explanatory message in case an exception is signalled.  Must
334*b1cdbd2cSJim Jagielski     itself not be null, and must point to either null or a valid string.  If no
335*b1cdbd2cSJim Jagielski     exception is signalled, it is left unchanged.
336*b1cdbd2cSJim Jagielski 
337*b1cdbd2cSJim Jagielski     @return
338*b1cdbd2cSJim Jagielski     True if no exception is signalled, otherwise false.
339*b1cdbd2cSJim Jagielski  */
340*b1cdbd2cSJim Jagielski sal_Bool SAL_CALL rtl_uriConvertRelToAbs(rtl_uString * pBaseUriRef,
341*b1cdbd2cSJim Jagielski                                          rtl_uString * pRelUriRef,
342*b1cdbd2cSJim Jagielski                                          rtl_uString ** pResult,
343*b1cdbd2cSJim Jagielski                                          rtl_uString ** pException)
344*b1cdbd2cSJim Jagielski     SAL_THROW_EXTERN_C();
345*b1cdbd2cSJim Jagielski 
346*b1cdbd2cSJim Jagielski #if defined __cplusplus
347*b1cdbd2cSJim Jagielski }
348*b1cdbd2cSJim Jagielski #endif /* __cplusplus */
349*b1cdbd2cSJim Jagielski 
350*b1cdbd2cSJim Jagielski #endif /* _RTL_URI_H_ */
351