1 /* Copyright (c) 2000 IBM, Inc. and Others.
2    FLAGCB.H - interface to 'flagging' callback which
3    simply marks the fact that the callback was called.
4 */
5 
6 #ifndef _FLAGCB
7 #define _FLAGCB
8 
9 #include "unicode/utypes.h"
10 #include "unicode/ucnv.h"
11 
12 /* The structure of a FromU Flag context.
13    (conceivably there could be a ToU Flag Context) */
14 
15 typedef struct
16 {
17   UConverterFromUCallback  subCallback;
18   const void               *subContext;
19   UBool                    flag;
20 } FromUFLAGContext;
21 
22 /**
23  * open the context
24  */
25 
26 U_CAPI FromUFLAGContext* U_EXPORT2  flagCB_fromU_openContext();
27 
28 /**
29  * the actual callback
30  */
31 U_CAPI void U_EXPORT2 flagCB_fromU(
32                   const void *context,
33                   UConverterFromUnicodeArgs *fromUArgs,
34                   const UChar* codeUnits,
35                   int32_t length,
36                   UChar32 codePoint,
37                   UConverterCallbackReason reason,
38 				  UErrorCode * err);
39 
40 
41 
42 typedef struct
43 {
44     UConverterFromUCallback  subCallback;
45     const void               *subContext;
46     uint32_t       magic;      /* 0xC0FFEE to identify that the object is OK */
47     uint32_t       serial;     /* minted from nextSerial */
48 } debugCBContext;
49 
50 U_CAPI void debugCB_fromU(const void *context,
51                    UConverterFromUnicodeArgs *fromUArgs,
52                    const UChar* codeUnits,
53                    int32_t length,
54                    UChar32 codePoint,
55                    UConverterCallbackReason reason,
56                    UErrorCode * err);
57 
58 U_CAPI debugCBContext *debugCB_openContext();
59 
60 #endif
61