ucln_cmn.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // © 2016 and later: Unicode, Inc. and others.
  2. // License & terms of use: http://www.unicode.org/copyright.html
  3. /*
  4. ******************************************************************************
  5. * Copyright (C) 2001-2016, International Business Machines
  6. * Corporation and others. All Rights Reserved.
  7. ******************************************************************************
  8. * file name: ucln_cmn.h
  9. * encoding: UTF-8
  10. * tab size: 8 (not used)
  11. * indentation:4
  12. *
  13. * created on: 2001July05
  14. * created by: George Rhoten
  15. */
  16. #ifndef __UCLN_CMN_H__
  17. #define __UCLN_CMN_H__
  18. #include "unicode/utypes.h"
  19. #include "ucln.h"
  20. /* These are the cleanup functions for various APIs. */
  21. /* @return true if cleanup complete successfully.*/
  22. U_CFUNC UBool utrace_cleanup(void);
  23. U_CFUNC UBool ucln_lib_cleanup(void);
  24. /*
  25. Please keep the order of enums declared in same order
  26. as the cleanup functions are suppose to be called. */
  27. typedef enum ECleanupCommonType {
  28. UCLN_COMMON_START = -1,
  29. UCLN_COMMON_NUMPARSE_UNISETS,
  30. UCLN_COMMON_USPREP,
  31. UCLN_COMMON_BREAKITERATOR,
  32. UCLN_COMMON_RBBI,
  33. UCLN_COMMON_SERVICE,
  34. UCLN_COMMON_LOCALE_KEY_TYPE,
  35. UCLN_COMMON_LOCALE,
  36. UCLN_COMMON_LOCALE_ALIAS,
  37. UCLN_COMMON_LOCALE_KNOWN_CANONICALIZED,
  38. UCLN_COMMON_LOCALE_AVAILABLE,
  39. UCLN_COMMON_LIKELY_SUBTAGS,
  40. UCLN_COMMON_LOCALE_DISTANCE,
  41. UCLN_COMMON_ULOC,
  42. UCLN_COMMON_CURRENCY,
  43. UCLN_COMMON_LOADED_NORMALIZER2,
  44. UCLN_COMMON_NORMALIZER2,
  45. UCLN_COMMON_CHARACTERPROPERTIES,
  46. UCLN_COMMON_USET,
  47. UCLN_COMMON_UNAMES,
  48. UCLN_COMMON_UPROPS,
  49. UCLN_COMMON_EMOJIPROPS,
  50. UCLN_COMMON_UCNV,
  51. UCLN_COMMON_UCNV_IO,
  52. UCLN_COMMON_UDATA,
  53. UCLN_COMMON_PUTIL,
  54. UCLN_COMMON_UINIT,
  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,
  62. UCLN_COMMON_MUTEX, // Mutexes should be the last to be cleaned up.
  63. UCLN_COMMON_COUNT /* This must be last */
  64. } ECleanupCommonType;
  65. /* Main library cleanup registration function. */
  66. /* See common/ucln.h for details on adding a cleanup function. */
  67. /* Note: the global mutex must not be held when calling this function. */
  68. U_CFUNC void U_EXPORT2 ucln_common_registerCleanup(ECleanupCommonType type,
  69. cleanupFunc *func);
  70. #endif