Home | History | Annotate | Download | only in unicode
      1 /*
      2 ******************************************************************************
      3 *
      4 *   Copyright (C) 2009-2010, International Business Machines
      5 *   Corporation and others.  All Rights Reserved.
      6 *
      7 ******************************************************************************
      8 */
      9 
     10 #ifndef __ICU_DATA_VER_H__
     11 #define __ICU_DATA_VER_H__
     12 
     13 #include "unicode/utypes.h"
     14 
     15 /**
     16  * @internal ICU 4.4
     17  */
     18 #define U_ICU_VERSION_BUNDLE "icuver"
     19 
     20 /**
     21  * @internal ICU 4.4
     22  */
     23 #define U_ICU_STD_BUNDLE "icustd"
     24 
     25 /**
     26  * @internal ICU 4.4
     27  */
     28 #define U_ICU_DATA_KEY "DataVersion"
     29 
     30 /**
     31  * This function loads up icuver and compares the data version to the wired-in U_ICU_DATA_VERSION.
     32  * If icuver shows something less than U_ICU_DATA_VERSION it returns TRUE, else FALSE. The version
     33  * found will be returned in the first fillin parameter (if non-null), and *isModified will be set
     34  * to TRUE if "icustd" is NOT found. Thus, if the data has been repackaged or modified, "icustd"
     35  * (standard ICU) will be missing, and the function will alert the caller that the data is not standard.
     36  *
     37  * @param dataVersionFillin icuver data version information to be filled in if not-null
     38  * @param isModifiedFillin if the data is not standard if not-null
     39  * @param status stores the error code from the calls to resource bundle
     40  *
     41  * @return TRUE if U_ICU_DATA_VERSION is newer than icuver, else FALSE
     42  *
     43  * @internal ICU 4.4
     44  */
     45 U_INTERNAL UBool U_EXPORT2 u_isDataOlder(UVersionInfo dataVersionFillin, UBool *isModifiedFillin, UErrorCode *status);
     46 
     47 /**
     48  * Retrieves the data version from icuver and stores it in dataVersionFillin.
     49  *
     50  * @param dataVersionFillin icuver data version information to be filled in if not-null
     51  * @param status stores the error code from the calls to resource bundle
     52  *
     53  * @internal ICU 4.4
     54  */
     55 U_INTERNAL void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UErrorCode *status);
     56 
     57 #endif
     58