1 |
/* ------------------------------------------------------------------------- */ |
2 |
/* */ |
3 |
/* Copyright (c) 2003 The Open Group */ |
4 |
/* */ |
5 |
/* Permission is hereby granted, free of charge, to any person obtaining a */ |
6 |
/* copy of this software (the "Software"), to deal in the Software without */ |
7 |
/* restriction, including without limitation the rights to use, copy, */ |
8 |
/* modify, merge, publish, distribute, sublicense, and/or sell copies of */ |
9 |
/* the Software, and to permit persons to whom the Software is furnished */ |
10 |
/* to do so, subject to the following conditions: */ |
11 |
/* */ |
12 |
/* The above copyright notice and this permission notice shall be included */ |
13 |
/* in all copies or substantial portions of the Software. */ |
14 |
/* */ |
15 |
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS */ |
16 |
/* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ |
17 |
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ |
18 |
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ |
19 |
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT */ |
20 |
/* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR */ |
21 |
/* THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ |
22 |
/* */ |
23 |
/* ------------------------------------------------------------------------- */ |
24 |
/* */ |
25 |
/* File revision information */ |
26 |
/* */ |
27 |
/* $Source: /tang_cvs/arm4/sdk4/c/include/arm4dyn.h,v $ */ |
28 |
/* $Revision: 1.2 $ */ |
29 |
/* $Date: 2003/12/03 13:55:14 $ */ |
30 |
/* */ |
31 |
/* ------------------------------------------------------------------------- */ |
32 |
|
33 |
#ifndef ARM4DYN_H_INCLUDED |
34 |
#define ARM4DYN_H_INCLUDED |
35 |
|
36 |
#ifndef ARM4_H_INCLUDED |
37 |
#error "don't include arm4dyn.h directly, use arm4.h instead!" |
38 |
#endif |
39 |
|
40 |
#ifdef __cplusplus |
41 |
extern "C" { |
42 |
#endif /* __cplusplus */ |
43 |
|
44 |
/* API function pointer types for registering metadata */ |
45 |
typedef arm_error_t |
46 |
(ARM4_API_CALL* arm_register_application_t)( |
47 |
const arm_char_t *app_name, |
48 |
const arm_id_t *input_app_id, |
49 |
const arm_int32_t flags, |
50 |
const arm_buffer4_t *buffer4, |
51 |
arm_id_t *output_app_id); |
52 |
|
53 |
typedef arm_error_t |
54 |
(ARM4_API_CALL* arm_destroy_application_t)( |
55 |
const arm_id_t *app_id, |
56 |
const arm_int32_t flags, |
57 |
const arm_buffer4_t *buffer4); |
58 |
|
59 |
typedef arm_error_t |
60 |
(ARM4_API_CALL* arm_register_transaction_t)( |
61 |
const arm_id_t *app_id, |
62 |
const arm_char_t *tran_name, |
63 |
const arm_id_t *input_tran_id, |
64 |
const arm_int32_t flags, |
65 |
const arm_buffer4_t *buffer4, |
66 |
arm_id_t *output_tran_id); |
67 |
|
68 |
typedef arm_error_t |
69 |
(ARM4_API_CALL* arm_register_metric_t)( |
70 |
const arm_id_t *app_id, |
71 |
const arm_char_t *metric_name, |
72 |
const arm_metric_format_t metric_format, |
73 |
const arm_metric_usage_t metric_usage, |
74 |
const arm_char_t *metric_unit, |
75 |
const arm_id_t *input_metric_id, |
76 |
const arm_int32_t flags, |
77 |
const arm_buffer4_t *buffer4, |
78 |
arm_id_t *output_metric_id); |
79 |
|
80 |
/* API function pointer types for application instances */ |
81 |
typedef arm_error_t |
82 |
(ARM4_API_CALL* arm_start_application_t)( |
83 |
const arm_id_t *app_id, |
84 |
const arm_char_t *app_group, |
85 |
const arm_char_t *app_instance, |
86 |
const arm_int32_t flags, |
87 |
const arm_buffer4_t *buffer4, |
88 |
arm_app_start_handle_t *app_handle); |
89 |
|
90 |
typedef arm_error_t |
91 |
(ARM4_API_CALL* arm_stop_application_t)( |
92 |
const arm_app_start_handle_t app_handle, |
93 |
const arm_int32_t flags, |
94 |
const arm_buffer4_t *buffer4); |
95 |
|
96 |
/* API function pointer types for transaction instances */ |
97 |
typedef arm_error_t |
98 |
(ARM4_API_CALL* arm_start_transaction_t)( |
99 |
const arm_app_start_handle_t app_handle, |
100 |
const arm_id_t *tran_id, |
101 |
const arm_correlator_t *parent_correlator, |
102 |
const arm_int32_t flags, |
103 |
const arm_buffer4_t *buffer4, |
104 |
arm_tran_start_handle_t *tran_handle, |
105 |
arm_correlator_t *current_correlator); |
106 |
|
107 |
typedef arm_error_t |
108 |
(ARM4_API_CALL* arm_stop_transaction_t)( |
109 |
const arm_tran_start_handle_t tran_handle, |
110 |
const arm_tran_status_t tran_status, |
111 |
const arm_int32_t flags, |
112 |
const arm_buffer4_t *buffer4); |
113 |
|
114 |
typedef arm_error_t |
115 |
(ARM4_API_CALL* arm_update_transaction_t)( |
116 |
const arm_tran_start_handle_t tran_handle, |
117 |
const arm_int32_t flags, |
118 |
const arm_buffer4_t *buffer4); |
119 |
|
120 |
typedef arm_error_t |
121 |
(ARM4_API_CALL* arm_discard_transaction_t)( |
122 |
const arm_tran_start_handle_t tran_handle, |
123 |
const arm_int32_t flags, |
124 |
const arm_buffer4_t *buffer4); |
125 |
|
126 |
typedef arm_error_t |
127 |
(ARM4_API_CALL* arm_block_transaction_t)( |
128 |
const arm_tran_start_handle_t tran_handle, |
129 |
const arm_int32_t flags, |
130 |
const arm_buffer4_t *buffer4, |
131 |
arm_tran_block_handle_t *block_handle); |
132 |
|
133 |
typedef arm_error_t |
134 |
(ARM4_API_CALL* arm_unblock_transaction_t)( |
135 |
const arm_tran_start_handle_t tran_handle, |
136 |
const arm_tran_block_handle_t block_handle, |
137 |
const arm_int32_t flags, |
138 |
const arm_buffer4_t *buffer4); |
139 |
|
140 |
/* API function pointer types for thread support */ |
141 |
typedef arm_error_t |
142 |
(ARM4_API_CALL* arm_bind_thread_t)( |
143 |
const arm_tran_start_handle_t tran_handle, |
144 |
const arm_int32_t flags, |
145 |
const arm_buffer4_t *buffer4); |
146 |
|
147 |
typedef arm_error_t |
148 |
(ARM4_API_CALL* arm_unbind_thread_t)( |
149 |
const arm_tran_start_handle_t tran_handle, |
150 |
const arm_int32_t flags, |
151 |
const arm_buffer4_t *buffer4); |
152 |
|
153 |
/* API function pointer types for reporting transaction data */ |
154 |
typedef arm_error_t |
155 |
(ARM4_API_CALL* arm_report_transaction_t)( |
156 |
const arm_app_start_handle_t app_handle, |
157 |
const arm_id_t *tran_id, |
158 |
const arm_tran_status_t tran_status, |
159 |
const arm_response_time_t response_time, |
160 |
const arm_stop_time_t stop_time, |
161 |
const arm_correlator_t *parent_correlator, |
162 |
const arm_correlator_t *current_correlator, |
163 |
const arm_int32_t flags, |
164 |
const arm_buffer4_t *buffer4); |
165 |
|
166 |
/* API function pointer types for correlators */ |
167 |
typedef arm_error_t |
168 |
(ARM4_API_CALL* arm_generate_correlator_t)( |
169 |
const arm_app_start_handle_t app_handle, |
170 |
const arm_id_t *tran_id, |
171 |
const arm_correlator_t *parent_correlator, |
172 |
const arm_int32_t flags, |
173 |
const arm_buffer4_t *buffer4, |
174 |
arm_correlator_t *current_correlator); |
175 |
|
176 |
typedef arm_error_t |
177 |
(ARM4_API_CALL* arm_get_correlator_length_t)( |
178 |
const arm_correlator_t *correlator, |
179 |
arm_correlator_length_t *length); |
180 |
|
181 |
typedef arm_error_t |
182 |
(ARM4_API_CALL* arm_get_correlator_flags_t)( |
183 |
const arm_correlator_t *correlator, |
184 |
const arm_int32_t corr_flag_num, |
185 |
arm_boolean_t *flag); |
186 |
|
187 |
/* miscellaneous API function pointer types */ |
188 |
typedef arm_error_t |
189 |
(ARM4_API_CALL* arm_get_arrival_time_t)( |
190 |
arm_arrival_time_t *opaque_time); |
191 |
|
192 |
typedef arm_error_t |
193 |
(ARM4_API_CALL* arm_get_error_message_t)( |
194 |
const arm_charset_t charset, |
195 |
const arm_error_t code, |
196 |
arm_message_buffer_t msg); |
197 |
|
198 |
typedef arm_error_t |
199 |
(ARM4_API_CALL* arm_is_charset_supported_t)( |
200 |
const arm_charset_t charset, |
201 |
arm_boolean_t *supported); |
202 |
|
203 |
|
204 |
#ifdef __cplusplus |
205 |
} |
206 |
#endif /* __cplusplus */ |
207 |
|
208 |
#endif |