LibreOffice: rtl/uri.h Source File

LibreOffice LibreOffice 7.4 SDK C/C++ API Reference

Loading...
Searching...
No Matches
uri.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20/*
21 * This file is part of LibreOffice published API.
22 */
23
24#ifndef INCLUDED_RTL_URI_H
25#define INCLUDED_RTL_URI_H
26
27#include "sal/config.h"
28
29#include "rtl/textenc.h"
30#include "rtl/ustring.h"
31#include "sal/saldllapi.h"
32#include "sal/types.h"
33
34#if defined __cplusplus
35extern "C" {
36#endif /* __cplusplus */
37
49 typedef enum
50{
55 rtl_UriCharClassNone,
56
66 rtl_UriCharClassUric,
67
77 rtl_UriCharClassUricNoSlash,
78
87 rtl_UriCharClassRelSegment,
88
97 rtl_UriCharClassRegName,
98
107 rtl_UriCharClassUserinfo,
108
117 rtl_UriCharClassPchar,
118
125 rtl_UriCharClassUnoParamValue,
126
127 rtl_UriCharClass_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
128}
129 rtl_UriCharClass;
130
134 typedef enum
135{
143 rtl_UriEncodeIgnoreEscapes,
144
154 rtl_UriEncodeKeepEscapes,
155
165 rtl_UriEncodeCheckEscapes,
166
172 rtl_UriEncodeStrict,
173
179 rtl_UriEncodeStrictKeepEscapes,
180
181 rtl_UriEncode_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
182}
183 rtl_UriEncodeMechanism;
184
188 typedef enum
189{
192 rtl_UriDecodeNone,
193
201 rtl_UriDecodeToIuri,
202
208 rtl_UriDecodeWithCharset,
209
215 rtl_UriDecodeStrict,
216
217 rtl_UriDecode_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
218}
219 rtl_UriDecodeMechanism;
220
232 SAL_DLLPUBLIC sal_Bool const * SAL_CALL rtl_getUriCharClass(rtl_UriCharClass eCharClass)
233 SAL_THROW_EXTERN_C();
234
269 SAL_DLLPUBLIC void SAL_CALL rtl_uriEncode(
270 rtl_uString * pText,
271 sal_Bool const * pCharClass,
272 rtl_UriEncodeMechanism eMechanism,
273 rtl_TextEncoding eCharset,
274 rtl_uString ** pResult)
275 SAL_THROW_EXTERN_C();
276
307 SAL_DLLPUBLIC void SAL_CALL rtl_uriDecode(
308 rtl_uString * pText,
309 rtl_UriDecodeMechanism eMechanism,
310 rtl_TextEncoding eCharset,
311 rtl_uString ** pResult)
312 SAL_THROW_EXTERN_C();
313
344 SAL_DLLPUBLIC sal_Bool SAL_CALL rtl_uriConvertRelToAbs(
345 rtl_uString * pBaseUriRef,
346 rtl_uString * pRelUriRef,
347 rtl_uString ** pResult,
348 rtl_uString ** pException)
349 SAL_THROW_EXTERN_C();
350
351#if defined __cplusplus
352}
353#endif /* __cplusplus */
354
355#endif // INCLUDED_RTL_URI_H
356
357/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
config.h
saldllapi.h
SAL_DLLPUBLIC
#define SAL_DLLPUBLIC
Definition: saldllapi.h:34
types.h
SAL_MAX_ENUM
#define SAL_MAX_ENUM
Definition: types.h:205
sal_Bool
unsigned char sal_Bool
Definition: types.h:38
SAL_THROW_EXTERN_C
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition: types.h:334
ustring.h
textenc.h
rtl_TextEncoding
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition: textenc.h:37
rtl_getUriCharClass
SAL_DLLPUBLIC sal_Bool const * rtl_getUriCharClass(rtl_UriCharClass eCharClass) SAL_THROW_EXTERN_C()
Map a predefined rtl_UriCharClass to a form usable by rtl_uriEncode().
rtl_uriEncode
SAL_DLLPUBLIC void rtl_uriEncode(rtl_uString *pText, sal_Bool const *pCharClass, rtl_UriEncodeMechanism eMechanism, rtl_TextEncoding eCharset, rtl_uString **pResult) SAL_THROW_EXTERN_C()
Encode a text as (part of) a URI.
rtl_uriDecode
SAL_DLLPUBLIC void rtl_uriDecode(rtl_uString *pText, rtl_UriDecodeMechanism eMechanism, rtl_TextEncoding eCharset, rtl_uString **pResult) SAL_THROW_EXTERN_C()
Decode (a part of) a URI.
rtl_UriDecodeMechanism
rtl_UriDecodeMechanism
The mechanism describing how rtl_uriDecode() translates (part of) a URI into a Unicode string.
Definition: uri.h:189
rtl_UriDecodeWithCharset
@ rtl_UriDecodeWithCharset
The text is decoded.
Definition: uri.h:208
rtl_UriDecodeToIuri
@ rtl_UriDecodeToIuri
The text is returned in the form of an IURI (cf.
Definition: uri.h:201
rtl_UriDecode_FORCE_EQUAL_SIZE
@ rtl_UriDecode_FORCE_EQUAL_SIZE
Definition: uri.h:217
rtl_UriDecodeNone
@ rtl_UriDecodeNone
The text is returned completely unmodified.
Definition: uri.h:192
rtl_UriDecodeStrict
@ rtl_UriDecodeStrict
Like rtl_UriDecodeWithCharset, but indicating failure when converting unmappable characters.
Definition: uri.h:215
rtl_UriEncodeMechanism
rtl_UriEncodeMechanism
The mechanism describing how escape sequences in the input of rtl_uriEncode() are handled.
Definition: uri.h:135
rtl_UriEncodeStrict
@ rtl_UriEncodeStrict
Like rtl_UriEncodeIgnoreEscapes, but indicating failure when converting unmappable characters.
Definition: uri.h:172
rtl_UriEncodeIgnoreEscapes
@ rtl_UriEncodeIgnoreEscapes
The special meaning of '' is ignored (i.e., there are by definition no escape sequences in the input)...
Definition: uri.h:143
rtl_UriEncode_FORCE_EQUAL_SIZE
@ rtl_UriEncode_FORCE_EQUAL_SIZE
Definition: uri.h:181
rtl_UriEncodeStrictKeepEscapes
@ rtl_UriEncodeStrictKeepEscapes
Like rtl_UriEncodeKeepEscapes, but indicating failure when converting unmappable characters.
Definition: uri.h:179
rtl_UriEncodeKeepEscapes
@ rtl_UriEncodeKeepEscapes
All escape sequences ('' followed by two hex digits) are kept intact, even if they represent characte...
Definition: uri.h:154
rtl_UriEncodeCheckEscapes
@ rtl_UriEncodeCheckEscapes
All escape sequences ('' followed by two hex digits) are resolved in a first step; only those that re...
Definition: uri.h:165
rtl_uriConvertRelToAbs
SAL_DLLPUBLIC sal_Bool rtl_uriConvertRelToAbs(rtl_uString *pBaseUriRef, rtl_uString *pRelUriRef, rtl_uString **pResult, rtl_uString **pException) SAL_THROW_EXTERN_C()
Convert a relative URI reference into an absolute URI.
rtl_UriCharClass
rtl_UriCharClass
Various predefined URI 'char classes.
Definition: uri.h:50
rtl_UriCharClassRelSegment
@ rtl_UriCharClassRelSegment
The RFC 2396 <rel_segment> char class.
Definition: uri.h:87
rtl_UriCharClassPchar
@ rtl_UriCharClassPchar
The RFC 2396 <pchar> char class.
Definition: uri.h:117
rtl_UriCharClassUserinfo
@ rtl_UriCharClassUserinfo
The RFC 2396 <userinfo> char class.
Definition: uri.h:107
rtl_UriCharClassUnoParamValue
@ rtl_UriCharClassUnoParamValue
The char class for the values of uno URL parameters.
Definition: uri.h:125
rtl_UriCharClassNone
@ rtl_UriCharClassNone
The empty char class.
Definition: uri.h:55
rtl_UriCharClass_FORCE_EQUAL_SIZE
@ rtl_UriCharClass_FORCE_EQUAL_SIZE
Definition: uri.h:127
rtl_UriCharClassUricNoSlash
@ rtl_UriCharClassUricNoSlash
The RFC 2396 <uric_no_slash> char class.
Definition: uri.h:77
rtl_UriCharClassRegName
@ rtl_UriCharClassRegName
The RFC 2396 <reg_name> char class.
Definition: uri.h:97
rtl_UriCharClassUric
@ rtl_UriCharClassUric
The RFC 2732 <uric> char class.
Definition: uri.h:66