rampart_timestamp_token.h

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 TIMESTAMP_TOKEN_H
00019 #define TIMESTAMP_TOKEN_H
00020 
00021 
00022 #ifdef __cplusplus
00023 extern "C"
00024 {
00025 #endif
00026 
00027 #define RAMPART_TIMESTAMP_TOKEN_DEFAULT_TIME_TO_LIVE 300    
00028  
00029 #include <axis2_env.h>
00030 #include <rampart_constants.h>
00031 
00033     typedef struct rampart_timestamp_token_ops rampart_timestamp_token_ops_t;
00035     typedef struct rampart_timestamp_token rampart_timestamp_token_t;
00040     struct rampart_timestamp_token_ops
00041     {
00042         axis2_status_t (AXIS2_CALL *
00043         free)(rampart_timestamp_token_t *timestamp_token,
00044             const axis2_env_t *env);
00055         axis2_status_t (AXIS2_CALL *
00056         build)(rampart_timestamp_token_t *timestamp_token,
00057             const axis2_env_t *env,
00058             const axis2_ctx_t *ctx,
00059             axiom_node_t *sec_node,
00060             const  axiom_namespace_t *sec_ns_obj,
00061             int ttl
00062             );
00070         axis2_status_t (AXIS2_CALL *
00071         validate)(rampart_timestamp_token_t *timestamp_token,
00072             const axis2_env_t *env,
00073             axis2_msg_ctx_t *msg_ctx,
00074             axiom_node_t *ts_node);
00075     };
00076 
00080     struct rampart_timestamp_token
00081     {
00083         rampart_timestamp_token_ops_t *ops;
00084     };
00085 
00091     AXIS2_EXTERN rampart_timestamp_token_t *AXIS2_CALL
00092     rampart_timestamp_token_create (
00093         const axis2_env_t *env);
00094 
00095 /*************************** Function macros **********************************/
00096 #define RAMPART_TIMESTAMP_TOKEN_FREE(timestamp_token, env) \
00097         ((timestamp_token)->ops->free(timestamp_token, env))
00098 
00099 #define RAMPART_TIMESTAMP_TOKEN_BUILD(timestamp_token, env, ctx, sec_node, sec_ns_obj, ttl) \
00100         ((timestamp_token)->ops->build(timestamp_token, env, ctx,  sec_node, sec_ns_obj, ttl))
00101 
00102 #define RAMPART_TIMESTAMP_TOKEN_VALIDATE(timestamp_token, env, msg_ctx, ts_node) \
00103         ((timestamp_token)->ops->validate(timestamp_token, env, msg_ctx, ts_node))
00104 
00106 #ifdef __cplusplus
00107 }
00108 #endif
00109 
00110 
00111 #endif /*TIMESTAMP_TOKEN_H*/

Generated on Wed Dec 20 20:14:10 2006 for Axis2/C by  doxygen 1.5.1