/rusxmms/librcc

To get this branch, use:
bzr branch http://suren.me/webbzr/rusxmms/librcc

« back to all changes in this revision

Viewing changes to src/librcc.h

  • Committer: Suren A. Chilingaryan
  • Date: 2005-07-02 05:08:36 UTC
  • Revision ID: Arch-1:ds@dside.dyndns.org--darksoft-2004%librcc--main--0.1--patch-3
02.07.2005

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef LIBRCC_H
2
 
#define LIBRCC_H
 
1
#ifndef _LIBRCC_H
 
2
#define _LIBRCC_H
3
3
 
4
4
/*******************************************************************************
5
5
***************************** Global Defines ***********************************
44
44
*******************************************************************************/
45
45
typedef unsigned int rcc_init_flags;
46
46
#define RCC_DEFAULT_CONFIGURATION 1
47
 
rcc_context rccInitContext(rcc_init_flags flags, unsigned int max_languages, unsigned int max_classes, const char *locale);
 
47
rcc_context rccCreateContext(rcc_init_flags flags, unsigned int max_languages, unsigned int max_classes, const char *locale);
48
48
void rccFreeContext(rcc_context ctx);
49
49
 
 
50
int rccLockConfiguration(rcc_context ctx, unsigned int lock_code);
 
51
int rccUnlockConfiguration(rcc_context ctx, unsigned int lock_code);
 
52
 
50
53
/*******************************************************************************
51
54
******************* Altering Language Configuaration ***************************
52
55
*******************************************************************************/
73
76
/* Language */
74
77
struct rcc_language_t {
75
78
    const char *sn;
76
 
    const char *name;
77
79
    rcc_charset_list charsets;
78
80
    rcc_engine_list engines;
79
81
};
90
92
typedef rcc_language_alias *rcc_language_alias_ptr;
91
93
typedef rcc_language_alias_ptr rcc_language_alias_list[RCC_MAX_ALIASES+1];
92
94
 
 
95
struct rcc_language_name_t {
 
96
    const char *sn;
 
97
    const char *name;
 
98
};
 
99
typedef struct rcc_language_name_t rcc_language_name;
 
100
 
93
101
rcc_language_id rccRegisterLanguage(rcc_context ctx, rcc_language *language);
94
102
rcc_charset_id rccLanguageRegisterCharset(rcc_language *language, rcc_charset charset);
95
103
rcc_engine_id rccLanguageRegisterEngine(rcc_language *language, rcc_engine *engine);
101
109
typedef enum rcc_class_type_t {
102
110
    RCC_CLASS_INVALID = 0,
103
111
    RCC_CLASS_STANDARD,
 
112
    RCC_CLASS_KNOWN,
104
113
    RCC_CLASS_FS
105
114
} rcc_class_type;
106
115
typedef const struct rcc_class_t rcc_class;
109
118
    const char *name;
110
119
    const char *defvalue; /* locale variable name or parrent name */
111
120
    const rcc_class_type class_type;
 
121
    const char *fullname;
112
122
};
113
123
typedef rcc_class *rcc_class_ptr;
114
124
typedef rcc_class_ptr rcc_class_list[RCC_MAX_CLASSES+1];
124
134
    RCC_LEARNING_MODE = 0,
125
135
    RCC_AUTODETECT_FS_TITLES,
126
136
    RCC_AUTODETECT_FS_NAMES,
127
 
    RCC_USE_HEADERS,
128
137
    RCC_MAX_OPTIONS
129
138
} rcc_option;
130
139
 
 
140
struct rcc_option_name_t {
 
141
    rcc_option option;
 
142
    const char *name;
 
143
};
 
144
typedef struct rcc_option_name_t rcc_option_name;
 
145
 
131
146
/* lng.c */
132
147
const char *rccGetLanguageName(rcc_context ctx, rcc_language_id language_id);
133
148
rcc_language_id rccGetLanguageByName(rcc_context ctx, const char *name);
141
156
int rccSetLanguage(rcc_context ctx, rcc_language_id language_id);
142
157
int rccSetLanguageByName(rcc_context ctx, const char *name);
143
158
 
 
159
/* opt.c */
 
160
rcc_option_value rccGetOption(rcc_context ctx, rcc_option option);
 
161
int rccSetOption(rcc_context ctx, rcc_option option, rcc_option_value value);
 
162
 
144
163
/* lngconfig.c */
145
164
int rccConfigInit(rcc_language_config config, rcc_context ctx);
146
165
int rccConfigFree(rcc_language_config config);
164
183
const char *rccConfigGetSelectedCharsetName(rcc_language_config config, rcc_class_id class_id);
165
184
rcc_charset_id rccConfigGetCurrentCharset(rcc_language_config config, rcc_class_id class_id);
166
185
const char *rccConfigGetCurrentCharsetName(rcc_language_config config, rcc_class_id class_id);
167
 
rcc_option_value rccConfigGetOption(rcc_language_config config, rcc_option option);
168
186
 
169
187
int rccConfigSetEngine(rcc_language_config config, rcc_engine_id engine_id);
170
188
int rccConfigSetCharset(rcc_language_config config, rcc_class_id class_id, rcc_charset_id charset_id);
171
189
int rccConfigSetEngineByName(rcc_language_config config, const char *name);
172
190
int rccConfigSetCharsetByName(rcc_language_config config, rcc_class_id class_id, const char *name);
173
 
int rccConfigSetOption(rcc_language_config config, rcc_option option, rcc_option_value value);
174
191
 
175
192
rcc_charset_id rccConfigGetLocaleCharset(rcc_language_config config, const char *locale_variable);
176
193
 
177
194
/* curconfig.c */
178
 
#define rccGetEngineName(ctx, engine_id) rccConfigGetEngineName(ctx->current_config, engine_id)
179
 
#define rccGetCharsetName(ctx, charset_id) rccConfigGetCharsetName(ctx->current_config, charset_id)
180
 
#define rccGetAutoCharsetName(ctx, charset_id) rccConfigGetAutoCharsetName(ctx->current_config, charset_id)
181
 
#define rccGetEngineByName(ctx, name) rccConfigGetEngineByName(ctx->current_config, name)
182
 
#define rccGetCharsetByName(ctx, name) rccConfigGetCharsetByName(ctx->current_config, name)
183
 
#define rccGetAutoCharsetByName(ctx, name) rccConfigGetAutoCharsetByName(ctx->current_config, name)
184
 
 
185
 
#define rccGetSelectedEngine(ctx) rccConfigGetSelectedEngine(ctx->current_config)
186
 
#define rccGetSelectedEngineName(ctx) rccConfigGetSelectedEngineName(ctx->current_config)
187
 
#define rccGetCurrentEngine(ctx) rccConfigGetCurrentEngine(ctx->current_config)
188
 
#define rccGetCurrentEngineName(ctx) rccConfigGetCurrentEngineName(ctx->current_config)
189
 
#define rccGetSelectedCharset(ctx,class_id) rccConfigGetSelectedCharset(ctx->current_config, class_id)
190
 
#define rccGetSelectedCharsetName(ctx,class_id) rccConfigGetSelectedCharsetName(ctx->current_config, class_id)
191
 
#define rccGetCurrentCharset(ctx,class_id) rccConfigGetCurrentCharset(ctx->current_config, class_id)
192
 
#define rccGetCurrentCharsetName(ctx,class_id) rccConfigGetCurrentCharsetName(ctx->current_config, class_id)
193
 
#define rccGetOption(ctx, option) rccConfigGetOption(ctx->current_config, option)
194
 
 
195
 
#define rccSetEngine(ctx, engine_id) rccConfigSetEngine(ctx->current_config, engine_id)
196
 
#define rccSetCharset(ctx, class_id, charset_id) rccConfigSetCharset(ctx->current_config, class_id, charset_id)
197
 
#define rccSetOption(ctx,option,value) rccConfigSetOption(ctx->current_config, option, value)
198
 
#define rccSetEngineByName(ctx, name) rccConfigSetEngineByName(ctx->current_config, name)
199
 
#define rccSetCharsetByName(ctx, class_id, name) rccConfigSetCharsetByName(ctx->current_config, class_id, name)
200
 
 
201
 
#define rccGetLocaleCharset(ctx, locale_variable) rccConfigGetLocaleCharset(ctx->current_config, locale_variable)
 
195
const char *rccGetEngineName(rcc_context ctx, rcc_engine_id engine_id);
 
196
const char *rccGetCharsetName(rcc_context ctx, rcc_charset_id charset_id);
 
197
const char *rccGetAutoCharsetName(rcc_context ctx, rcc_charset_id charset_id);
 
198
 
 
199
rcc_engine_id rccGetEngineByName(rcc_context ctx, const char *name);
 
200
rcc_charset_id rccGetCharsetByName(rcc_context ctx, const char *name);
 
201
rcc_charset_id rccGetAutoCharsetByName(rcc_context ctx, const char *name);
 
202
 
 
203
rcc_engine_id rccGetSelectedEngine(rcc_context ctx);
 
204
const char *rccGetSelectedEngineName(rcc_context ctx);
 
205
rcc_engine_id rccGetCurrentEngine(rcc_context ctx);
 
206
const char *rccGetCurrentEngineName(rcc_context ctx);
 
207
rcc_charset_id rccGetSelectedCharset(rcc_context ctx, rcc_class_id class_id);
 
208
const char *rccGetSelectedCharsetName(rcc_context ctx, rcc_class_id class_id);
 
209
rcc_charset_id rccGetCurrentCharset(rcc_context ctx, rcc_class_id class_id);
 
210
const char *rccGetCurrentCharsetName(rcc_context ctx, rcc_class_id class_id);
 
211
 
 
212
int rccSetEngine(rcc_context ctx, rcc_engine_id engine_id);
 
213
int rccSetCharset(rcc_context ctx, rcc_class_id class_id, rcc_charset_id charset_id);
 
214
int rccSetEngineByName(rcc_context ctx, const char *name);
 
215
int rccSetCharsetByName(rcc_context ctx, rcc_class_id class_id, const char *name);
 
216
 
 
217
rcc_charset_id rccGetLocaleCharset(rcc_context ctx, const char *locale_variable);
 
218
 
 
219
/*******************************************************************************
 
220
************************ Language Configuaration *******************************
 
221
*******************************************************************************/
 
222
/* rcclist.c */
 
223
rcc_language_ptr *rccGetLanguageList(rcc_context ctx);
 
224
rcc_charset *rccGetCharsetList(rcc_context ctx, rcc_language_id language_id);
 
225
rcc_engine_ptr *rccGetEngineList(rcc_context ctx, rcc_language_id language_id);
 
226
rcc_charset *rccGetCurrentCharsetList(rcc_context ctx);
 
227
rcc_engine_ptr *rccGetCurrentEngineList(rcc_context ctx);
 
228
rcc_charset *rccGetCurrentAutoCharsetList(rcc_context ctx);
 
229
rcc_class_ptr *rccGetClassList(rcc_context ctx);
 
230
 
202
231
 
203
232
/*******************************************************************************
204
233
************************ RCC_STRING Manipulations ******************************
238
267
}
239
268
#endif
240
269
 
241
 
#endif /* LIBRCC_H */
 
270
#endif /* _LIBRCC_H */