LibreOffice
LibreOffice 7.1 SDK C/C++ API Reference
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#ifndef INCLUDED_RTL_URI_H
21#define INCLUDED_RTL_URI_H
22
23#include "sal/config.h"
24
25#include "rtl/textenc.h"
26#include "rtl/ustring.h"
27#include "sal/saldllapi.h"
28#include "sal/types.h"
29
30#if defined __cplusplus
31extern "C" {
32#endif /* __cplusplus */
33
45typedef enum
46{
52
61
69
77
85
93
101
109
113
117typedef enum
118{
127
138
149
156
163
167
171typedef enum
172{
176
185
192
199
203
217
253 rtl_uString * pText,
254 sal_Bool const * pCharClass,
255 rtl_UriEncodeMechanism eMechanism,
256 rtl_TextEncoding eCharset,
257 rtl_uString ** pResult)
259
291 rtl_uString * pText,
292 rtl_UriDecodeMechanism eMechanism,
293 rtl_TextEncoding eCharset,
294 rtl_uString ** pResult)
296
328 rtl_uString * pBaseUriRef,
329 rtl_uString * pRelUriRef,
330 rtl_uString ** pResult,
331 rtl_uString ** pException)
333
334#if defined __cplusplus
335}
336#endif /* __cplusplus */
337
338#endif // INCLUDED_RTL_URI_H
339
340/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define SAL_DLLPUBLIC
Definition: saldllapi.h:30
#define SAL_MAX_ENUM
Definition: types.h:201
unsigned char sal_Bool
Definition: types.h:34
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition: types.h:324
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition: textenc.h:33
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().
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.
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
The mechanism describing how rtl_uriDecode() translates (part of) a URI into a Unicode string.
Definition: uri.h:172
@ rtl_UriDecodeWithCharset
The text is decoded.
Definition: uri.h:191
@ rtl_UriDecodeToIuri
The text is returned in the form of an IURI (cf.
Definition: uri.h:184
@ rtl_UriDecode_FORCE_EQUAL_SIZE
Definition: uri.h:200
@ rtl_UriDecodeNone
The text is returned completely unmodified.
Definition: uri.h:175
@ rtl_UriDecodeStrict
Like rtl_UriDecodeWithCharset, but indicating failure when converting unmappable characters.
Definition: uri.h:198
rtl_UriEncodeMechanism
The mechanism describing how escape sequences in the input of rtl_uriEncode() are handled.
Definition: uri.h:118
@ rtl_UriEncodeStrict
Like rtl_UriEncodeIgnoreEscapes, but indicating failure when converting unmappable characters.
Definition: uri.h:155
@ rtl_UriEncodeIgnoreEscapes
The special meaning of '' is ignored (i.e., there are by definition no escape sequences in the input)...
Definition: uri.h:126
@ rtl_UriEncode_FORCE_EQUAL_SIZE
Definition: uri.h:164
@ rtl_UriEncodeStrictKeepEscapes
Like rtl_UriEncodeKeepEscapes, but indicating failure when converting unmappable characters.
Definition: uri.h:162
@ rtl_UriEncodeKeepEscapes
All escape sequences ('' followed by two hex digits) are kept intact, even if they represent characte...
Definition: uri.h:137
@ rtl_UriEncodeCheckEscapes
All escape sequences ('' followed by two hex digits) are resolved in a first step; only those that re...
Definition: uri.h:148
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
Various predefined URI 'char classes.
Definition: uri.h:46
@ rtl_UriCharClassRelSegment
The RFC 2396 <rel_segment> char class.
Definition: uri.h:76
@ rtl_UriCharClassPchar
The RFC 2396 <pchar> char class.
Definition: uri.h:100
@ rtl_UriCharClassUserinfo
The RFC 2396 <userinfo> char class.
Definition: uri.h:92
@ rtl_UriCharClassUnoParamValue
The char class for the values of uno URL parameters.
Definition: uri.h:108
@ rtl_UriCharClassNone
The empty char class.
Definition: uri.h:51
@ rtl_UriCharClass_FORCE_EQUAL_SIZE
Definition: uri.h:110
@ rtl_UriCharClassUricNoSlash
The RFC 2396 <uric_no_slash> char class.
Definition: uri.h:68
@ rtl_UriCharClassRegName
The RFC 2396 <reg_name> char class.
Definition: uri.h:84
@ rtl_UriCharClassUric
The RFC 2732 <uric> char class.
Definition: uri.h:60