axis2_char_t *AXIS2_CALL tcpmon_entry_arrived_time( tcpmon_entry_t * entry, const axutil_env_t * env) { tcpmon_entry_impl_t *entry_impl = NULL; AXIS2_ENV_CHECK(env, NULL); entry_impl = AXIS2_INTF_TO_IMPL(entry); return entry_impl->arrived_time; }
axis2_bool_t AXIS2_CALL tcpmon_entry_is_success( tcpmon_entry_t * entry, const axutil_env_t * env) { tcpmon_entry_impl_t *entry_impl = NULL; AXIS2_ENV_CHECK(env, AXIS2_FALSE); entry_impl = AXIS2_INTF_TO_IMPL(entry); return entry_impl->is_success; }
void AXIS2_CALL axis2_ssl_stream_free( void * streamv, const axutil_env_t * env) { ssl_stream_impl_t *stream_impl = NULL; axutil_stream_t* stream = (axutil_stream_t*)streamv; stream_impl = AXIS2_INTF_TO_IMPL(stream); axis2_ssl_utils_cleanup_ssl(env, stream_impl->ctx, stream_impl->ssl); AXIS2_FREE(env->allocator, stream_impl); return; }
int AXIS2_CALL tcpmon_entry_get_arrived_data_length( tcpmon_entry_t * entry, const axutil_env_t * env) { tcpmon_entry_impl_t *entry_impl = NULL; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); entry_impl = AXIS2_INTF_TO_IMPL(entry); return entry_impl->arrived_data_length; }
int AXIS2_CALL tcpmon_entry_get_format_bit( tcpmon_entry_t * entry, const axutil_env_t * env) { tcpmon_entry_impl_t *entry_impl = NULL; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); entry_impl = AXIS2_INTF_TO_IMPL(entry); return entry_impl->format_bit; }
axis2_bool_t AXIS2_CALL axis2_udp_receiver_is_running( axis2_transport_receiver_t * tr_receiver, const axutil_env_t * env) { axis2_bool_t running = AXIS2_FALSE; axis2_udp_receiver_impl_t *receiver = NULL; receiver = AXIS2_INTF_TO_IMPL(tr_receiver); axutil_thread_mutex_lock(receiver->mutex); running = !receiver->stop; axutil_thread_mutex_unlock(receiver->mutex); return running; }
axis2_char_t *AXIS2_CALL tcpmon_entry_sent_headers( tcpmon_entry_t * entry, const axutil_env_t * env) { tcpmon_entry_impl_t *entry_impl = NULL; AXIS2_ENV_CHECK(env, NULL); entry_impl = AXIS2_INTF_TO_IMPL(entry); return entry_impl->sent_headers; }
int AXIS2_CALL cgi_stream_skip( axutil_stream_t * stream, const axutil_env_t * env, int count) { cgi_stream_impl_t *stream_impl = NULL; int skipped = -1; AXIS2_ENV_CHECK(env, AXIS2_CRITICAL_FAILURE); stream_impl = AXIS2_INTF_TO_IMPL(stream); if (fseek(stdin, count, SEEK_CUR)==0) skipped = count; return skipped; }
axis2_bool_t AXIS2_CALL axis2_tcp_server_is_running( axis2_transport_receiver_t * server, const axutil_env_t * env) { axis2_tcp_server_impl_t *server_impl = NULL; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); server_impl = AXIS2_INTF_TO_IMPL(server); if (!server_impl->svr_thread) { return AXIS2_FALSE; } return axis2_tcp_svr_thread_is_running(server_impl->svr_thread, env); }
axis2_char_t *AXIS2_CALL axis2_libxml2_writer_wrapper_get_prefix( axiom_xml_writer_t * writer, const axutil_env_t * env, axis2_char_t * uri) { axis2_libxml2_writer_wrapper_impl_t *writer_impl = NULL; AXIS2_PARAM_CHECK(env->error, uri, NULL); writer_impl = AXIS2_INTF_TO_IMPL(writer); if(!uri || axutil_strcmp(uri, "") == 0) { return NULL; } return axis2_libxml2_writer_wrapper_find_prefix(writer, env, uri); }
axis2_status_t AXIS2_CALL axis2_udp_receiver_init( axis2_transport_receiver_t * tr_receiver, const axutil_env_t * env, axis2_conf_ctx_t * conf_ctx, axis2_transport_in_desc_t * in_desc) { axis2_udp_receiver_impl_t *receiver = NULL; axis2_char_t *str = NULL; axutil_param_t *param = NULL; axutil_param_container_t *container = NULL; receiver = AXIS2_INTF_TO_IMPL(tr_receiver); receiver->conf_ctx = conf_ctx; container = axis2_transport_in_desc_param_container(in_desc, env); /* Get the port */ param = (axutil_param_t *) axutil_param_container_get_param(container, env, AXIS2_PORT_STRING); if (param) { str = (axis2_char_t *)axutil_param_get_value(param, env); if (str) { receiver->port = atoi(str); } } /* Get the multicast group */ param = (axutil_param_t *) axutil_param_container_get_param(container, env, AXIS2_UDP_TRANSPORT_MULTICAST_GROUP); if (param) { receiver->multicast_group = (axis2_char_t *)axutil_param_get_value(param, env); receiver->is_multicast = AXIS2_TRUE; } /* Get the max packet size */ param = (axutil_param_t *) axutil_param_container_get_param(container, env, AXIS2_UDP_TRANSPORT_MAX_PACKET_SIZE_STR); if (param) { str = (axis2_char_t *)axutil_param_get_value(param, env); if (str) { receiver->max_packet_size = atoi(str); } } return AXIS2_SUCCESS; }
axis2_status_t AXIS2_CALL tcpmon_entry_set_format_bit( tcpmon_entry_t * entry, const axutil_env_t * env, int format_bit) { tcpmon_entry_impl_t *entry_impl = NULL; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); entry_impl = AXIS2_INTF_TO_IMPL(entry); entry_impl->format_bit = format_bit; return AXIS2_SUCCESS; }
axis2_status_t WSF_CALL wsf_stream_free ( axutil_stream_t * stream, const axutil_env_t * env) { wsf_stream_impl_t *stream_impl = NULL; stream_impl = AXIS2_INTF_TO_IMPL (stream); if (stream_impl->buffer) { AXIS2_FREE (env->allocator, stream_impl->buffer); stream_impl->buffer = NULL; } AXIS2_FREE (env->allocator, stream_impl); return AXIS2_SUCCESS; }
axis2_status_t AXIS2_CALL axis2_apache_out_transport_info_set_cookie_header( axis2_http_out_transport_info_t * out_transport_info, const axutil_env_t * env, const axis2_char_t * cookie_header) { axis2_apache2_out_transport_info_t *info = NULL; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, cookie_header, AXIS2_FAILURE); info = AXIS2_INTF_TO_IMPL(out_transport_info); apr_table_set(info->request->headers_out, AXIS2_HTTP_HEADER_SET_COOKIE, cookie_header); return AXIS2_SUCCESS; }
axis2_status_t AXIS2_CALL axis2_libxml2_writer_wrapper_flush( axiom_xml_writer_t * writer, const axutil_env_t * env) { axis2_libxml2_writer_wrapper_impl_t *writer_impl = NULL; writer_impl = AXIS2_INTF_TO_IMPL(writer); if(writer_impl->xml_writer) { int ret = 0; ret = xmlTextWriterFlush(writer_impl->xml_writer); if(ret > -1) return AXIS2_SUCCESS; } return AXIS2_FAILURE; }
unsigned int AXIS2_CALL axis2_libxml2_writer_wrapper_get_xml_size( axiom_xml_writer_t * writer, const axutil_env_t * env) { axis2_libxml2_writer_wrapper_impl_t *writer_impl = NULL; writer_impl = AXIS2_INTF_TO_IMPL(writer); if(writer_impl->writer_type == AXIS2_XML_PARSER_TYPE_BUFFER) { return writer_impl->buffer->use; } else { return 0; } }
AXIS2_EXTERN axis2_status_t AXIS2_CALL axis2_udp_receiver_set_socket( axis2_transport_receiver_t * tr_receiver, const axutil_env_t * env, axis2_socket_t socket) { axis2_udp_receiver_impl_t *receiver = NULL; receiver = AXIS2_INTF_TO_IMPL(tr_receiver); /* If we already have a socket free it */ if (receiver->socket== AXIS2_INVALID_SOCKET) { receiver->socket = socket; receiver->owns_socket = AXIS2_FALSE; return AXIS2_SUCCESS; } return AXIS2_FAILURE; }
axis2_status_t WSF_CALL wsf_http_out_transport_info_set_char_encoding ( axis2_http_out_transport_info_t * info, const axutil_env_t * env, const axis2_char_t * encoding) { wsf_out_transport_info_impl_t *info_impl = NULL; if (!encoding) return AXIS2_FAILURE; info_impl = AXIS2_INTF_TO_IMPL (info); if (NULL != info_impl->encoding) { AXIS2_FREE (env->allocator, info_impl->encoding); } info_impl->encoding = axutil_strdup (env, encoding); return AXIS2_SUCCESS; }
axis2_status_t WSF_CALL wsf_http_out_transport_info_free ( axis2_http_out_transport_info_t * info, const axutil_env_t * env) { wsf_out_transport_info_impl_t *info_impl = NULL; AXIS2_ENV_CHECK (env, AXIS2_FAILURE); info_impl = AXIS2_INTF_TO_IMPL (info); info_impl->request = NULL; /* request doesn't belong to info */ if (NULL != info_impl->encoding) { AXIS2_FREE (env->allocator, info_impl->encoding); info_impl->encoding = NULL; } AXIS2_FREE (env->allocator, info_impl); return AXIS2_SUCCESS; }
axis2_status_t AXIS2_CALL axis2_libxml2_writer_wrapper_write_end_document( axiom_xml_writer_t * writer, const axutil_env_t * env) { axis2_libxml2_writer_wrapper_impl_t *writer_impl = NULL; int status = 0; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); writer_impl = AXIS2_INTF_TO_IMPL(writer); status = xmlTextWriterEndDocument(writer_impl->xml_writer); if(status < 0) { AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_WRITING_END_DOCUMENT, AXIS2_FAILURE); return AXIS2_FAILURE; } return AXIS2_SUCCESS; }
axis2_bool_t AXIS2_CALL axis2_xmpp_server_is_running( axis2_transport_receiver_t *server, const axutil_env_t *env) { axis2_xmpp_server_impl_t *server_impl = NULL; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); server_impl = AXIS2_INTF_TO_IMPL(server); if (NULL == server_impl->svr_thread) { return AXIS2_FALSE; } else { return AXIS2_XMPP_SVR_THREAD_IS_RUNNING(server_impl->svr_thread, env); } return AXIS2_FALSE; }
void AXIS2_CALL axis2_libxml2_writer_wrapper_free( axiom_xml_writer_t * writer, const axutil_env_t * env) { axis2_libxml2_writer_wrapper_impl_t *writer_impl = NULL; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); writer_impl = AXIS2_INTF_TO_IMPL(writer); if(writer_impl->xml_writer) { xmlFreeTextWriter(writer_impl->xml_writer); writer_impl->xml_writer = NULL; } if(writer_impl->buffer) { xmlBufferFree(writer_impl->buffer); writer_impl->buffer = NULL; } if(writer_impl->encoding) { AXIS2_FREE(env->allocator, writer_impl->encoding); writer_impl->encoding = NULL; } if(writer_impl->uri_prefix_map) { axutil_hash_free(writer_impl->uri_prefix_map, env); writer_impl->uri_prefix_map = NULL; } if(writer_impl->stack) { axutil_stack_free(writer_impl->stack, env); writer_impl->stack = NULL; } if(writer_impl->default_lang_namespace) { uri_prefix_element_free(writer_impl->default_lang_namespace, env); writer_impl->default_lang_namespace = NULL; } AXIS2_FREE(env->allocator, writer_impl); writer_impl = NULL; return; }
axis2_status_t AXIS2_CALL axis2_apache_out_transport_info_set_session( axis2_http_out_transport_info_t * out_transport_info, const axutil_env_t * env, const axis2_char_t * session_id, const axis2_char_t * session_value) { axis2_apache2_out_transport_info_t *info = NULL; axis2_status_t status = AXIS2_SUCCESS; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, session_id, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, session_value, AXIS2_FAILURE); info = AXIS2_INTF_TO_IMPL(out_transport_info); status = env->set_session_fn(info->request, session_id, session_value); return status; }
/** need to work on this */ axis2_status_t AXIS2_CALL axis2_libxml2_writer_wrapper_write_namespace( axiom_xml_writer_t * writer, const axutil_env_t * env, axis2_char_t * prefix, axis2_char_t * namespace_uri) { axis2_libxml2_writer_wrapper_impl_t *writer_impl = NULL; int status = 0; char *xmlnsprefix = NULL; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, namespace_uri, AXIS2_FAILURE); writer_impl = AXIS2_INTF_TO_IMPL(writer); if(prefix && (axutil_strcmp(prefix, "") != 0)) { xmlnsprefix = (axis2_char_t *)AXIS2_MALLOC(env->allocator, (sizeof(char) * (axutil_strlen( prefix) + 7))); sprintf(xmlnsprefix, "xmlns:%s", prefix); } else { xmlnsprefix = axutil_strdup(env, "xmlns"); } status = xmlTextWriterWriteAttribute(writer_impl->xml_writer, BAD_CAST xmlnsprefix, BAD_CAST namespace_uri); AXIS2_FREE(env->allocator, xmlnsprefix); xmlnsprefix = NULL; if(status < 0) { AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_WRITING_ATTRIBUTE_WITH_NAMESPACE_PREFIX, AXIS2_FAILURE); return AXIS2_FAILURE; } AXIS2_FREE(env->allocator, xmlnsprefix); xmlnsprefix = NULL; return AXIS2_SUCCESS; }
static axis2_bool_t axis2_libxml2_writer_wrapper_is_namespace_declared( axiom_xml_writer_t * writer, const axutil_env_t * env, axis2_char_t * key) { axis2_libxml2_writer_wrapper_impl_t *writer_impl = NULL; AXIS2_ENV_CHECK(env, AXIS2_FALSE); writer_impl = AXIS2_INTF_TO_IMPL(writer); if(writer_impl->uri_prefix_map && NULL != key) { void *ret = NULL; ret = axutil_hash_get(writer_impl->uri_prefix_map, key, AXIS2_HASH_KEY_STRING); if(ret) { return AXIS2_TRUE; } } return AXIS2_FALSE; }
void AXIS2_CALL axis2_cgi_out_transport_info_free( axis2_http_out_transport_info_t * info, const axutil_env_t * env) { axis2_cgi_out_transport_info_t *info_impl = NULL; AXIS2_ENV_CHECK(env, void); info_impl = AXIS2_INTF_TO_IMPL(info); info_impl->request = NULL; /* doesn't belong here so no need to free it here */ if (info_impl->encoding) { AXIS2_FREE(env->allocator, info_impl->encoding); info_impl->encoding = NULL; } AXIS2_FREE(env->allocator, info_impl); return; }
axis2_status_t AXIS2_CALL axis2_cgi_out_transport_info_set_char_encoding( axis2_http_out_transport_info_t * info, const axutil_env_t * env, const axis2_char_t * encoding) { axis2_cgi_out_transport_info_t *info_impl = NULL; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, encoding, AXIS2_FAILURE); info_impl = AXIS2_INTF_TO_IMPL(info); if (info_impl->encoding) { AXIS2_FREE(env->allocator, info_impl->encoding); } info_impl->encoding = axutil_strdup(env, encoding); return AXIS2_SUCCESS; }
axis2_status_t AXIS2_CALL axis2_libxml2_writer_wrapper_write_processing_instruction( axiom_xml_writer_t * writer, const axutil_env_t * env, axis2_char_t * target) { axis2_libxml2_writer_wrapper_impl_t *writer_impl = NULL; int status = 0; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, target, AXIS2_FAILURE); writer_impl = AXIS2_INTF_TO_IMPL(writer); status = xmlTextWriterStartPI(writer_impl->xml_writer, BAD_CAST target); if(status < 0) { AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_WRITING_PROCESSING_INSTRUCTION, AXIS2_FAILURE); return AXIS2_FAILURE; } return AXIS2_SUCCESS; }
axis2_status_t AXIS2_CALL axis2_libxml2_writer_wrapper_write_comment( axiom_xml_writer_t * writer, const axutil_env_t * env, axis2_char_t * value) { axis2_libxml2_writer_wrapper_impl_t *writer_impl = NULL; int status = 0; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE); writer_impl = AXIS2_INTF_TO_IMPL(writer); status = xmlTextWriterWriteComment(writer_impl->xml_writer, BAD_CAST value); if(status < 0) { AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_WRITING_COMMENT, AXIS2_FAILURE); return AXIS2_FAILURE; } return AXIS2_SUCCESS; }
axis2_status_t AXIS2_CALL axis2_libxml2_writer_wrapper_write_raw( axiom_xml_writer_t * writer, const axutil_env_t * env, axis2_char_t * content) { axis2_libxml2_writer_wrapper_impl_t *writer_impl = NULL; int status = 0; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, content, AXIS2_FAILURE); writer_impl = AXIS2_INTF_TO_IMPL(writer); status = xmlTextWriterWriteRaw(writer_impl->xml_writer, BAD_CAST content); if(status < 0) { AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_WRITING_DATA_SOURCE, AXIS2_FAILURE); return AXIS2_FAILURE; } return AXIS2_SUCCESS; }