ICU 54.1 54.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
icuplug.h
Go to the documentation of this file.
1 /*
2 ******************************************************************************
3 *
4 * Copyright (C) 2009-2012, International Business Machines
5 * Corporation and others. All Rights Reserved.
6 *
7 ******************************************************************************
8 *
9 * FILE NAME : icuplug.h
10 *
11 * Date Name Description
12 * 10/29/2009 sl New.
13 ******************************************************************************
14 */
15
105 #ifndef ICUPLUG_H
106 #define ICUPLUG_H
107
108 #include "unicode/utypes.h"
109
110
111 /* === Basic types === */
112
113 #ifndef U_HIDE_INTERNAL_API
114
121 struct UPlugData;
122 typedef struct UPlugData UPlugData;
123
131 #define UPLUG_TOKEN 0x54762486
132
137 #define UPLUG_NAME_MAX 100
138
139
146 typedef uint32_t UPlugTokenReturn;
147
152 typedef enum {
153 UPLUG_REASON_QUERY = 0,
154 UPLUG_REASON_LOAD = 1,
155 UPLUG_REASON_UNLOAD = 2,
156 UPLUG_REASON_COUNT
157 } UPlugReason;
158
159
167 typedef enum {
168 UPLUG_LEVEL_INVALID = 0,
169 UPLUG_LEVEL_UNKNOWN = 1,
170 UPLUG_LEVEL_LOW = 2,
171 UPLUG_LEVEL_HIGH = 3,
172 UPLUG_LEVEL_COUNT
173 } UPlugLevel;
174
182 typedef UPlugTokenReturn (U_EXPORT2 UPlugEntrypoint) (
183 UPlugData *plug,
184 UPlugReason reason,
185 UErrorCode *status);
186
187 /* === Needed for Implementing === */
188
197 U_INTERNAL void U_EXPORT2
198 uplug_setPlugNoUnload(UPlugData *plug, UBool dontUnload);
199
206 U_INTERNAL void U_EXPORT2
207 uplug_setPlugLevel(UPlugData *plug, UPlugLevel level);
208
215 U_INTERNAL UPlugLevel U_EXPORT2
216 uplug_getPlugLevel(UPlugData *plug);
217
225 U_INTERNAL UPlugLevel U_EXPORT2
226 uplug_getCurrentLevel(void);
227
228
234 U_INTERNAL UErrorCode U_EXPORT2
235 uplug_getPlugLoadStatus(UPlugData *plug);
236
243 U_INTERNAL void U_EXPORT2
244 uplug_setPlugName(UPlugData *plug, const char *name);
245
252 U_INTERNAL const char * U_EXPORT2
253 uplug_getPlugName(UPlugData *plug);
254
261 U_INTERNAL const char * U_EXPORT2
262 uplug_getSymbolName(UPlugData *plug);
263
271 U_INTERNAL const char * U_EXPORT2
272 uplug_getLibraryName(UPlugData *plug, UErrorCode *status);
273
281 U_INTERNAL void * U_EXPORT2
282 uplug_getLibrary(UPlugData *plug);
283
290 U_INTERNAL void * U_EXPORT2
291 uplug_getContext(UPlugData *plug);
292
299 U_INTERNAL void U_EXPORT2
300 uplug_setContext(UPlugData *plug, void *context);
301
302
310 U_INTERNAL const char * U_EXPORT2
311 uplug_getConfiguration(UPlugData *plug);
312
328 U_INTERNAL UPlugData* U_EXPORT2
329 uplug_nextPlug(UPlugData *prior);
330
343 U_INTERNAL UPlugData* U_EXPORT2
344 uplug_loadPlugFromEntrypoint(UPlugEntrypoint *entrypoint, const char *config, UErrorCode *status);
345
346
357 U_INTERNAL UPlugData* U_EXPORT2
358 uplug_loadPlugFromLibrary(const char *libName, const char *sym, const char *config, UErrorCode *status);
359
367 U_INTERNAL void U_EXPORT2
368 uplug_removePlug(UPlugData *plug, UErrorCode *status);
369 #endif /* U_HIDE_INTERNAL_API */
370
371 #endif