]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/ucln.h
ICU-461.18.tar.gz
[apple/icu.git] / icuSources / common / ucln.h
index cb3150dc6510f3710e836fe3cd56b2b4d9b2924f..3f9847f44484477373f301666e42b366de25c527 100644 (file)
@@ -1,7 +1,7 @@
 /*
 ******************************************************************************
 *                                                                            *
-* Copyright (C) 2001-2003, International Business Machines                   *
+* Copyright (C) 2001-2010, International Business Machines                   *
 *                Corporation and others. All Rights Reserved.                *
 *                                                                            *
 ******************************************************************************
  * 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_LAYOUT,
+    UCLN_CTESTFW,
+    UCLN_TOOLUTIL,
     UCLN_LAYOUTEX,
-    UCLN_USTDIO,
+    UCLN_LAYOUT,
+    UCLN_IO,
     UCLN_I18N,
     UCLN_COMMON /* This must be the last one to cleanup. */
 } ECleanupLibraryType;
 
-typedef UBool cleanupFunc(void);
+/**
+ * Data type for cleanup function pointer
+ */
+U_CDECL_BEGIN
+typedef UBool U_CALLCONV cleanupFunc(void);
+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.
+ * Calling this with UCLN_COMMON just calls u_cleanup();
+ * @param type which library to cleanup
+ */
+U_CAPI void U_EXPORT2 ucln_cleanupOne(ECleanupLibraryType type);
+
 #endif