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

- File List
- Globals

# icuplug.h

Go to the documentation of this file.

    00001 /*
    00002 ******************************************************************************
    00003 *
    00004 *   Copyright (C) 2009-2010, International Business Machines
    00005 *   Corporation and others.  All Rights Reserved.
    00006 *
    00007 ******************************************************************************
    00008 *
    00009 *  FILE NAME : icuplug.h
    00010 *
    00011 *   Date         Name        Description
    00012 *   10/29/2009   sl          New.
    00013 ******************************************************************************
    00014 */
    00015
    00105 #ifndef ICUPLUG_H
    00106 #define ICUPLUG_H
    00107
    00108 #include "unicode/utypes.h"
    00109
    00110
    00111 /* === Basic types === */
    00112
    00120 struct UPlugData;
    00121 typedef struct UPlugData UPlugData;
    00122
    00130 #define UPLUG_TOKEN 0x54762486
    00131
    00136 #define UPLUG_NAME_MAX              100
    00137
    00138
    00145 typedef uint32_t UPlugTokenReturn;
    00146
    00151 typedef enum {
    00152     UPLUG_REASON_QUERY = 0,
    00153     UPLUG_REASON_LOAD = 1,
    00154     UPLUG_REASON_UNLOAD = 2,
    00155     UPLUG_REASON_COUNT
    00156 } UPlugReason;
    00157
    00158
    00166 typedef enum {
    00167     UPLUG_LEVEL_INVALID = 0,
    00168     UPLUG_LEVEL_UNKNOWN = 1,
    00169     UPLUG_LEVEL_LOW     = 2,
    00170     UPLUG_LEVEL_HIGH    = 3,
    00171     UPLUG_LEVEL_COUNT
    00172 } UPlugLevel;
    00173
    00181 typedef UPlugTokenReturn (U_EXPORT2 UPlugEntrypoint) (
    00182                   UPlugData *plug,
    00183                   UPlugReason reason,
    00184                   UErrorCode *status);
    00185
    00186 /* === Needed for Implementing === */
    00187
    00196 U_CAPI void U_EXPORT2
    00197 uplug_setPlugNoUnload(UPlugData *plug, UBool dontUnload);
    00198
    00205 U_CAPI void U_EXPORT2
    00206 uplug_setPlugLevel(UPlugData *plug, UPlugLevel level);
    00207
    00214 U_CAPI UPlugLevel U_EXPORT2
    00215 uplug_getPlugLevel(UPlugData *plug);
    00216
    00224 U_CAPI UPlugLevel U_EXPORT2
    00225 uplug_getCurrentLevel(void);
    00226
    00227
    00233 U_CAPI UErrorCode U_EXPORT2
    00234 uplug_getPlugLoadStatus(UPlugData *plug);
    00235
    00242 U_CAPI void U_EXPORT2
    00243 uplug_setPlugName(UPlugData *plug, const char *name);
    00244
    00251 U_CAPI const char * U_EXPORT2
    00252 uplug_getPlugName(UPlugData *plug);
    00253
    00260 U_CAPI const char * U_EXPORT2
    00261 uplug_getSymbolName(UPlugData *plug);
    00262
    00270 U_CAPI const char * U_EXPORT2
    00271 uplug_getLibraryName(UPlugData *plug, UErrorCode *status);
    00272
    00280 U_CAPI void * U_EXPORT2
    00281 uplug_getLibrary(UPlugData *plug);
    00282
    00289 U_CAPI void * U_EXPORT2
    00290 uplug_getContext(UPlugData *plug);
    00291
    00298 U_CAPI void U_EXPORT2
    00299 uplug_setContext(UPlugData *plug, void *context);
    00300
    00301
    00309 U_CAPI const char * U_EXPORT2
    00310 uplug_getConfiguration(UPlugData *plug);
    00311
    00327 U_CAPI UPlugData* U_EXPORT2
    00328 uplug_nextPlug(UPlugData *prior);
    00329
    00342 U_CAPI UPlugData* U_EXPORT2
    00343 uplug_loadPlugFromEntrypoint(UPlugEntrypoint *entrypoint, const char *config, UErrorCode *status);
    00344
    00345
    00356 U_CAPI UPlugData* U_EXPORT2
    00357 uplug_loadPlugFromLibrary(const char *libName, const char *sym, const char *config, UErrorCode *status);
    00358
    00366 U_CAPI void U_EXPORT2
    00367 uplug_removePlug(UPlugData *plug, UErrorCode *status);
    00368
    00369
    00370 #endif

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines