# savan_util.h

    00001 /*
    00002  * Copyright 2004,2005 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License")
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *      http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016
    00017 #ifndef SAVAN_UTIL_H
    00018 #define SAVAN_UTIL_H
    00019
    00020 #include <axis2_const.h>
    00021 #include <axutil_error.h>
    00022 #include <axutil_hash.h>
    00023 #include <axis2_defines.h>
    00024 #include <axutil_utils_defines.h>
    00025 #include <axutil_env.h>
    00026 #include <axutil_allocator.h>
    00027 #include <axis2_msg_ctx.h>
    00028
    00029 #include <savan_constants.h>
    00030 #include <savan_subscriber.h>
    00031 #include <savan_sub_processor.h>
    00032 #include <savan_subs_mgr.h>
    00033 #include <savan_publisher.h>
    00034 #include <savan_filter_mod.h>
    00035 #include <axiom_node.h>
    00036 #include <axiom_element.h>
    00037
    00038 #ifdef __cplusplus
    00039 extern "C"
    00040 {
    00041 #endif
    00042
    00049 struct savan_subs_mgr;
    00050
    00062         AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00063         savan_util_create_fault_envelope(
    00064                 axis2_msg_ctx_t *msg_ctx,
    00065                 const axutil_env_t *env,
    00066                 axis2_char_t *code,
    00067                 axis2_char_t *subcode,
    00068                 axis2_char_t *reason,
    00069                 axis2_char_t *detail);
    00070
    00081     /*
    00082         int AXIS2_CALL
    00083         savan_util_send_fault_notification(
    00084         savan_subscriber_t *subscriber,
    00085         const axutil_env_t *env,
    00086         axis2_char_t * code,
    00087         axis2_char_t * subcode,
    00088         axis2_char_t * reason,
    00089         axis2_char_t * detail);
    00090     */
    00091
    00102         AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00103         savan_util_build_fault_msg(
    00104                 const axutil_env_t *env,
    00105                 axis2_char_t * code,
    00106                 axis2_char_t * subcode,
    00107                 axis2_char_t * reason,
    00108                 axis2_char_t * detail);
    00109
    00110     AXIS2_EXTERN savan_message_types_t AXIS2_CALL
    00111     savan_util_get_message_type(
    00112         axis2_msg_ctx_t *msg_ctx,
    00113         const axutil_env_t *env);
    00114
    00123     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00124     savan_util_get_subscription_id_from_msg(
    00125         const axutil_env_t *env,
    00126         axis2_msg_ctx_t *msg_ctx);
    00127
    00138     AXIS2_EXTERN axutil_hash_t * AXIS2_CALL
    00139     savan_util_get_subscriber_store(
    00140         const axutil_env_t *env,
    00141         axis2_msg_ctx_t *msg_ctx);
    00142
    00149     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00150     savan_util_get_expiry_time(
    00151         const axutil_env_t *env);
    00152
    00160     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00161     savan_util_get_renewed_expiry_time(
    00162         const axutil_env_t *env,
    00163         axis2_char_t *expiry);
    00164
    00171     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00172     savan_util_set_store(
    00173         axis2_svc_t *svc,
    00174         const axutil_env_t *env,
    00175         axis2_char_t *store_name);
    00176
    00177     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00178     savan_util_get_topic_name_from_topic_url(
    00179         const axutil_env_t *env,
    00180         axis2_char_t *topic_url);
    00181
    00182     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00183     savan_util_get_resource_connection_string(
    00184         const axutil_env_t *env,
    00185         axis2_conf_t *conf);
    00186
    00187     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00188     savan_util_get_resource_username(
    00189         const axutil_env_t *env,
    00190         axis2_conf_t *conf);
    00191
    00192     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00193     savan_util_get_resource_password(
    00194         const axutil_env_t *env,
    00195         axis2_conf_t *conf);
    00196
    00204     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00205     savan_util_get_module_param(
    00206         const axutil_env_t *env,
    00207         axis2_conf_t *conf,
    00208         axis2_char_t *name);
    00209
    00210     AXIS2_EXTERN void *AXIS2_CALL
    00211     savan_util_get_svc_client(
    00212         const axutil_env_t *env);
    00213
    00214     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00215     savan_util_process_subscriber_node(
    00216         const axutil_env_t *env,
    00217         axiom_node_t *sub_node,
    00218         axiom_element_t *sub_elem,
    00219         savan_subscriber_t *subscriber);
    00220
    00221     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00222     savan_util_create_subscriber_node(
    00223         const axutil_env_t *env,
    00224         savan_subscriber_t *subscriber,
    00225         axiom_node_t *parent_node);
    00226
    00227     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00228     savan_util_create_savan_specific_subscriber_node(
    00229         const axutil_env_t *env,
    00230         savan_subscriber_t *subscriber,
    00231         axiom_node_t *parent_node);
    00232
    00241     AXIS2_EXTERN savan_filter_mod_t * AXIS2_CALL
    00242     savan_util_get_filter_module(
    00243         const axutil_env_t *env,
    00244         axis2_conf_t *conf);
    00245
    00247 #ifdef __cplusplus
    00248 }
    00249 #endif
    00250
    00251 #endif /*SAVAN_UTIL_H*/