12e5b6d6dSopenharmony_ci// © 2016 and later: Unicode, Inc. and others. 22e5b6d6dSopenharmony_ci// License & terms of use: http://www.unicode.org/copyright.html 32e5b6d6dSopenharmony_ci/* 42e5b6d6dSopenharmony_ci****************************************************************************** 52e5b6d6dSopenharmony_ci* Copyright (C) 2001-2016, International Business Machines 62e5b6d6dSopenharmony_ci* Corporation and others. All Rights Reserved. 72e5b6d6dSopenharmony_ci****************************************************************************** 82e5b6d6dSopenharmony_ci* file name: ucln_cmn.h 92e5b6d6dSopenharmony_ci* encoding: UTF-8 102e5b6d6dSopenharmony_ci* tab size: 8 (not used) 112e5b6d6dSopenharmony_ci* indentation:4 122e5b6d6dSopenharmony_ci* 132e5b6d6dSopenharmony_ci* created on: 2001July05 142e5b6d6dSopenharmony_ci* created by: George Rhoten 152e5b6d6dSopenharmony_ci*/ 162e5b6d6dSopenharmony_ci 172e5b6d6dSopenharmony_ci#ifndef __UCLN_CMN_H__ 182e5b6d6dSopenharmony_ci#define __UCLN_CMN_H__ 192e5b6d6dSopenharmony_ci 202e5b6d6dSopenharmony_ci#include "unicode/utypes.h" 212e5b6d6dSopenharmony_ci#include "ucln.h" 222e5b6d6dSopenharmony_ci 232e5b6d6dSopenharmony_ci/* These are the cleanup functions for various APIs. */ 242e5b6d6dSopenharmony_ci/* @return true if cleanup complete successfully.*/ 252e5b6d6dSopenharmony_ciU_CFUNC UBool utrace_cleanup(void); 262e5b6d6dSopenharmony_ci 272e5b6d6dSopenharmony_ciU_CFUNC UBool ucln_lib_cleanup(void); 282e5b6d6dSopenharmony_ci 292e5b6d6dSopenharmony_ci/* 302e5b6d6dSopenharmony_ciPlease keep the order of enums declared in same order 312e5b6d6dSopenharmony_cias the cleanup functions are suppose to be called. */ 322e5b6d6dSopenharmony_citypedef enum ECleanupCommonType { 332e5b6d6dSopenharmony_ci UCLN_COMMON_START = -1, 342e5b6d6dSopenharmony_ci UCLN_COMMON_NUMPARSE_UNISETS, 352e5b6d6dSopenharmony_ci UCLN_COMMON_USPREP, 362e5b6d6dSopenharmony_ci UCLN_COMMON_BREAKITERATOR, 372e5b6d6dSopenharmony_ci UCLN_COMMON_RBBI, 382e5b6d6dSopenharmony_ci UCLN_COMMON_SERVICE, 392e5b6d6dSopenharmony_ci UCLN_COMMON_LOCALE_KEY_TYPE, 402e5b6d6dSopenharmony_ci UCLN_COMMON_LOCALE, 412e5b6d6dSopenharmony_ci UCLN_COMMON_LOCALE_ALIAS, 422e5b6d6dSopenharmony_ci UCLN_COMMON_LOCALE_KNOWN_CANONICALIZED, 432e5b6d6dSopenharmony_ci UCLN_COMMON_LOCALE_AVAILABLE, 442e5b6d6dSopenharmony_ci UCLN_COMMON_LIKELY_SUBTAGS, 452e5b6d6dSopenharmony_ci UCLN_COMMON_LOCALE_DISTANCE, 462e5b6d6dSopenharmony_ci UCLN_COMMON_ULOC, 472e5b6d6dSopenharmony_ci UCLN_COMMON_CURRENCY, 482e5b6d6dSopenharmony_ci UCLN_COMMON_LOADED_NORMALIZER2, 492e5b6d6dSopenharmony_ci UCLN_COMMON_NORMALIZER2, 502e5b6d6dSopenharmony_ci UCLN_COMMON_CHARACTERPROPERTIES, 512e5b6d6dSopenharmony_ci UCLN_COMMON_USET, 522e5b6d6dSopenharmony_ci UCLN_COMMON_UNAMES, 532e5b6d6dSopenharmony_ci UCLN_COMMON_UPROPS, 542e5b6d6dSopenharmony_ci UCLN_COMMON_EMOJIPROPS, 552e5b6d6dSopenharmony_ci UCLN_COMMON_UCNV, 562e5b6d6dSopenharmony_ci UCLN_COMMON_UCNV_IO, 572e5b6d6dSopenharmony_ci UCLN_COMMON_UDATA, 582e5b6d6dSopenharmony_ci UCLN_COMMON_PUTIL, 592e5b6d6dSopenharmony_ci UCLN_COMMON_UINIT, 602e5b6d6dSopenharmony_ci 612e5b6d6dSopenharmony_ci /* 622e5b6d6dSopenharmony_ci Unified caches caches collation stuff. Collation data structures 632e5b6d6dSopenharmony_ci contain resource bundles which means that unified cache cleanup 642e5b6d6dSopenharmony_ci must happen before resource bundle clean up. 652e5b6d6dSopenharmony_ci */ 662e5b6d6dSopenharmony_ci UCLN_COMMON_UNIFIED_CACHE, 672e5b6d6dSopenharmony_ci UCLN_COMMON_URES, 682e5b6d6dSopenharmony_ci UCLN_COMMON_MUTEX, // Mutexes should be the last to be cleaned up. 692e5b6d6dSopenharmony_ci UCLN_COMMON_COUNT /* This must be last */ 702e5b6d6dSopenharmony_ci} ECleanupCommonType; 712e5b6d6dSopenharmony_ci 722e5b6d6dSopenharmony_ci/* Main library cleanup registration function. */ 732e5b6d6dSopenharmony_ci/* See common/ucln.h for details on adding a cleanup function. */ 742e5b6d6dSopenharmony_ci/* Note: the global mutex must not be held when calling this function. */ 752e5b6d6dSopenharmony_ciU_CFUNC void U_EXPORT2 ucln_common_registerCleanup(ECleanupCommonType type, 762e5b6d6dSopenharmony_ci cleanupFunc *func); 772e5b6d6dSopenharmony_ci 782e5b6d6dSopenharmony_ci#endif 79