Main Page   Class Hierarchy   Compound List   File List   Header Files   Sources   Compound Members   File Members  

ures.h

00001 /*
00002 **********************************************************************
00003 *   Copyright (C) 1997-1999, International Business Machines
00004 *   Corporation and others.  All Rights Reserved.
00005 **********************************************************************
00006 *
00007 * File URES.H (formerly CRESBUND.H)
00008 *
00009 * Modification History:
00010 *
00011 *   Date        Name        Description
00012 *   04/01/97    aliu        Creation.
00013 *   02/22/99    damiba      overhaul.
00014 *   04/04/99    helena      Fixed internal header inclusion.
00015 *   04/15/99    Madhu       Updated Javadoc  
00016 *   06/14/99    stephen     Removed functions taking a filename suffix.
00017 *   07/20/99    stephen     Language-independent ypedef to void*
00018 *   11/09/99    weiv            Added ures_getLocale()
00019 *******************************************************************************
00020 */
00021 
00022 #ifndef URES_H
00023 #define URES_H
00024 
00025 #include "unicode/utypes.h"
00026 #include "unicode/uloc.h"
00027 
00148 struct UResourceBundle;
00149 
00150 typedef struct UResourceBundle UResourceBundle;
00151 
00152 typedef enum {
00153     RES_NONE=-1,
00154     RES_STRING=0,
00155     RES_BINARY=1,
00156     RES_TABLE=2,
00157 
00158     RES_INT=7,
00159     RES_ARRAY=8,
00160 
00161     RES_INT_VECTOR=14,
00162     RES_RESERVED=15
00163 } UResType;
00164 
00195 U_CAPI UResourceBundle*  U_EXPORT2 ures_open(const char*    path,   /* NULL if none */
00196                                            const char*  locale, /* NULL if none */
00197                                            UErrorCode*     status);
00198 
00199 
00219 U_CAPI UResourceBundle* U_EXPORT2 ures_openW(const wchar_t* path, 
00220                   const char* locale, 
00221                   UErrorCode* status);
00222 
00223 U_CAPI UResourceBundle* U_EXPORT2 ures_openU(const UChar* path, 
00224                   const char* locale, 
00225                   UErrorCode* status);
00226 
00243 U_CAPI const UChar* U_EXPORT2 ures_get(const UResourceBundle*    resourceBundle,
00244                const char*              resourceTag,
00245                UErrorCode*               status);
00246 
00247 
00266 U_CAPI const UChar* U_EXPORT2 ures_getArrayItem(const UResourceBundle*     resourceBundle,
00267                     const char*               resourceTag,
00268                     int32_t                   resourceIndex,
00269                     UErrorCode*                status);
00270 
00271 
00292 U_CAPI const UChar* U_EXPORT2 ures_get2dArrayItem(const UResourceBundle*   resourceBundle,
00293                       const char*             resourceTag,
00294                       int32_t                 rowIndex,
00295                       int32_t                 columnIndex,
00296                       UErrorCode*              status);
00297 
00317 U_CAPI const UChar* U_EXPORT2 ures_getTaggedArrayItem(const UResourceBundle*   resourceBundle,
00318                       const char*             resourceTag,
00319                       const char*             itemTag,
00320                       UErrorCode*              status);
00321 
00322 
00343 U_CAPI int32_t U_EXPORT2 ures_countArrayItems(const UResourceBundle* resourceBundle,
00344                   const char* resourceKey,
00345                   UErrorCode* err);
00359 U_CAPI void U_EXPORT2 ures_close(UResourceBundle*    resourceBundle);
00360 
00380 U_CAPI const char* U_EXPORT2 ures_getVersionNumber(const UResourceBundle*   resourceBundle);
00381 
00382 U_CAPI void U_EXPORT2 ures_getVersion(const UResourceBundle* resB, UVersionInfo versionInfo);
00383 
00391 U_CAPI const char* ures_getLocale(const UResourceBundle* resourceBundle, UErrorCode* status);
00392 
00393 
00395 U_CAPI void ures_openFillIn(UResourceBundle *r, const char* path,
00396                     const char* localeID, UErrorCode* status);
00397 
00410 U_CAPI const UChar* U_EXPORT2 ures_getString(const UResourceBundle* resourceBundle, int32_t* len, 
00411                UErrorCode*               status);
00412 
00426 U_CAPI const uint8_t* U_EXPORT2 ures_getBinary(const UResourceBundle* resourceBundle, int32_t* len, 
00427                UErrorCode*               status);
00428 
00440 U_CAPI uint32_t U_EXPORT2 ures_getInt(const UResourceBundle* resourceBundle, UErrorCode *status);
00441 
00450 U_CAPI int32_t U_EXPORT2 ures_getSize(UResourceBundle *resourceBundle);
00451 
00459 U_CAPI UResType U_EXPORT2 ures_getType(UResourceBundle *resourceBundle);
00460 
00469 U_CAPI const char * U_EXPORT2 ures_getKey(UResourceBundle *resB);
00470 
00471 /* ITERATION API 
00472     This API provides means for iterating through a resource
00473 */
00474 
00481 U_CAPI void U_EXPORT2 ures_resetIterator(UResourceBundle *resourceBundle);
00482 
00490 U_CAPI UBool U_EXPORT2 ures_hasNext(UResourceBundle *resourceBundle);
00491 
00503 U_CAPI UResourceBundle* U_EXPORT2 ures_getNextResource(UResourceBundle *resourceBundle, UResourceBundle *fillIn, UErrorCode *status);
00504 
00516 U_CAPI const UChar* U_EXPORT2 ures_getNextString(UResourceBundle *resourceBundle, int32_t* len, const char ** key, UErrorCode *status);
00517 
00529 U_CAPI UResourceBundle* U_EXPORT2 ures_getByIndex(const UResourceBundle *resourceBundle, int32_t indexR, UResourceBundle *fillIn, UErrorCode *status);
00530 
00541 U_CAPI const UChar* U_EXPORT2 ures_getStringByIndex(const UResourceBundle *resB, int32_t indexS, int32_t* len, UErrorCode *status);
00542 
00555 U_CAPI UResourceBundle* U_EXPORT2 ures_getByKey(const UResourceBundle *resourceBundle, const char* key, UResourceBundle *fillIn, UErrorCode *status);
00556 
00568 U_CAPI const UChar* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB, const char* key, int32_t* len, UErrorCode *status);
00569 
00570 U_CFUNC const char* ures_getName(const UResourceBundle* resB);
00571 U_CFUNC const char* ures_getPath(const UResourceBundle* resB);
00572 U_CFUNC const char* ures_getTag(const UResourceBundle* resB);
00573 
00574 #endif /*_URES*/
00575 /*eof*/

Generated at Wed Aug 16 16:05:39 2000 for ICU1.6 by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999