]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/ucln.h
ICU-59117.0.1.tar.gz
[apple/icu.git] / icuSources / common / ucln.h
index a4573e93bb28a4fe2f848a58423cf78621c00c4b..fe6666efed3f188fb7736be7c47146899e19c0f4 100644 (file)
@@ -1,12 +1,14 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 ******************************************************************************
-*                                                                            *
-* Copyright (C) 2001-2007, International Business Machines                   *
-*                Corporation and others. All Rights Reserved.                *
-*                                                                            *
+*
+* Copyright (C) 2001-2013, International Business Machines
+*                Corporation and others. All Rights Reserved.
+*
 ******************************************************************************
-*   file name:  ucln_cmn.h
-*   encoding:   US-ASCII
+*   file name:  ucln.h
+*   encoding:   UTF-8
 *   tab size:   8 (not used)
 *   indentation:4
 *
  * Please see common/ucln_cmn.{h,c} and i18n/ucln_in.{h,c} for examples.
  */
 
+/**
+ * Data Type for cleanup function selector. These roughly correspond to libraries.
+ */
 typedef enum ECleanupLibraryType {
     UCLN_START = -1,
+    UCLN_UPLUG,     /* ICU plugins */
     UCLN_CUSTOM,    /* Custom is for anyone else. */
     UCLN_CTESTFW,
+    UCLN_TOOLUTIL,
     UCLN_LAYOUTEX,
     UCLN_LAYOUT,
     UCLN_IO,
@@ -58,11 +65,27 @@ typedef enum ECleanupLibraryType {
     UCLN_COMMON /* This must be the last one to cleanup. */
 } ECleanupLibraryType;
 
+/**
+ * Data type for cleanup function pointer
+ */
 U_CDECL_BEGIN
 typedef UBool U_CALLCONV cleanupFunc(void);
+typedef void U_CALLCONV initFunc(UErrorCode *);
 U_CDECL_END
 
+/**
+ * Register a cleanup function
+ * @param type which library to register for.
+ * @param func the function pointer
+ */
 U_CAPI void U_EXPORT2 ucln_registerCleanup(ECleanupLibraryType type,
                                            cleanupFunc *func);
 
+/**
+ * Request cleanup for one specific library.
+ * Not thread safe.
+ * @param type which library to cleanup
+ */
+U_CAPI void U_EXPORT2 ucln_cleanupOne(ECleanupLibraryType type);
+
 #endif