rampart_credentials.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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>
00037 #ifdef __cplusplus
00038 extern "C"
00039 {
00040 #endif
00041 enum rampart_credentials_status
00042 {
00043 RAMPART_CREDENTIALS_PW_FOUND = 0,
00044 RAMPART_CREDENTIALS_PW_NOT_FOUND,
00045 RAMPART_CREDENTIALS_USER_FOUND,
00046 RAMPART_CREDENTIALS_USER_NOT_FOUND,
00047 RAMPART_CREDENTIALS_GENERAL_ERROR
00048 };
00049
00050 typedef enum rampart_credentials_status rampart_credentials_status_t;
00051
00056 typedef struct rampart_credentials_ops rampart_credentials_ops_t;
00057 typedef struct rampart_credentials rampart_credentials_t;
00058
00059 struct rampart_credentials_ops
00060 {
00061
00071 rampart_credentials_status_t (AXIS2_CALL*
00072 rampart_credentials_username_get)(
00073 rampart_credentials_t *credentials,
00074 const axutil_env_t* env,
00075 axis2_msg_ctx_t *msg_ctx,
00076 axis2_char_t **username,
00077 axis2_char_t **password);
00078
00085 axis2_status_t (AXIS2_CALL*
00086 free)(
00087 rampart_credentials_t *credentials,
00088 const axutil_env_t* env);
00089
00090 };
00091
00092 struct rampart_credentials
00093 {
00094 rampart_credentials_ops_t *ops;
00095 axutil_param_t *param;
00096 };
00097
00098
00099 #define RAMPART_CREDENTIALS_FREE(credentials, env) \
00100 ((credentials)->ops->free (credentials, env))
00101
00102 #define RAMPART_CREDENTIALS_USERNAME_GET(credentials, env, msg_ctx, username, password) \
00103 ((credentials)->ops->rampart_credentials_username_get( \
00104 credentials, env, msg_ctx, username, password))
00105
00106
00107
00109 #ifdef __cplusplus
00110 }
00111 #endif
00112
00113 #endif
00114