rampart_replay_detector.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 RAMPART_REPLAY_DETECTOR_H
00019 #define RAMPART_REPLAY_DETECTOR_H
00020 
00032 #include <axis2_defines.h>
00033 #include <axutil_env.h>
00034 #include <axis2_msg_ctx.h>
00035 #include <axis2_conf_ctx.h>
00036 #include <rampart_context.h>
00037 #ifdef __cplusplus
00038 extern "C"
00039 {
00040 #endif
00041 
00042 
00046     typedef struct rampart_replay_detector_ops rampart_replay_detector_ops_t;
00047 
00052     typedef struct rampart_replay_detector rampart_replay_detector_t;
00053 
00058     struct rampart_replay_detector_ops
00059     {
00060         axis2_status_t (AXIS2_CALL*
00061                         is_replayed)(rampart_replay_detector_t *rrd,
00062                                      const axutil_env_t* env,
00063                                      axis2_msg_ctx_t *msg_ctx,
00064                                                                          rampart_context_t *rampart_context);
00065 
00066         axis2_status_t (AXIS2_CALL*
00067                         free)(rampart_replay_detector_t *rrd,
00068                               const axutil_env_t* env);
00069 
00070     };
00071 
00072     struct rampart_replay_detector
00073     {
00074         rampart_replay_detector_ops_t *ops;
00075                 axutil_param_t *param;
00076     };
00077 
00078 
00088     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00089     rampart_replay_detector_default(const axutil_env_t *env,
00090                                     axis2_msg_ctx_t *msg_ctx,
00091                                     rampart_context_t *rampart_context);
00100     AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
00101     rampart_replay_detector_set_default_db(const axutil_env_t *env,
00102                                            axis2_ctx_t *ctx);
00113     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00114     rampart_replay_detector_with_linked_list(const axutil_env_t *env,
00115             axis2_msg_ctx_t* msg_ctx,
00116             rampart_context_t *rampart_context);
00125     AXIS2_EXTERN axutil_linked_list_t *AXIS2_CALL
00126     rampart_replay_detector_set_ll_db(const axutil_env_t *env,
00127                                       axis2_ctx_t *ctx);
00136     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00137     rampart_replay_detector_final_cleanup(const axutil_env_t *env,
00138                                           axis2_msg_ctx_t* msg_ctx);
00148         AXIS2_EXTERN axis2_bool_t AXIS2_CALL
00149         rampart_replay_detector_linked_list_contains(axutil_linked_list_t *linked_list,
00150                                                                                                 const axutil_env_t *env,
00151                                                                                                 axis2_char_t *id);
00160         AXIS2_EXTERN axis2_char_t * AXIS2_CALL
00161         rampart_replay_detector_get_ts(const axutil_env_t *env,
00162                                                                         axis2_msg_ctx_t* msg_ctx);
00163 
00164     /*************************** Function macros **********************************/
00165 #define RAMPART_REPLAY_DETECTOR_IS_REPLAYED(replay_detector, env, msg_ctx, rampart_context) \
00166       ((replay_detector)->ops->is_replayed(replay_detector, env, msg_ctx, rampart_context))
00167 
00168 #define RAMPART_REPLAY_DETECTOR_FREE(replay_detector, env) \
00169         ((replay_detector)->ops->free(replay_detector, env))
00170 
00172 #ifdef __cplusplus
00173 }
00174 #endif
00175 
00176 #endif                          /* RAMPART_REPLAY_DETECTOR_H */
00177 

Generated on Fri May 23 15:50:24 2008 for Rampart/C by  doxygen 1.5.5