]> git.saurik.com Git - apple/icu.git/blame - icuSources/common/ucnv_imp.h
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / common / ucnv_imp.h
CommitLineData
b75a7d8f
A
1/*
2**********************************************************************
3* Copyright (C) 1999-2003, International Business Machines
4* Corporation and others. All Rights Reserved.
5**********************************************************************
6*
7*
8* ucnv_imp.h:
9* Contains all internal and external data structure definitions
10* Created & Maitained by Bertrand A. Damiba
11*
12*
13*
14* ATTENTION:
15* ---------
16* Although the data structures in this file are open and stack allocatable
17* we reserve the right to hide them in further releases.
18*/
19
20#ifndef UCNV_IMP_H
21#define UCNV_IMP_H
22
23#include "unicode/utypes.h"
24#include "ucnv_bld.h"
25
26/* figures out if we need to go to file to read in the data tables.
27 * @param converterName The name of the converter
28 * @param err The error code
29 * @return the newly created converter
30 */
31UConverter *ucnv_createConverter (UConverter *myUConverter, const char *converterName, UErrorCode * err);
32
33/*
34 * Open a purely algorithmic converter, specified by a type constant.
35 * @param myUConverter NULL, or pre-allocated UConverter structure to avoid
36 * a memory allocation
37 * @param type requested converter type
38 * @param locale locale parameter, or ""
39 * @param options converter options bit set (default 0)
40 * @param err ICU error code, not tested for U_FAILURE on input
41 * because this is an internal function
42 * @internal
43 */
44U_CFUNC UConverter *
45ucnv_createAlgorithmicConverter(UConverter *myUConverter,
46 UConverterType type,
47 const char *locale, uint32_t options,
48 UErrorCode *err);
49
50/* Creates a converter from shared data
51 */
52UConverter*
53ucnv_createConverterFromSharedData(UConverter *myUConverter, UConverterSharedData *mySharedConverterData, const char *realName, const char *locale, uint32_t options, UErrorCode *err);
54
55UConverter* ucnv_createConverterFromPackage(const char *packageName, const char *converterName,
56 UErrorCode *err);
57
58/**
59 * This may unload the shared data in a thread safe manner.
60 * This will only unload the data if no other converters are sharing it.
61 */
62void
63ucnv_unloadSharedDataIfReady(UConverterSharedData *sharedData);
64
65/**
66 * This is a thread safe way to increment the reference count.
67 */
68void
69ucnv_incrementRefCount(UConverterSharedData *sharedData);
70
71
72/* returns true if "name" is in algorithmicConverterNames
73 * @param name The converter name.
74 * @return TRUE if "name" is in algorithmicConverterNames.
75 */
76UBool ucnv_isDataBasedConverter (const char *name);
77
78/* Copy the string that is represented by the UConverterPlatform enum
79 * @param platformString An output buffer
80 * @param platform An enum representing a platform
81 * @return the length of the copied string.
82 */
83int32_t ucnv_copyPlatformString(char *platformString, UConverterPlatform platform);
84
85
86#endif /* _UCNV_IMP */