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                         load)(rampart_replay_detector_t *replay_detector,
00062                               const axutil_env_t *env);
00063 
00064         axis2_status_t (AXIS2_CALL*
00065                         is_replayed)(rampart_replay_detector_t *rrd,
00066                                      const axutil_env_t* env,
00067                                      axis2_msg_ctx_t *msg_ctx);
00068 
00069         axis2_status_t (AXIS2_CALL*
00070                         free)(rampart_replay_detector_t *rrd,
00071                               const axutil_env_t* env);
00072 
00073     };
00074 
00075     struct rampart_replay_detector
00076     {
00077         rampart_replay_detector_ops_t *ops;
00078     };
00079 
00080     /*The default impl for RRD*/
00081     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00082     rampart_replay_detector_default(const axutil_env_t *env,
00083                                     axis2_msg_ctx_t *msg_ctx,
00084                                     rampart_context_t *rampart_context);
00085 
00086     AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
00087     rampart_replay_detector_set_default_db(const axutil_env_t *env,
00088                                            axis2_ctx_t *ctx);
00089 
00090     /*A linked list based implementation for RRD
00091       This doesnt required addressing headers to be present*/
00092     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00093     rampart_replay_detector_with_linked_list(const axutil_env_t *env,
00094             axis2_msg_ctx_t* msg_ctx,
00095             rampart_context_t *rampart_context);
00096 
00097     AXIS2_EXTERN axutil_linked_list_t *AXIS2_CALL
00098     rampart_replay_detector_set_ll_db(const axutil_env_t *env,
00099                                       axis2_ctx_t *ctx);
00100 
00101     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00102     rampart_replay_detector_final_cleanup(const axutil_env_t *env,
00103                                           axis2_msg_ctx_t* msg_ctx);
00104     /*************************** Function macros **********************************/
00105 #define RAMPART_REPLAY_DETECTOR_LOAD(replay_detector, env) \
00106       ((replay_detector)->ops->load(replay_detector, env))
00107 
00108 #define RAMPART_REPLAY_DETECTOR_IS_REPLAYED(replay_detector, env, msg_ctx) \
00109       ((replay_detector)->ops->replay_detector_is_replayed(replay_detector, env, msg_ctx))
00110 
00111 #define RAMPART_REPLAY_DETECTOR_FREE(replay_detector, env) \
00112         ((replay_detector)->ops->free(replay_detector, env))
00113 
00115 #ifdef __cplusplus
00116 }
00117 #endif
00118 
00119 #endif                          /* RAMPART_REPLAY_DETECTOR_H */
00120 

Generated on Thu Oct 4 17:37:07 2007 for Rampart/C by  doxygen 1.4.7