2
*******************************************************************************
4
* Copyright (C) 2000, International Business Machines
5
* Corporation and others. All Rights Reserved.
7
*******************************************************************************
11
* Modification History:
13
* Date Name Description
14
* 02/21/00 weiv Creation.
15
*******************************************************************************
21
#define KEY_SPACE_SIZE 65532
22
#define RESLIST_MAX_INT_VECTOR 2048
24
#include "unicode/utypes.h"
25
#include "unicode/ures.h"
26
#include "unicode/ustring.h"
34
/* Resource bundle root table */
40
struct SResource *fRoot;
43
struct SRBRoot *bundle_open(UErrorCode *status);
44
void bundle_write(struct SRBRoot *bundle, const char *outputDir, char *writtenFilename, int writtenFilenameLen, UErrorCode *status);
46
/* write a java resource file */
47
void bundle_write_java(struct SRBRoot *bundle, const char *outputDir, const char* outputEnc, char *writtenFilename, int writtenFilenameLen, UErrorCode *status);
49
void bundle_close(struct SRBRoot *bundle, UErrorCode *status);
50
void bundle_setlocale(struct SRBRoot *bundle, UChar *locale, UErrorCode *status);
51
uint16_t bundle_addtag(struct SRBRoot *bundle, const char *tag, UErrorCode *status);
53
/* Various resource types */
57
uint32_t fChildrenSize;
58
struct SResource *fFirst;
59
struct SRBRoot *fRoot;
62
struct SResource* table_open(struct SRBRoot *bundle, char *tag, UErrorCode *status);
63
void table_close(struct SResource *table, UErrorCode *status);
64
void table_add(struct SResource *table, struct SResource *res, int linenumber, UErrorCode *status);
68
uint32_t fChildrenSize;
69
struct SResource *fFirst;
70
struct SResource *fLast;
73
struct SResource* array_open(struct SRBRoot *bundle, char *tag, UErrorCode *status);
74
void array_close(struct SResource *array, UErrorCode *status);
75
void array_add(struct SResource *array, struct SResource *res, UErrorCode *status);
82
struct SResource *string_open(struct SRBRoot *bundle, char *tag, UChar *value, int32_t len, UErrorCode *status);
83
void string_close(struct SResource *string, UErrorCode *status);
85
struct SResIntVector {
90
struct SResource* intvector_open(struct SRBRoot *bundle, char *tag, UErrorCode *status);
91
void intvector_close(struct SResource *intvector, UErrorCode *status);
92
void intvector_add(struct SResource *intvector, int32_t value, UErrorCode *status);
98
struct SResource *int_open(struct SRBRoot *bundle, char *tag, int32_t value, UErrorCode *status);
99
void int_close(struct SResource *intres, UErrorCode *status);
106
struct SResource *bin_open(struct SRBRoot *bundle, const char *tag, uint32_t length, uint8_t *data, UErrorCode *status);
107
void bin_close(struct SResource *binres, UErrorCode *status);
109
/* Resource place holder */
114
uint32_t fSize; /* Size in bytes outside the header part */
115
int line; /* used internally to report duplicate keys in tables */
116
struct SResource *fNext; /*This is for internal chaining while building*/
118
struct SResTable fTable;
119
struct SResArray fArray;
120
struct SResString fString;
121
struct SResIntVector fIntVector;
122
struct SResInt fIntValue;
123
struct SResBinary fBinaryValue;
127
void res_close(struct SResource *res, UErrorCode *status);
128
void setIncludeCopyright(UBool val);
129
UBool getIncludeCopyright(void);
132
#endif /* #ifndef RESLIST_H */