]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | /* |
2 | ****************************************************************************** | |
2ca993e8 A |
3 | * Copyright (C) 2001-2016, International Business Machines |
4 | * Corporation and others. All Rights Reserved. | |
b75a7d8f A |
5 | ****************************************************************************** |
6 | * file name: ucln_cmn.h | |
7 | * encoding: US-ASCII | |
8 | * tab size: 8 (not used) | |
9 | * indentation:4 | |
10 | * | |
11 | * created on: 2001July05 | |
12 | * created by: George Rhoten | |
13 | */ | |
14 | ||
15 | #ifndef __UCLN_CMN_H__ | |
16 | #define __UCLN_CMN_H__ | |
17 | ||
18 | #include "unicode/utypes.h" | |
374ca955 | 19 | #include "ucln.h" |
b75a7d8f A |
20 | |
21 | /* These are the cleanup functions for various APIs. */ | |
22 | /* @return true if cleanup complete successfully.*/ | |
374ca955 | 23 | U_CFUNC UBool umtx_cleanup(void); |
b75a7d8f | 24 | |
374ca955 | 25 | U_CFUNC UBool utrace_cleanup(void); |
b75a7d8f | 26 | |
73c04bcf | 27 | U_CFUNC UBool ucln_lib_cleanup(void); |
b75a7d8f | 28 | |
374ca955 A |
29 | /* |
30 | Please keep the order of enums declared in same order | |
73c04bcf | 31 | as the cleanup functions are suppose to be called. */ |
374ca955 A |
32 | typedef enum ECleanupCommonType { |
33 | UCLN_COMMON_START = -1, | |
34 | UCLN_COMMON_USPREP, | |
35 | UCLN_COMMON_BREAKITERATOR, | |
73c04bcf | 36 | UCLN_COMMON_BREAKITERATOR_DICT, |
374ca955 | 37 | UCLN_COMMON_SERVICE, |
b331163b | 38 | UCLN_COMMON_LOCALE_KEY_TYPE, |
374ca955 | 39 | UCLN_COMMON_LOCALE, |
729e4ab9 | 40 | UCLN_COMMON_LOCALE_AVAILABLE, |
374ca955 | 41 | UCLN_COMMON_ULOC, |
2ca993e8 | 42 | UCLN_COMMON_CURRENCY, |
b331163b | 43 | UCLN_COMMON_LOADED_NORMALIZER2, |
729e4ab9 | 44 | UCLN_COMMON_NORMALIZER2, |
374ca955 A |
45 | UCLN_COMMON_USET, |
46 | UCLN_COMMON_UNAMES, | |
73c04bcf | 47 | UCLN_COMMON_UPROPS, |
374ca955 A |
48 | UCLN_COMMON_UCNV, |
49 | UCLN_COMMON_UCNV_IO, | |
50 | UCLN_COMMON_UDATA, | |
51 | UCLN_COMMON_PUTIL, | |
51004dcb | 52 | UCLN_COMMON_LIST_FORMATTER, |
57a6839d | 53 | UCLN_COMMON_UINIT, |
b331163b A |
54 | |
55 | /* | |
56 | Unified caches caches collation stuff. Collation data structures | |
57 | contain resource bundles which means that unified cache cleanup | |
58 | must happen before resource bundle clean up. | |
59 | */ | |
60 | UCLN_COMMON_UNIFIED_CACHE, | |
61 | UCLN_COMMON_URES, | |
374ca955 A |
62 | UCLN_COMMON_COUNT /* This must be last */ |
63 | } ECleanupCommonType; | |
64 | ||
65 | /* Main library cleanup registration function. */ | |
66 | /* See common/ucln.h for details on adding a cleanup function. */ | |
b331163b | 67 | /* Note: the global mutex must not be held when calling this function. */ |
374ca955 A |
68 | U_CFUNC void U_EXPORT2 ucln_common_registerCleanup(ECleanupCommonType type, |
69 | cleanupFunc *func); | |
b75a7d8f A |
70 | |
71 | #endif |