rampart_credentials.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_CREDENTIALS_H
00019 #define RAMPART_CREDENTIALS_H
00020 
00021 #include <axis2_defines.h>
00022 #include <axutil_error.h>
00023 #include <axutil_env.h>
00024 #include <axutil_utils.h>
00025 #include <axis2_msg_ctx.h>
00026 #include <axutil_param.h>
00036 #ifdef __cplusplus
00037 extern "C"
00038 {
00039 #endif
00040     enum rampart_credentials_status{
00041         RAMPART_CREDENTIALS_PW_FOUND = 0,
00042         RAMPART_CREDENTIALS_PW_NOT_FOUND,
00043         RAMPART_CREDENTIALS_USER_FOUND,
00044         RAMPART_CREDENTIALS_USER_NOT_FOUND,
00045         RAMPART_CREDENTIALS_GENERAL_ERROR
00046     };
00047 
00048     typedef enum rampart_credentials_status rampart_credentials_status_t;
00049 
00057     typedef struct rampart_credentials_ops rampart_credentials_ops_t;
00058 
00063     typedef struct rampart_credentials rampart_credentials_t;
00064 
00067     struct rampart_credentials_ops
00068     {
00069 
00079         rampart_credentials_status_t (AXIS2_CALL*
00080                                       rampart_credentials_username_get)(
00081                                           rampart_credentials_t *credentials,
00082                                           const axutil_env_t* env,
00083                                           axis2_msg_ctx_t *msg_ctx,
00084                                           axis2_char_t **username,
00085                                           axis2_char_t **password
00086                                       );
00093         axis2_status_t (AXIS2_CALL*
00094                         free)(rampart_credentials_t *credentials,
00095                               const axutil_env_t* env);
00096 
00097     };
00098 
00099     struct rampart_credentials
00100     {
00101         rampart_credentials_ops_t *ops;
00102         axutil_param_t *param;
00103     };
00104 
00105     /*************************** Function macros **********************************/
00106 #define RAMPART_CREDENTIALS_FREE(credentials, env) \
00107       ((credentials)->ops->free (credentials, env))
00108 
00109 #define RAMPART_CREDENTIALS_USERNAME_GET(credentials, env, msg_ctx, username, password) \
00110       ((credentials)->ops->rampart_credentials_username_get(credentials, env, msg_ctx, username, password))
00111 
00112 
00113 
00115 #ifdef __cplusplus
00116 }
00117 #endif
00118 
00119 #endif                          /* RAMPART_CREDENTIALS_H */
00120 

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