00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AXIS2_OP_CLIENT_H
00018 #define AXIS2_OP_CLIENT_H
00019
00049 #include <axis2_defines.h>
00050 #include <axis2_env.h>
00051 #include <axis2_options.h>
00052 #include <axis2_msg_ctx.h>
00053 #include <axis2_callback.h>
00054
00055 #ifdef __cplusplus
00056 extern "C"
00057 {
00058 #endif
00059
00061 typedef struct axis2_op_client_ops axis2_op_client_ops_t;
00063 typedef struct axis2_op_client axis2_op_client_t;
00064
00065 struct axis2_callback_recv;
00066
00071 struct axis2_op_client_ops
00072 {
00073
00081 axis2_status_t (AXIS2_CALL *
00082 set_options)(
00083 axis2_op_client_t *op_client,
00084 const axis2_env_t *env,
00085 const axis2_options_t *options);
00086
00094 const axis2_options_t* (AXIS2_CALL *
00095 get_options)(
00096 const axis2_op_client_t *op_client,
00097 const axis2_env_t *env);
00098
00107 axis2_status_t (AXIS2_CALL *
00108 add_msg_ctx)(
00109 axis2_op_client_t *op_client,
00110 const axis2_env_t *env,
00111 axis2_msg_ctx_t *msg_ctx);
00112
00121 const axis2_msg_ctx_t* (AXIS2_CALL *
00122 get_msg_ctx)(
00123 const axis2_op_client_t *op_client,
00124 const axis2_env_t *env,
00125 const axis2_char_t *message_label);
00126
00135 axis2_status_t (AXIS2_CALL *
00136 set_callback)(
00137 axis2_op_client_t *op_client,
00138 const axis2_env_t *env,
00139 axis2_callback_t *callback);
00140
00152 axis2_status_t (AXIS2_CALL *
00153 execute)(
00154 axis2_op_client_t *op_client,
00155 const axis2_env_t *env,
00156 const axis2_bool_t block);
00157
00166 axis2_status_t (AXIS2_CALL *
00167 reset)(
00168 axis2_op_client_t *op_client,
00169 const axis2_env_t *env);
00170
00180 axis2_status_t (AXIS2_CALL *
00181 complete)(
00182 axis2_op_client_t *op_client,
00183 const axis2_env_t *env,
00184 axis2_msg_ctx_t *msg_ctx);
00185
00192 axis2_op_ctx_t* (AXIS2_CALL *
00193 get_operation_context)(
00194 const axis2_op_client_t *op_client,
00195 const axis2_env_t *env);
00196
00205 axis2_status_t (AXIS2_CALL *
00206 set_callback_recv)(
00207 axis2_op_client_t *op_client,
00208 const axis2_env_t *env,
00209 struct axis2_callback_recv *callback_recv);
00210
00217 axis2_status_t (AXIS2_CALL *
00218 free)(
00219 axis2_op_client_t *op_client,
00220 const axis2_env_t *env);
00221 };
00222
00226 struct axis2_op_client
00227 {
00229 axis2_op_client_ops_t *ops;
00230 };
00231
00247 AXIS2_EXTERN axis2_op_client_t* AXIS2_CALL axis2_op_client_create(
00248 const axis2_env_t *env,
00249 axis2_op_t *op,
00250 axis2_svc_ctx_t *svc_ctx,
00251 axis2_options_t *options);
00252
00253
00256 #define AXIS2_OP_CLIENT_SET_OPTIONS(op_client, env, options) \
00257 ((op_client)->ops->set_options(op_client, env, options))
00258
00261 #define AXIS2_OP_CLIENT_GET_OPTIONS(op_client, env) \
00262 ((op_client)->ops->get_options(op_client, env))
00263
00266 #define AXIS2_OP_CLIENT_ADD_MSG_CTX(op_client, env, msg_ctx) \
00267 ((op_client)->ops->add_msg_ctx(op_client, env, msg_ctx))
00268
00271 #define AXIS2_OP_CLIENT_GET_MSG_CTX(op_client, env, message_label) \
00272 ((op_client)->ops->get_msg_ctx(op_client, env, message_label))
00273
00276 #define AXIS2_OP_CLIENT_SET_CALLBACK(op_client, env, callback) \
00277 ((op_client)->ops->set_callback(op_client, env, callback))
00278
00281 #define AXIS2_OP_CLIENT_EXECUTE(op_client, env, block) \
00282 ((op_client)->ops->execute(op_client, env, block))
00283
00286 #define AXIS2_OP_CLIENT_RESET(op_client, env) \
00287 ((op_client)->ops->reset(op_client, env))
00288
00291 #define AXIS2_OP_CLIENT_COMPLETE(op_client, env, msg_ctx) \
00292 ((op_client)->ops->complete(op_client, env, msg_ctx))
00293
00296 #define AXIS2_OP_CLIENT_GET_OPERATION_CONTEXT(op_client, env) \
00297 ((op_client)->ops->get_operation_context(op_client, env))
00298
00301 #define AXIS2_OP_CLIENT_FREE(op_client, env) \
00302 ((op_client)->ops->free(op_client, env))
00303
00306 #define AXIS2_OP_CLIENT_SET_CALLBACK_RECV(op_client, env, callback_recv) \
00307 ((op_client)->ops->set_callback_recv(op_client, env, callback_recv))
00308
00310 #ifdef __cplusplus
00311 }
00312 #endif
00313
00314 #endif