axis2_phase.h

Go to the documentation of this file.
00001 /*
00002 * Licensed to the Apache Software Foundation (ASF) under one or more
00003 * contributor license agreements.  See the NOTICE file distributed with
00004 * this work for additional information regarding copyright ownership.
00005 * The ASF licenses this file to You under the Apache License, Version 2.0
00006 * (the "License"); you may not use this file except in compliance with
00007 * the License.  You may obtain a copy of the License at
00008 *
00009 *      http://www.apache.org/licenses/LICENSE-2.0
00010 *
00011 * Unless required by applicable law or agreed to in writing, software
00012 * distributed under the License is distributed on an "AS IS" BASIS,
00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014 * See the License for the specific language governing permissions and
00015 * limitations under the License.
00016 */
00017 
00018 #ifndef AXIS2_PHASE_H
00019 #define AXIS2_PHASE_H
00020 
00038 #include <axis2_defines.h>
00039 #include <axis2_env.h>
00040 #include <axis2_handler.h>
00041 #include <axis2_handler_desc.h>
00042 #include <axis2_array_list.h>
00043 #include <axis2_qname.h>
00044 
00049 #define AXIS2_PHASE_BOTH_BEFORE_AFTER  0
00050 
00055 #define AXIS2_PHASE_BEFORE  1
00056 
00061 #define AXIS2_PHASE_AFTER  2
00062 
00067 #define AXIS2_PHASE_ANYWHERE  3
00068 
00069 #ifdef __cplusplus
00070 extern "C"
00071 {
00072 #endif
00073 
00075     typedef struct axis2_phase_ops axis2_phase_ops_t;
00077     typedef struct axis2_phase axis2_phase_t;
00078         
00079     struct axis2_msg_ctx;
00080 
00085     struct axis2_phase_ops
00086     {
00096         axis2_status_t (AXIS2_CALL *
00097                 add_handler_at)(
00098                     axis2_phase_t *phase,
00099                     const axis2_env_t *env,
00100                     const int index,
00101                     axis2_handler_t *handler);
00102         
00111         axis2_status_t (AXIS2_CALL *
00112                 add_handler)(
00113                     axis2_phase_t *phase,
00114                     const axis2_env_t *env,
00115                     axis2_handler_t *handler);
00116                     
00126         axis2_status_t (AXIS2_CALL *
00127                 invoke)(
00128                     axis2_phase_t *phase,
00129                     const axis2_env_t *env,
00130                     struct axis2_msg_ctx *msg_ctx);
00137         const axis2_char_t *(AXIS2_CALL *
00138                 get_name)(
00139                     const axis2_phase_t *phase,
00140                     const axis2_env_t *env);
00141 
00148         int (AXIS2_CALL *
00149                 get_handler_count)( 
00150                     const axis2_phase_t *phase,
00151                     const axis2_env_t *env);
00152 
00161         axis2_status_t (AXIS2_CALL *
00162                 set_first_handler)(
00163                     axis2_phase_t *phase,
00164                     const axis2_env_t *env,
00165                     axis2_handler_t *handler);
00166                     
00175         axis2_status_t (AXIS2_CALL *
00176                 set_last_handler)(  
00177                     axis2_phase_t *phase,
00178                     const axis2_env_t *env,
00179                     axis2_handler_t *handler);
00180                     
00191         axis2_status_t (AXIS2_CALL *
00192                 add_handler_desc)(
00193                     axis2_phase_t *phase,
00194                     const axis2_env_t *env,
00195                     axis2_handler_desc_t *handler_desc);
00196                     
00209         axis2_status_t (AXIS2_CALL *
00210                 insert_before)(
00211                     axis2_phase_t *phase,
00212                     const axis2_env_t *env,
00213                     axis2_handler_t *handler);
00214 
00227         axis2_status_t (AXIS2_CALL *
00228                 insert_after)(
00229                     axis2_phase_t *phase,
00230                     const axis2_env_t *env,
00231                     axis2_handler_t *handler);
00232 
00245         axis2_status_t (AXIS2_CALL *
00246                 insert_before_and_after)(
00247                     axis2_phase_t *phase,
00248                     const axis2_env_t *env,
00249                     axis2_handler_t *handler);
00250 
00261         axis2_status_t (AXIS2_CALL *
00262                 insert_handler_desc)(
00263                     axis2_phase_t *phase,
00264                     const axis2_env_t *env,
00265                     axis2_handler_desc_t *handler_desc);
00266 
00273         axis2_array_list_t *(AXIS2_CALL *
00274                 get_all_handlers)(
00275                     const axis2_phase_t *phase,
00276                     const axis2_env_t *env);
00277 
00287         axis2_status_t (AXIS2_CALL *
00288                 invoke_start_from_handler)(
00289                     axis2_phase_t *phase,
00290                     const axis2_env_t *env,
00291                     const int paused_handler_index,
00292                     struct axis2_msg_ctx *msg_ctx);
00293 
00300         axis2_status_t (AXIS2_CALL *
00301                 free)(
00302                     axis2_phase_t *phase,
00303                     const axis2_env_t *env);
00304 
00305     };
00306 
00310     struct axis2_phase
00311     {
00313         axis2_phase_ops_t *ops;
00314     };
00315 
00316 
00323     AXIS2_EXTERN axis2_phase_t *AXIS2_CALL
00324     axis2_phase_create(
00325             const axis2_env_t *env,
00326             const axis2_char_t *phase_name);
00327 
00330 #define AXIS2_PHASE_ADD_HANDLER_AT(phase, env, index, handler) \
00331       ((phase)->ops->add_handler_at(phase, env, index, handler))
00332 
00335 #define AXIS2_PHASE_ADD_HANDLER(phase, env, handler) \
00336       ((phase)->ops->add_handler(phase, env, handler))
00337 
00340 #define AXIS2_PHASE_ADD_HANDLER_DESC(phase, env, handler_desc) \
00341       ((phase)->ops->add_handler_desc(phase, env, handler_desc))
00342 
00347 #define AXIS2_PHASE_INVOKE(phase, env, msg_ctx) \
00348        ((phase)->ops->invoke(phase, env, msg_ctx))
00349 
00352 #define AXIS2_PHASE_GET_NAME(phase, env) \
00353       ((phase)->ops->get_name(phase, env))
00354 
00357 #define AXIS2_PHASE_GET_HANDLER_COUNT(phase, env) \
00358       ((phase)->ops->get_handler_count(phase, env))
00359 
00362 #define AXIS2_PHASE_SET_FIRST_HANDLER(phase, env, handler) \
00363       ((phase)->ops->set_first_handler(phase, env, handler))
00364 
00367 #define AXIS2_PHASE_SET_LAST_HANDLER(phase, env, handler) \
00368       ((phase)->ops->set_last_handler(phase, env, handler))
00369 
00372 #define AXIS2_PHASE_INSERT_BEFORE(phase, env, handler) \
00373       ((phase)->ops->insert_before(phase, env, handler))
00374 
00377 #define AXIS2_PHASE_INSERT_AFTER(phase, env, handler) \
00378       ((phase)->ops->insert_after(phase, env, handler))
00379 
00383 #define AXIS2_PHASE_INSERT_BEFORE_AND_AFTER(phase, env, handler) \
00384       ((phase)->ops->insert_before_and_after(phase, env, handler))
00385 
00388 #define AXIS2_PHASE_INSERT_HANDLER_DESC(phase, env, handler_desc) \
00389       ((phase)->ops->insert_handler_desc(phase, env, handler_desc))
00390 
00393 #define AXIS2_PHASE_GET_ALL_HANDLERS(phase, env) \
00394       ((phase)->ops->get_all_handlers(phase, env))
00395 
00398 #define AXIS2_PHASE_INVOKE_START_FROM_HANDLER(phase, env, paused_handler_index, \
00399         msg_ctx) \
00400       ((phase)->ops->invoke_start_from_handler(phase, env, paused_handler_index, \
00401         msg_ctx))
00402 
00405 #define AXIS2_PHASE_FREE(phase, env) \
00406       ((phase)->ops->free(phase, env))
00407 
00410 #ifdef __cplusplus
00411 }
00412 #endif
00413 
00414 #endif    /* AXIS2_PHASE_H */

Generated on Wed Dec 20 20:34:50 2006 for Axis2/C by  doxygen 1.5.1