LibreOffice: rtl/tencinfo.h Source File

LibreOffice LibreOffice 26.2 SDK C/C++ API Reference

Loading...
Searching...
No Matches
tencinfo.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_TENCINFO_H
25#define INCLUDED_RTL_TENCINFO_H
26
27#include "sal/config.h"
28
29#include "rtl/textenc.h"
30#include "sal/saldllapi.h"
31#include "sal/types.h"
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37// See rtl_TextEncodingInfo.Flags below for documentation on these values:
38#define RTL_TEXTENCODING_INFO_CONTEXT ((sal_uInt32)0x00000001)
39#define RTL_TEXTENCODING_INFO_ASCII ((sal_uInt32)0x00000002)
40#define RTL_TEXTENCODING_INFO_UNICODE ((sal_uInt32)0x00000004)
41#define RTL_TEXTENCODING_INFO_MULTIBYTE ((sal_uInt32)0x00000008)
42#define RTL_TEXTENCODING_INFO_R2L ((sal_uInt32)0x00000010)
43#define RTL_TEXTENCODING_INFO_7BIT ((sal_uInt32)0x00000020)
44#define RTL_TEXTENCODING_INFO_SYMBOL ((sal_uInt32)0x00000040)
45#define RTL_TEXTENCODING_INFO_MIME ((sal_uInt32)0x00000080)
46
49 typedef struct _rtl_TextEncodingInfo
50{
53 sal_uInt32 StructSize;
54
61 sal_uInt8 MinimumCharSize;
62
69 sal_uInt8 MaximumCharSize;
70
74 sal_uInt8 AverageCharSize;
75
78 sal_uInt8 Reserved;
79
137 sal_uInt32 Flags;
138} rtl_TextEncodingInfo;
139
151 SAL_DLLPUBLIC sal_Bool SAL_CALL rtl_isOctetTextEncoding(rtl_TextEncoding nEncoding);
152
166 SAL_DLLPUBLIC sal_Bool SAL_CALL rtl_getTextEncodingInfo(
167 rtl_TextEncoding eTextEncoding, rtl_TextEncodingInfo* pEncInfo );
168
180 SAL_DLLPUBLIC rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromWindowsCharset(
181 sal_uInt8 nWinCharset );
182
192 SAL_DLLPUBLIC rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromMimeCharset(
193 const char* pMimeCharset );
194
204 SAL_DLLPUBLIC rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromUnixCharset(
205 const char* pUnixCharset );
206
215 SAL_DLLPUBLIC sal_uInt8 SAL_CALL rtl_getBestWindowsCharsetFromTextEncoding(
216 rtl_TextEncoding eTextEncoding );
217
228 SAL_DLLPUBLIC char const * SAL_CALL rtl_getMimeCharsetFromTextEncoding(
229 rtl_TextEncoding nEncoding );
230
239 SAL_DLLPUBLIC const char* SAL_CALL rtl_getBestMimeCharsetFromTextEncoding(
240 rtl_TextEncoding eTextEncoding );
241
250 SAL_DLLPUBLIC const char* SAL_CALL rtl_getBestUnixCharsetFromTextEncoding(
251 rtl_TextEncoding eTextEncoding );
252
263 SAL_DLLPUBLIC rtl_TextEncoding SAL_CALL
264rtl_getTextEncodingFromWindowsCodePage(sal_uInt32 nCodePage);
265
275 SAL_DLLPUBLIC sal_uInt32 SAL_CALL
276rtl_getWindowsCodePageFromTextEncoding(rtl_TextEncoding nEncoding);
277
278#ifdef __cplusplus
279}
280#endif
281
282#endif // INCLUDED_RTL_TENCINFO_H
283
284/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
config.h
saldllapi.h
SAL_DLLPUBLIC
#define SAL_DLLPUBLIC
Definition saldllapi.h:34
types.h
sal_uInt8
unsigned char sal_uInt8
Definition types.h:44
sal_Bool
unsigned char sal_Bool
Definition types.h:38
rtl_getTextEncodingFromWindowsCharset
SAL_DLLPUBLIC rtl_TextEncoding rtl_getTextEncodingFromWindowsCharset(sal_uInt8 nWinCharset)
Map from a numeric Windows charset to a text encoding.
rtl_getBestUnixCharsetFromTextEncoding
SAL_DLLPUBLIC const char * rtl_getBestUnixCharsetFromTextEncoding(rtl_TextEncoding eTextEncoding)
Map from a text encoding to the best matching Unix charset.
rtl_getWindowsCodePageFromTextEncoding
SAL_DLLPUBLIC sal_uInt32 rtl_getWindowsCodePageFromTextEncoding(rtl_TextEncoding nEncoding)
Map from a text encoding to a Windows code page.
rtl_getBestMimeCharsetFromTextEncoding
SAL_DLLPUBLIC const char * rtl_getBestMimeCharsetFromTextEncoding(rtl_TextEncoding eTextEncoding)
Map from a text encoding to the best matching MIME charset.
rtl_getTextEncodingFromMimeCharset
SAL_DLLPUBLIC rtl_TextEncoding rtl_getTextEncodingFromMimeCharset(const char *pMimeCharset)
Map from a MIME charset to a text encoding.
rtl_getTextEncodingInfo
SAL_DLLPUBLIC sal_Bool rtl_getTextEncodingInfo(rtl_TextEncoding eTextEncoding, rtl_TextEncodingInfo *pEncInfo)
Return information about a text encoding.
rtl_getBestWindowsCharsetFromTextEncoding
SAL_DLLPUBLIC sal_uInt8 rtl_getBestWindowsCharsetFromTextEncoding(rtl_TextEncoding eTextEncoding)
Map from a text encoding to the best matching numeric Windows charset.
rtl_getTextEncodingFromUnixCharset
SAL_DLLPUBLIC rtl_TextEncoding rtl_getTextEncodingFromUnixCharset(const char *pUnixCharset)
Map from a Unix charset to a text encoding.
rtl_TextEncodingInfo
struct _rtl_TextEncodingInfo rtl_TextEncodingInfo
Information about a text encoding.
rtl_getMimeCharsetFromTextEncoding
SAL_DLLPUBLIC char const * rtl_getMimeCharsetFromTextEncoding(rtl_TextEncoding nEncoding)
Map from a text encoding to a corresponding MIME charset name, if available (see http://www....
rtl_getTextEncodingFromWindowsCodePage
SAL_DLLPUBLIC rtl_TextEncoding rtl_getTextEncodingFromWindowsCodePage(sal_uInt32 nCodePage)
Map from a Windows code page to a text encoding.
rtl_isOctetTextEncoding
SAL_DLLPUBLIC sal_Bool rtl_isOctetTextEncoding(rtl_TextEncoding nEncoding)
Determine whether a text encoding uses single octets as basic units of information (and can thus be u...
textenc.h
rtl_TextEncoding
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition textenc.h:37
_rtl_TextEncodingInfo
Information about a text encoding.
Definition tencinfo.h:50
_rtl_TextEncodingInfo::Reserved
sal_uInt8 Reserved
An unused byte, for padding.
Definition tencinfo.h:78
_rtl_TextEncodingInfo::MaximumCharSize
sal_uInt8 MaximumCharSize
The maximum number of bytes needed to encode any character in the given encoding.
Definition tencinfo.h:69
_rtl_TextEncodingInfo::Flags
sal_uInt32 Flags
Any combination of the RTL_TEXTENCODING_INFO flags.
Definition tencinfo.h:137
_rtl_TextEncodingInfo::StructSize
sal_uInt32 StructSize
The size (in bytes) of this structure.
Definition tencinfo.h:53
_rtl_TextEncodingInfo::MinimumCharSize
sal_uInt8 MinimumCharSize
The minimum number of bytes needed to encode any character in the given encoding.
Definition tencinfo.h:61
_rtl_TextEncodingInfo::AverageCharSize
sal_uInt8 AverageCharSize
The average number of bytes needed to encode a character in the given encoding.
Definition tencinfo.h:74