Xalan-C++ API Reference  1.12.0
XalanTransformerDefinitions.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #if !defined(XALAN_TRANSFORMER_DEFINITIONS_HEADER_GUARD_1357924680)
19 #define XALAN_TRANSFORMER_DEFINITIONS_HEADER_GUARD_1357924680
20 
21 
22 
24 
25 
26 
27 #include <stddef.h>
28 
29 
30 
31 #if defined(XALAN_BUILD_DLL)
32 
33 #define XALAN_TRANSFORMER_EXPORT XALAN_PLATFORM_EXPORT
34 
35 #define XALAN_TRANSFORMER_EXPORT_FUNCTION(T) XALAN_PLATFORM_EXPORT_FUNCTION(T)
36 
37 #else
38 
39 #define XALAN_TRANSFORMER_EXPORT XALAN_PLATFORM_IMPORT
40 
41 #define XALAN_TRANSFORMER_EXPORT_FUNCTION(T) XALAN_PLATFORM_IMPORT_FUNCTION(T)
42 
43 #endif
44 
45 #if defined(__cplusplus)
46 extern "C"
47 {
48 #endif
49 
50  typedef size_t CallbackSizeType;
51 
52 /**
53  * Callback function passed to the XalanTransformer APIs.
54  * Used to process transformation output in blocks of data.
55  * Caller is responsible for streaming or copying data to a user
56  * allocated buffer. Caller should not attempt to write to or
57  * free this data.
58  *
59  * The callback should return the number of bytes written, and
60  * this number should match the length received. Otherwise the
61  * XalanTransformToHandler function terminates and returns an error status.
62  *
63  * static unsigned long xalanOutputHandler(const void* data, unsigned long length, const void *handle);
64  *
65  * @param data a block of data
66  * @param length length of block
67  * @param handle handle of XalanTransformer instance.
68  * @return number of bytes written
69  */
70 typedef CallbackSizeType (*XalanOutputHandlerType) (const char*, CallbackSizeType, void*);
71 
72 /**
73  * Callback function passed to the XalanTransformer APIs.
74  * Used to flush the buffer once transform is completed.
75  *
76  * static void xalanFlushHandler(const void *handle);
77  *
78  * @param handle handle of XalanTransformer instance.
79  */
80 typedef void (*XalanFlushHandlerType) (void*);
81 
82 #if defined(__cplusplus)
83 }
84 #endif
85 
86 
87 
88 #endif // XALAN_TRANSFORMER_DEFINITIONS_HEADER_GUARD_1357924680
CallbackSizeType
size_t CallbackSizeType
Definition: XalanTransformerDefinitions.hpp:50
XalanOutputHandlerType
CallbackSizeType(* XalanOutputHandlerType)(const char *, CallbackSizeType, void *)
Callback function passed to the XalanTransformer APIs.
Definition: XalanTransformerDefinitions.hpp:70
PlatformDefinitions.hpp
XalanFlushHandlerType
void(* XalanFlushHandlerType)(void *)
Callback function passed to the XalanTransformer APIs.
Definition: XalanTransformerDefinitions.hpp:80