# rampart_callback.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 #include <axutil_utils_defines.h>
    00019 #include <axis2_defines.h>
    00020 #include <axutil_param.h>
    00021 #ifndef RAMPART_CALLBACK_H
    00022 #define RAMPART_CALLBACK_H
    00023
    00030 #ifdef __cplusplus
    00031 extern "C"
    00032 {
    00033 #endif
    00034
    00041     typedef struct rampart_callback_ops rampart_callback_ops_t;
    00042     typedef struct rampart_callback rampart_callback_t;
    00043
    00044     struct rampart_callback_ops
    00045     {
    00056         axis2_char_t *(AXIS2_CALL*
    00057                        callback_password)(rampart_callback_t *callback,
    00058                                           const axutil_env_t *env,
    00059                                           const axis2_char_t *username,
    00060                                           void *param);
    00072                 axis2_char_t *(AXIS2_CALL*
    00073                                            callback_pkcs12_password)(rampart_callback_t *callback,
    00074                                                                                                 const axutil_env_t *env,
    00075                                                                                                 const axis2_char_t *username,
    00076                                                                                                 void *param);
    00083         axis2_status_t (AXIS2_CALL*
    00084                         free)(rampart_callback_t *rcb,
    00085                               const axutil_env_t* env);
    00086
    00087     };
    00088
    00089     struct rampart_callback
    00090     {
    00091         rampart_callback_ops_t *ops;
    00092         axutil_param_t *param;
    00093     };
    00094
    00095     /*************************** Function macros **********************************/
    00096 #define RAMPART_CALLBACK_FREE(callback, env) \
    00097       ((callback)->ops->free (callback, env))
    00098
    00099 #define RAMPART_CALLBACK_CALLBACK_PASSWORD(callback, env, username, param) \
    00100       ((callback)->ops->callback_password(callback, env, username, param))
    00101
    00102 #define RAMPART_CALLBACK_CALLBACK_PKCS12_PASSWORD(callback, env, username, param) \
    00103           ((callback)->ops->callback_pkcs12_password(callback, env, username, param))
    00104
    00106 #ifdef __cplusplus
    00107 }
    00108 #endif
    00109
    00110 #endif /* RAMPART_CALLBACK_H */
    00111