You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2007/09/28 05:31:21 UTC
svn commit: r580209 [3/4] - in /webservices/axis2/trunk/c/util/include: ./
platforms/ platforms/unix/ platforms/windows/
Modified: webservices/axis2/trunk/c/util/include/axutil_property.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_property.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_property.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_property.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -23,7 +24,6 @@
#include <axutil_env.h>
#include <axutil_utils.h>
-
#ifdef __cplusplus
extern "C"
{
@@ -41,9 +41,9 @@
* create new property
* @return property newly created property
*/
- AXIS2_EXTERN axutil_property_t * AXIS2_CALL
+ AXIS2_EXTERN axutil_property_t *AXIS2_CALL
axutil_property_create(
- const axutil_env_t *env);
+ const axutil_env_t * env);
/**
* create new property
@@ -58,53 +58,59 @@
* @param value value of the property
* @return property newly created property
*/
- AXIS2_EXTERN axutil_property_t * AXIS2_CALL
+ AXIS2_EXTERN axutil_property_t *AXIS2_CALL
+
axutil_property_create_with_args(
- const axutil_env_t *env,
+ const axutil_env_t * env,
axis2_scope_t scope,
axis2_bool_t own_value,
AXIS2_FREE_VOID_ARG free_func,
void *value);
AXIS2_EXTERN void AXIS2_CALL
- axutil_property_free(axutil_property_t *property,
- const axutil_env_t *env);
+ axutil_property_free(
+ axutil_property_t * property,
+ const axutil_env_t * env);
/**
* Default scope is AXIS2_SCOPE_REQUEST
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_property_set_scope(axutil_property_t *property,
- const axutil_env_t *env,
+ axutil_property_set_scope(
+ axutil_property_t * property,
+ const axutil_env_t * env,
axis2_scope_t scope);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_property_set_free_func(axutil_property_t *property,
- const axutil_env_t *env,
+ axutil_property_set_free_func(
+ axutil_property_t * property,
+ const axutil_env_t * env,
AXIS2_FREE_VOID_ARG free_func);
-/*************************** Function macros **********************************/
+ /*************************** Function macros **********************************/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_property_set_value(axutil_property_t *property,
- const axutil_env_t *env,
+ axutil_property_set_value(
+ axutil_property_t * property,
+ const axutil_env_t * env,
void *value);
-
- AXIS2_EXTERN void * AXIS2_CALL
- axutil_property_get_value(axutil_property_t *property,
- const axutil_env_t *env);
+
+ AXIS2_EXTERN void *AXIS2_CALL
+ axutil_property_get_value(
+ axutil_property_t * property,
+ const axutil_env_t * env);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axutil_property_set_own_value(
- axutil_property_t *property,
- const axutil_env_t *env,
+ axutil_property_t * property,
+ const axutil_env_t * env,
axis2_bool_t own_value);
- AXIS2_EXTERN axutil_property_t* AXIS2_CALL
- axutil_property_clone(axutil_property_t *property,
- const axutil_env_t *env);
-
+ AXIS2_EXTERN axutil_property_t *AXIS2_CALL
+ axutil_property_clone(
+ axutil_property_t * property,
+ const axutil_env_t * env);
-/*************************** End of function macros ***************************/
+ /*************************** End of function macros ***************************/
/** @} */
@@ -112,4 +118,4 @@
}
#endif
-#endif /* AXIS2_PROPERTY_H */
+#endif /* AXIS2_PROPERTY_H */
Modified: webservices/axis2/trunk/c/util/include/axutil_qname.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_qname.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_qname.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_qname.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -54,30 +55,32 @@
* @return a pointer to newly created qname struct
*/
- AXIS2_EXTERN axutil_qname_t * AXIS2_CALL
- axutil_qname_create(const axutil_env_t *env,
+ AXIS2_EXTERN axutil_qname_t *AXIS2_CALL
+ axutil_qname_create(
+ const axutil_env_t * env,
const axis2_char_t * localpart,
const axis2_char_t * namespace_uri,
const axis2_char_t * prefix);
-
/**
* returns a newly created qname using a string genarated from
* axutil_qname_to_string method
* freeing the returned qname is users responsibility
*/
- AXIS2_EXTERN axutil_qname_t* AXIS2_CALL
- axutil_qname_create_from_string(const axutil_env_t *env,
- const axis2_char_t *string);
+ AXIS2_EXTERN axutil_qname_t *AXIS2_CALL
+ axutil_qname_create_from_string(
+ const axutil_env_t * env,
+ const axis2_char_t * string);
/**
* Free a qname struct
* @return Status code
*/
AXIS2_EXTERN void AXIS2_CALL
- axutil_qname_free(struct axutil_qname * qname,
- const axutil_env_t *env);
+ axutil_qname_free(
+ struct axutil_qname *qname,
+ const axutil_env_t * env);
/**
* Compare two qnames
@@ -87,9 +90,11 @@
*/
AXIS2_EXTERN axis2_bool_t AXIS2_CALL
- axutil_qname_equals(const struct axutil_qname * qname,
- const axutil_env_t *env,
- const struct axutil_qname * qname1);
+ axutil_qname_equals(
+ const struct axutil_qname *qname,
+ const axutil_env_t * env,
+ const struct axutil_qname *qname1);
+
/**
* clones a given qname
* @param qname , qname struct instance to be cloned
@@ -97,21 +102,25 @@
* @returns the newly cloned qname struct instance
*/
- AXIS2_EXTERN struct axutil_qname* AXIS2_CALL
- axutil_qname_clone(struct axutil_qname *qname,
- const axutil_env_t *env);
-
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_qname_get_uri(const struct axutil_qname *qname,
- const axutil_env_t *env);
-
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_qname_get_prefix(const struct axutil_qname *qname,
- const axutil_env_t *env);
-
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_qname_get_localpart(const struct axutil_qname *qname,
- const axutil_env_t *env);
+ AXIS2_EXTERN struct axutil_qname *AXIS2_CALL
+ axutil_qname_clone(
+ struct axutil_qname *qname,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_qname_get_uri(
+ const struct axutil_qname *qname,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_qname_get_prefix(
+ const struct axutil_qname *qname,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_qname_get_localpart(
+ const struct axutil_qname *qname,
+ const axutil_env_t * env);
/**
* returns a unique string created by concatanting namespace uri
@@ -119,9 +128,10 @@
* The string is of the form localpart|url
* The returned char* is freed when qname free function is called.
*/
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_qname_to_string(struct axutil_qname *qname,
- const axutil_env_t *env);
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_qname_to_string(
+ struct axutil_qname *qname,
+ const axutil_env_t * env);
/** @} */
@@ -129,4 +139,4 @@
}
#endif
-#endif /* AXIS2_QNAME_H */
+#endif /* AXIS2_QNAME_H */
Modified: webservices/axis2/trunk/c/util/include/axutil_rand.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_rand.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_rand.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_rand.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Copyright 2004,2005 The Apache Software Foundation.
*
@@ -27,51 +28,54 @@
{
#endif
-/**
- * @defgroup axutil_rand rand
- * @ingroup axis2_util
- * @{
- */
-
-/**
- * @file axutil_rand.h
- * @brief A simple thread safe and reentrant random number generator
- */
-
-/**
- * This is reentrant and thread safe simple random number generator
- * function. it is passed an pointer to an unsigned int state value
- * which is used inside the function and changed in each call.
- * @param seedp pointer to an unsigned int used as the internal state
- * @return int <code>int<code>
- */
-AXIS2_EXTERN int AXIS2_CALL
-axutil_rand(unsigned int *seedp);
+ /**
+ * @defgroup axutil_rand rand
+ * @ingroup axis2_util
+ * @{
+ */
+
+ /**
+ * @file axutil_rand.h
+ * @brief A simple thread safe and reentrant random number generator
+ */
+
+ /**
+ * This is reentrant and thread safe simple random number generator
+ * function. it is passed an pointer to an unsigned int state value
+ * which is used inside the function and changed in each call.
+ * @param seedp pointer to an unsigned int used as the internal state
+ * @return int <code>int<code>
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axutil_rand(
+ unsigned int *seedp);
+
+ /**
+ * This is reentrant and thread safe simple random number generator
+ * function. it is passed an pointer to an unsigned int state value
+ * which is used inside the function and changed in each call. Also
+ * it is passed a range in which the random number is selected
+ * @param seedp pointer to an unsigned int used as the internal state
+ * @param start start of the range
+ * @param end end of the range
+ * @return int If invalid range is entered -1 is returned <code>int<code>
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axutil_rand_with_range(
+ unsigned int *seedp,
+ int start,
+ int end);
+
+ /**
+ * A random seed value generated based on the time
+ */
+ AXIS2_EXTERN unsigned int AXIS2_CALL
-/**
- * This is reentrant and thread safe simple random number generator
- * function. it is passed an pointer to an unsigned int state value
- * which is used inside the function and changed in each call. Also
- * it is passed a range in which the random number is selected
- * @param seedp pointer to an unsigned int used as the internal state
- * @param start start of the range
- * @param end end of the range
- * @return int If invalid range is entered -1 is returned <code>int<code>
- */
-AXIS2_EXTERN int AXIS2_CALL
-axutil_rand_with_range(unsigned int *seedp,
- int start,
- int end);
+ axutil_rand_get_seed_value_based_on_time(
+ const axutil_env_t * env);
-/**
- * A random seed value generated based on the time
- */
-AXIS2_EXTERN unsigned int AXIS2_CALL
-axutil_rand_get_seed_value_based_on_time(
- const axutil_env_t *env);
+ /** @} */
-/** @} */
-
#ifdef __cplusplus
}
#endif
Modified: webservices/axis2/trunk/c/util/include/axutil_stack.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_stack.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_stack.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_stack.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,6 @@
#ifndef AXUTIL_STACK_H
#define AXUTIL_STACK_H
-
/**
* @file axutil_stack.h
* @brief represents a stack
@@ -40,8 +40,9 @@
typedef struct axutil_stack axutil_stack_t;
- AXIS2_EXTERN axutil_stack_t * AXIS2_CALL
- axutil_stack_create(const axutil_env_t *env);
+ AXIS2_EXTERN axutil_stack_t *AXIS2_CALL
+ axutil_stack_create(
+ const axutil_env_t * env);
/**
* Free function of the stack
@@ -49,32 +50,39 @@
* @param env environemnt
*/
AXIS2_EXTERN void AXIS2_CALL
- axutil_stack_free(axutil_stack_t *stack,
- const axutil_env_t *env);
-
- AXIS2_EXTERN void* AXIS2_CALL
- axutil_stack_pop(axutil_stack_t *stack,
- const axutil_env_t *env);
+ axutil_stack_free(
+ axutil_stack_t * stack,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN void *AXIS2_CALL
+ axutil_stack_pop(
+ axutil_stack_t * stack,
+ const axutil_env_t * env);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_stack_push(axutil_stack_t *stack,
- const axutil_env_t *env,
- void* value);
+ axutil_stack_push(
+ axutil_stack_t * stack,
+ const axutil_env_t * env,
+ void *value);
AXIS2_EXTERN int AXIS2_CALL
- axutil_stack_size(axutil_stack_t *stack,
- const axutil_env_t *env);
+ axutil_stack_size(
+ axutil_stack_t * stack,
+ const axutil_env_t * env);
+
/**
* returns the last put value from the stack
* without removing it from stack
*/
- AXIS2_EXTERN void* AXIS2_CALL
- axutil_stack_get(axutil_stack_t *stack,
- const axutil_env_t *env);
-
- AXIS2_EXTERN void* AXIS2_CALL
- axutil_stack_get_at(axutil_stack_t *stack,
- const axutil_env_t *env,
+ AXIS2_EXTERN void *AXIS2_CALL
+ axutil_stack_get(
+ axutil_stack_t * stack,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN void *AXIS2_CALL
+ axutil_stack_get_at(
+ axutil_stack_t * stack,
+ const axutil_env_t * env,
int i);
/** @} */
@@ -82,5 +90,4 @@
#ifdef __cplusplus
}
#endif
-#endif /* AXIS2_STACK_H */
-
+#endif /* AXIS2_STACK_H */
Modified: webservices/axis2/trunk/c/util/include/axutil_stream.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_stream.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_stream.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_stream.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Copyright 2004,2005 The Apache Software Foundation.
*
@@ -46,7 +47,7 @@
AXIS2_STREAM_BASIC = 0,
AXIS2_STREAM_FILE,
AXIS2_STREAM_SOCKET,
- AXIS2_STREAM_MANAGED /* Example Wrapper stream for Apache2 read mechanism */
+ AXIS2_STREAM_MANAGED /* Example Wrapper stream for Apache2 read mechanism */
};
typedef enum axutil_stream_type axutil_stream_type_t;
@@ -67,17 +68,19 @@
int axis2_eof;
- /**
- * reads from stream
- * @param buffer buffer into which the content is to be read
- * @param count size of the buffer
- * @return no: of bytes read
- */
- int(AXIS2_CALL *
- read)(axutil_stream_t *stream,
- const axutil_env_t *env,
- void *buffer,
- size_t count);
+ /**
+ * reads from stream
+ * @param buffer buffer into which the content is to be read
+ * @param count size of the buffer
+ * @return no: of bytes read
+ */
+ int(
+ AXIS2_CALL
+ * read)(
+ axutil_stream_t * stream,
+ const axutil_env_t * env,
+ void *buffer,
+ size_t count);
/**
* writes into stream
@@ -85,34 +88,40 @@
* @param count size of the buffer
* @return no: of bytes actually written
*/
- int(AXIS2_CALL *
- write)(axutil_stream_t *stream,
- const axutil_env_t *env,
- const void *buffer,
- size_t count);
+ int(
+ AXIS2_CALL
+ * write)(
+ axutil_stream_t * stream,
+ const axutil_env_t * env,
+ const void *buffer,
+ size_t count);
/**
* Skips over and discards n bytes of data from this input stream.
* @param count number of bytes to be discarded
* @return no: of bytes actually skipped
*/
- int(AXIS2_CALL *
- skip)(axutil_stream_t *stream,
- const axutil_env_t *env,
- int count);
+ int(
+ AXIS2_CALL
+ * skip)(
+ axutil_stream_t * stream,
+ const axutil_env_t * env,
+ int count);
};
- /**
- * Deletes the stream
- * @return axis2_status_t AXIS2_SUCCESS on success else AXIS2_FAILURE
- */
+ /**
+ * Deletes the stream
+ * @return axis2_status_t AXIS2_SUCCESS on success else AXIS2_FAILURE
+ */
AXIS2_EXTERN void AXIS2_CALL
- axutil_stream_free(axutil_stream_t *stream,
- const axutil_env_t *env);
+ axutil_stream_free(
+ axutil_stream_t * stream,
+ const axutil_env_t * env);
- AXIS2_EXTERN void AXIS2_CALL
- axutil_stream_free_void_arg(void *stream,
- const axutil_env_t *env);
+ AXIS2_EXTERN void AXIS2_CALL
+ axutil_stream_free_void_arg(
+ void *stream,
+ const axutil_env_t * env);
/**
* reads from stream
@@ -121,8 +130,9 @@
* @return no: of bytes read
*/
AXIS2_EXTERN int AXIS2_CALL
- axutil_stream_read(axutil_stream_t *stream,
- const axutil_env_t *env,
+ axutil_stream_read(
+ axutil_stream_t * stream,
+ const axutil_env_t * env,
void *buffer,
size_t count);
@@ -133,8 +143,9 @@
* @return no: of bytes actually written
*/
AXIS2_EXTERN int AXIS2_CALL
- axutil_stream_write(axutil_stream_t *stream,
- const axutil_env_t *env,
+ axutil_stream_write(
+ axutil_stream_t * stream,
+ const axutil_env_t * env,
const void *buffer,
size_t count);
@@ -144,8 +155,9 @@
* @return no: of bytes actually skipped
*/
AXIS2_EXTERN int AXIS2_CALL
- axutil_stream_skip(axutil_stream_t *stream,
- const axutil_env_t *env,
+ axutil_stream_skip(
+ axutil_stream_t * stream,
+ const axutil_env_t * env,
int count);
/**
@@ -154,81 +166,100 @@
* (we can't define a length of a stream unless it is just a buffer)
*/
AXIS2_EXTERN int AXIS2_CALL
- axutil_stream_get_len(axutil_stream_t *stream,
- const axutil_env_t *env);
+ axutil_stream_get_len(
+ axutil_stream_t * stream,
+ const axutil_env_t * env);
/** \brief Constructor for creating an in memory stream
* @return axutil_stream (in memory)
*/
- AXIS2_EXTERN axutil_stream_t * AXIS2_CALL
- axutil_stream_create_basic(const axutil_env_t *env);
+ AXIS2_EXTERN axutil_stream_t *AXIS2_CALL
+ axutil_stream_create_basic(
+ const axutil_env_t * env);
/** \brief Constructor for creating a file stream
* @param valid file pointer (opened file)
* @return axutil_stream (file)
*/
- AXIS2_EXTERN axutil_stream_t * AXIS2_CALL
- axutil_stream_create_file(const axutil_env_t *env, FILE *fp);
+ AXIS2_EXTERN axutil_stream_t *AXIS2_CALL
+ axutil_stream_create_file(
+ const axutil_env_t * env,
+ FILE * fp);
/** \brief Constructor for creating a file stream
* @param valid socket (opened socket)
* @return axutil_stream (socket)
*/
- AXIS2_EXTERN axutil_stream_t * AXIS2_CALL
- axutil_stream_create_socket(const axutil_env_t *env, int socket);
+ AXIS2_EXTERN axutil_stream_t *AXIS2_CALL
+ axutil_stream_create_socket(
+ const axutil_env_t * env,
+ int socket);
+
+ /**
+ *Free stream
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axutil_stream_free(
+ axutil_stream_t * stream,
+ const axutil_env_t * env);
/**
- *Free stream
- */
- AXIS2_EXTERN void AXIS2_CALL
- axutil_stream_free(axutil_stream_t *stream, const axutil_env_t *env);
-
- /**
* Free stream passed as void pointer. This will be
* cast into appropriate type and then pass the cast object
* into the module_desc structure's free method
*/
AXIS2_EXTERN void AXIS2_CALL
- axutil_stream_free_void_arg(void *stream,
- const axutil_env_t *env);
+ axutil_stream_free_void_arg(
+ void *stream,
+ const axutil_env_t * env);
/**
* Gets the buffer
*/
- AXIS2_EXTERN axis2_char_t * AXIS2_CALL
- axutil_stream_get_buffer(const axutil_stream_t *stream,
- const axutil_env_t *env);
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_stream_get_buffer(
+ const axutil_stream_t * stream,
+ const axutil_env_t * env);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_stream_flush_buffer(axutil_stream_t *stream,
- const axutil_env_t *env);
+ axutil_stream_flush_buffer(
+ axutil_stream_t * stream,
+ const axutil_env_t * env);
AXIS2_EXTERN int AXIS2_CALL
- axutil_stream_peek_socket(axutil_stream_t *stream, const axutil_env_t *env,
- void *buffer, size_t count);
+ axutil_stream_peek_socket(
+ axutil_stream_t * stream,
+ const axutil_env_t * env,
+ void *buffer,
+ size_t count);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_stream_flush(axutil_stream_t *stream,
- const axutil_env_t *env);
+ axutil_stream_flush(
+ axutil_stream_t * stream,
+ const axutil_env_t * env);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_stream_close(axutil_stream_t *stream,
- const axutil_env_t *env);
+ axutil_stream_close(
+ axutil_stream_t * stream,
+ const axutil_env_t * env);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_stream_set_read(axutil_stream_t *stream,
- const axutil_env_t *env,
+ axutil_stream_set_read(
+ axutil_stream_t * stream,
+ const axutil_env_t * env,
void *func);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_stream_set_write(axutil_stream_t *stream,
- const axutil_env_t *env,
+ axutil_stream_set_write(
+ axutil_stream_t * stream,
+ const axutil_env_t * env,
void *func);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_stream_set_skip(axutil_stream_t *stream,
- const axutil_env_t *env,
+ axutil_stream_set_skip(
+ axutil_stream_t * stream,
+ const axutil_env_t * env,
void *func);
/** @} */
Modified: webservices/axis2/trunk/c/util/include/axutil_string.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_string.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_string.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_string.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -27,7 +28,7 @@
extern "C"
{
#endif
-
+
/**
* @defgroup axutil_string string
* @ingroup axis2_util
@@ -43,10 +44,11 @@
* @param env pointer to environment struct
* @return a pointer to newly created string struct
*/
- AXIS2_EXTERN axutil_string_t * AXIS2_CALL
- axutil_string_create(const axutil_env_t *env,
- const axis2_char_t *str);
-
+ AXIS2_EXTERN axutil_string_t *AXIS2_CALL
+ axutil_string_create(
+ const axutil_env_t * env,
+ const axis2_char_t * str);
+
/**
* Creates a string struct.
* @param str pointer to string. string struct would not create a duplicate
@@ -54,20 +56,23 @@
* @param env pointer to environment struct
* @return a pointer to newly created string struct
*/
- AXIS2_EXTERN axutil_string_t * AXIS2_CALL
- axutil_string_create_assume_ownership(const axutil_env_t *env,
- axis2_char_t **str);
+ AXIS2_EXTERN axutil_string_t *AXIS2_CALL
+
+ axutil_string_create_assume_ownership(
+ const axutil_env_t * env,
+ axis2_char_t ** str);
/**
* Creates a string struct.
* @param str pointer to string. string struct would not create a duplicate
* of this and assumes the str would have longer life than that of itself
* @param env pointer to environment struct
- * @return a pointer to newly created string struct
+ * @return a pointer to newly created string struct
*/
- AXIS2_EXTERN axutil_string_t* AXIS2_CALL
- axutil_string_create_const(const axutil_env_t *env,
- axis2_char_t **str);
+ AXIS2_EXTERN axutil_string_t *AXIS2_CALL
+ axutil_string_create_const(
+ const axutil_env_t * env,
+ axis2_char_t ** str);
/**
* Frees string struct.
@@ -76,8 +81,9 @@
* @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
*/
AXIS2_EXTERN void AXIS2_CALL
- axutil_string_free(struct axutil_string *string,
- const axutil_env_t *env);
+ axutil_string_free(
+ struct axutil_string *string,
+ const axutil_env_t * env);
/**
* Compares two strings. Checks if the two strings point to the same buffer.
@@ -88,8 +94,9 @@
* @return AXIS2_TRUE if string equals string1, AXIS2_FALSE otherwise
*/
AXIS2_EXTERN axis2_bool_t AXIS2_CALL
- axutil_string_equals(const struct axutil_string *string,
- const axutil_env_t *env,
+ axutil_string_equals(
+ const struct axutil_string *string,
+ const axutil_env_t * env,
const struct axutil_string *string1);
/**
@@ -101,8 +108,9 @@
* @returns pointer to cloned string struct instance
*/
AXIS2_EXTERN struct axutil_string *AXIS2_CALL
- axutil_string_clone(struct axutil_string *string,
- const axutil_env_t *env);
+ axutil_string_clone(
+ struct axutil_string *string,
+ const axutil_env_t * env);
/**
* Gets string buffer.
@@ -110,16 +118,18 @@
* @param env pointer to environment struct
* @returns pointer to string buffer
*/
- AXIS2_EXTERN const axis2_char_t* AXIS2_CALL
- axutil_string_get_buffer(const struct axutil_string *string,
- const axutil_env_t *env);
+ AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+ axutil_string_get_buffer(
+ const struct axutil_string *string,
+ const axutil_env_t * env);
/**
* Gets string length. * @param string pointer to string struct * @param env pointer to environment struct * @returns buffer length */
AXIS2_EXTERN unsigned int AXIS2_CALL
- axutil_string_get_length(const struct axutil_string *string,
- const axutil_env_t *env);
-
+ axutil_string_get_length(
+ const struct axutil_string *string,
+ const axutil_env_t * env);
+
/** @} */
/**
@@ -128,9 +138,10 @@
* @{
*/
- AXIS2_EXTERN void* AXIS2_CALL
- axutil_strdup(const axutil_env_t *env,
- const void *ptr);
+ AXIS2_EXTERN void *AXIS2_CALL
+ axutil_strdup(
+ const axutil_env_t * env,
+ const void *ptr);
/**
* duplicate the first n characters of a string into memory allocated
@@ -139,9 +150,10 @@
* @param n The number of characters to duplicate
* @return The new string
*/
- AXIS2_EXTERN void* AXIS2_CALL
- axutil_strndup(const axutil_env_t *env,
- const void *ptr,
+ AXIS2_EXTERN void *AXIS2_CALL
+ axutil_strndup(
+ const axutil_env_t * env,
+ const void *ptr,
int n);
/**
@@ -155,35 +167,42 @@
* has 'n' or more characters. If the string might contain
* fewer characters, use axis2_strndup.
*/
- AXIS2_EXTERN void * AXIS2_CALL
- axutil_strmemdup(const void *ptr,
+ AXIS2_EXTERN void *AXIS2_CALL
+ axutil_strmemdup(
+ const void *ptr,
size_t n,
- const axutil_env_t *env);
+ const axutil_env_t * env);
- AXIS2_EXTERN void * AXIS2_CALL
- axutil_memchr(const void *ptr,
+ AXIS2_EXTERN void *AXIS2_CALL
+ axutil_memchr(
+ const void *ptr,
int c,
size_t n);
AXIS2_EXTERN int AXIS2_CALL
- axutil_strcmp(const axis2_char_t * s1,
+ axutil_strcmp(
+ const axis2_char_t * s1,
const axis2_char_t * s2);
AXIS2_EXTERN int AXIS2_CALL
- axutil_strncmp(const axis2_char_t * s1,
+ axutil_strncmp(
+ const axis2_char_t * s1,
const axis2_char_t * s2,
int n);
AXIS2_EXTERN axis2_ssize_t AXIS2_CALL
- axutil_strlen(const axis2_char_t * s);
+ axutil_strlen(
+ const axis2_char_t * s);
AXIS2_EXTERN int AXIS2_CALL
- axutil_strcasecmp(const axis2_char_t *s1,
- const axis2_char_t *s2);
+ axutil_strcasecmp(
+ const axis2_char_t * s1,
+ const axis2_char_t * s2);
AXIS2_EXTERN int AXIS2_CALL
- axutil_strncasecmp(const axis2_char_t *s1,
- const axis2_char_t *s2,
+ axutil_strncasecmp(
+ const axis2_char_t * s1,
+ const axis2_char_t * s2,
const int n);
/* much similar to the strcat behaviour. But the difference is
@@ -191,23 +210,27 @@
* modifying the first argument. The user should free the allocated
* memory for the return value
*/
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_stracat(const axutil_env_t *env,
- const axis2_char_t *s1,
- const axis2_char_t *s2);
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_stracat(
+ const axutil_env_t * env,
+ const axis2_char_t * s1,
+ const axis2_char_t * s2);
/**
* Concatenate multiple strings, allocating memory
* @param ... The strings to concatenate. The final string must be NULL
* @return The new string
*/
- AXIS2_EXTERN axis2_char_t * AXIS2_CALL
- axutil_strcat(const axutil_env_t *env, ...);
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_strcat(
+ const axutil_env_t * env,
+ ...);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_strstr(
+ const axis2_char_t * heystack,
+ const axis2_char_t * needle);
- AXIS2_EXTERN axis2_char_t * AXIS2_CALL
- axutil_strstr(const axis2_char_t *heystack,
- const axis2_char_t *needle);
-
/**
* Finds the first occurrence of a character in a string
* @param s String in which the character is searched
@@ -215,35 +238,41 @@
* @return Pointer to to the first occurence of the charecter if it could
* be found in the string, NULL otherwise
*/
- AXIS2_EXTERN axis2_char_t * AXIS2_CALL
- axutil_strchr(const axis2_char_t *s,
- axis2_char_t ch);
-
- AXIS2_EXTERN axis2_char_t * AXIS2_CALL
- axutil_rindex(const axis2_char_t *s,
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_strchr(
+ const axis2_char_t * s,
+ axis2_char_t ch);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_rindex(
+ const axis2_char_t * s,
axis2_char_t c);
/* replaces s1 with s2 */
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_replace(const axutil_env_t *env,
- axis2_char_t *str,
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_replace(
+ const axutil_env_t * env,
+ axis2_char_t * str,
int s1,
int s2);
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_strltrim(const axutil_env_t *env,
- const axis2_char_t *_s,
- const axis2_char_t *_trim);
-
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_strrtrim(const axutil_env_t *env,
- const axis2_char_t *_s,
- const axis2_char_t *_trim);
-
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_strtrim(const axutil_env_t *env,
- const axis2_char_t *_s,
- const axis2_char_t *_trim);
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_strltrim(
+ const axutil_env_t * env,
+ const axis2_char_t * _s,
+ const axis2_char_t * _trim);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_strrtrim(
+ const axutil_env_t * env,
+ const axis2_char_t * _s,
+ const axis2_char_t * _trim);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_strtrim(
+ const axutil_env_t * env,
+ const axis2_char_t * _s,
+ const axis2_char_t * _trim);
/**
* replace given axis2_character with a new one.
@@ -252,8 +281,9 @@
* @param new_char new axis2_char_tacter
* @return replaced string
*/
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_string_replace(axis2_char_t *str,
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_string_replace(
+ axis2_char_t * str,
axis2_char_t old_char,
axis2_char_t new_char);
@@ -263,8 +293,10 @@
* @param c starting index
* @return substring
*/
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_string_substring_starting_at(axis2_char_t *str,
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+
+ axutil_string_substring_starting_at(
+ axis2_char_t * str,
int s);
/**
@@ -273,8 +305,9 @@
* @param c ending index
* @return substring
*/
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_string_substring_ending_at(axis2_char_t *str,
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_string_substring_ending_at(
+ axis2_char_t * str,
int e);
/**
@@ -282,16 +315,18 @@
* @param str string
* @return string with lowercase
*/
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_string_tolower(axis2_char_t *str);
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_string_tolower(
+ axis2_char_t * str);
/**
* set a string to uppercase.
* @param str string
* @return string with uppercase
*/
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_string_toupper(axis2_char_t *str);
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_string_toupper(
+ axis2_char_t * str);
/**
* Finds the first occurrence of the substring needle in the string
@@ -301,9 +336,10 @@
* @return pointer to the beginning of the substring,
* or NULL if the substring is not found
*/
- AXIS2_EXTERN axis2_char_t * AXIS2_CALL
- axutil_strcasestr(const axis2_char_t *heystack,
- const axis2_char_t *needle);
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_strcasestr(
+ const axis2_char_t * heystack,
+ const axis2_char_t * needle);
/** @} */
Modified: webservices/axis2/trunk/c/util/include/axutil_string_util.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_string_util.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_string_util.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_string_util.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -25,24 +26,25 @@
{
#endif
- AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL
- axutil_tokenize(const axutil_env_t *env,
- axis2_char_t *in,
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axutil_tokenize(
+ const axutil_env_t * env,
+ axis2_char_t * in,
int delim);
- AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL
- axutil_first_token(const axutil_env_t *env,
- axis2_char_t *in,
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axutil_first_token(
+ const axutil_env_t * env,
+ axis2_char_t * in,
int delim);
- AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL
- axutil_last_token(const axutil_env_t *env,
- axis2_char_t *in,
+ AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+ axutil_last_token(
+ const axutil_env_t * env,
+ axis2_char_t * in,
int delim);
#ifdef __cplusplus
}
#endif
-#endif /* AXIS2_STRING_UTIL_H */
-
-
+#endif /* AXIS2_STRING_UTIL_H */
Modified: webservices/axis2/trunk/c/util/include/axutil_thread.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_thread.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_thread.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_thread.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,6 @@
#ifndef AXUTIL_THREAD_H
#define AXUTIL_THREAD_H
-
/**
* @file axutil_thread.h
* @brief axis2 thread api
@@ -28,8 +28,6 @@
#include <axutil_utils_defines.h>
#include <axutil_error.h>
-
-
#ifdef __cplusplus
extern "C"
{
@@ -45,24 +43,27 @@
* Thread callbacks from axis2 functions must be declared with AXIS2_THREAD_FUNC
* so that they follow the platform's calling convention.
*/
- /*#define AXIS2_THREAD_FUNC*/
+ /*#define AXIS2_THREAD_FUNC */
/** Thread structure. */
- typedef struct axutil_thread_t axutil_thread_t;
+ typedef struct axutil_thread_t axutil_thread_t;
/** Thread attributes structure. */
- typedef struct axutil_threadattr_t axutil_threadattr_t;
+ typedef struct axutil_threadattr_t axutil_threadattr_t;
/** Control variable for one-time atomic variables. */
- typedef struct axutil_thread_once_t axutil_thread_once_t;
+ typedef struct axutil_thread_once_t axutil_thread_once_t;
/**
* The prototype for any AXIS2 thread worker functions.
*/
- typedef void *(AXIS2_THREAD_FUNC *axutil_thread_start_t)(axutil_thread_t*, void*);
+ typedef void *(
+ AXIS2_THREAD_FUNC * axutil_thread_start_t)(
+ axutil_thread_t *,
+ void *);
/** Thread private address space. */
- typedef struct axutil_threadkey_t axutil_threadkey_t;
+ typedef struct axutil_threadkey_t axutil_threadkey_t;
/* Thread Function definitions */
@@ -71,8 +72,9 @@
* @param cont The pool to use
* @return Newly created thread attribute
*/
- AXIS2_EXTERN axutil_threadattr_t* AXIS2_CALL
- axutil_threadattr_create(axutil_allocator_t *allocator);
+ AXIS2_EXTERN axutil_threadattr_t *AXIS2_CALL
+ axutil_threadattr_create(
+ axutil_allocator_t * allocator);
/**
* Set if newly created threads should be created in detached state.
@@ -81,7 +83,8 @@
* @return The status of the operation
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_threadattr_detach_set(axutil_threadattr_t *attr,
+ axutil_threadattr_detach_set(
+ axutil_threadattr_t * attr,
axis2_bool_t detached);
/**
@@ -91,9 +94,9 @@
* if threads are to be joinable.
*/
AXIS2_EXTERN axis2_bool_t AXIS2_CALL
- axutil_threadattr_is_detach(axutil_threadattr_t *attr,
- axutil_allocator_t *allocator);
-
+ axutil_threadattr_is_detach(
+ axutil_threadattr_t * attr,
+ axutil_allocator_t * allocator);
/**
* Create a new thread of execution
@@ -103,10 +106,12 @@
* @param cont The pool to use
* @return The newly created thread handle.
*/
- AXIS2_EXTERN axutil_thread_t* AXIS2_CALL
- axutil_thread_create(axutil_allocator_t *allocator,
- axutil_threadattr_t *attr,
- axutil_thread_start_t func, void *data);
+ AXIS2_EXTERN axutil_thread_t *AXIS2_CALL
+ axutil_thread_create(
+ axutil_allocator_t * allocator,
+ axutil_threadattr_t * attr,
+ axutil_thread_start_t func,
+ void *data);
/**
* Stop the current thread
@@ -114,8 +119,9 @@
* @return The status of the operation
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_thread_exit(axutil_thread_t *thd,
- axutil_allocator_t *allocator);
+ axutil_thread_exit(
+ axutil_thread_t * thd,
+ axutil_allocator_t * allocator);
/**
* Block until the desired thread stops executing.
@@ -123,21 +129,24 @@
* @return The status of the operation
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_thread_join(axutil_thread_t *thd);
+ axutil_thread_join(
+ axutil_thread_t * thd);
/**
* force the current thread to yield the processor
*/
AXIS2_EXTERN void AXIS2_CALL
- axutil_thread_yield();
+ axutil_thread_yield(
+ );
/**
* Initialize the control variable for axutil_thread_once.
* @param control The control variable to initialize
* @return The status of the operation
*/
- AXIS2_EXTERN axutil_thread_once_t* AXIS2_CALL
- axutil_thread_once_init(axutil_allocator_t *allocator);
+ AXIS2_EXTERN axutil_thread_once_t *AXIS2_CALL
+ axutil_thread_once_init(
+ axutil_allocator_t * allocator);
/**
* Run the specified function one time, regardless of how many threads
@@ -150,7 +159,8 @@
* @return The status of the operation
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_thread_once(axutil_thread_once_t *control,
+ axutil_thread_once(
+ axutil_thread_once_t * control,
void(*func)(void));
/**
@@ -159,7 +169,8 @@
* @return The status of the operation
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_thread_detach(axutil_thread_t *thd);
+ axutil_thread_detach(
+ axutil_thread_t * thd);
/*************************Thread locking functions*****************************/
@@ -167,7 +178,9 @@
typedef struct axutil_thread_mutex_t axutil_thread_mutex_t;
#define AXIS2_THREAD_MUTEX_DEFAULT 0x0 /**< platform-optimal lock behavior */
+
#define AXIS2_THREAD_MUTEX_NESTED 0x1 /**< enable nested (recursive) locks */
+
#define AXIS2_THREAD_MUTEX_UNNESTED 0x2 /**< disable nested locks */
/**
@@ -177,16 +190,20 @@
* most optimial mutex based on a given platform's performance charateristics,
* it will behave as either a nested or an unnested lock.
*/
- AXIS2_EXTERN axutil_thread_mutex_t * AXIS2_CALL
- axutil_thread_mutex_create(axutil_allocator_t *allocator,
+ AXIS2_EXTERN axutil_thread_mutex_t *AXIS2_CALL
+
+ axutil_thread_mutex_create(
+ axutil_allocator_t * allocator,
unsigned int flags);
+
/**
* Acquire the lock for the given mutex. If the mutex is already locked,
* the current thread will be put to sleep until the lock becomes available.
* @param mutex the mutex on which to acquire the lock.
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_thread_mutex_lock(axutil_thread_mutex_t *mutex);
+ axutil_thread_mutex_lock(
+ axutil_thread_mutex_t * mutex);
/**
* Attempt to acquire the lock for the given mutex. If the mutex has already
@@ -194,21 +211,24 @@
* @param mutex the mutex on which to attempt the lock acquiring.
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_thread_mutex_trylock(axutil_thread_mutex_t *mutex);
+ axutil_thread_mutex_trylock(
+ axutil_thread_mutex_t * mutex);
/**
* Release the lock for the given mutex.
* @param mutex the mutex from which to release the lock.
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_thread_mutex_unlock(axutil_thread_mutex_t *mutex);
+ axutil_thread_mutex_unlock(
+ axutil_thread_mutex_t * mutex);
/**
* Destroy the mutex and free the memory associated with the lock.
* @param mutex the mutex to destroy.
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_thread_mutex_destroy(axutil_thread_mutex_t *mutex);
+ axutil_thread_mutex_destroy(
+ axutil_thread_mutex_t * mutex);
/** @} */
#ifdef __cplusplus
Modified: webservices/axis2/trunk/c/util/include/axutil_thread_pool.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_thread_pool.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_thread_pool.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_thread_pool.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -48,17 +49,20 @@
* @return pointer to a thread in ready state.
*/
AXIS2_EXTERN axutil_thread_t *AXIS2_CALL
- axutil_thread_pool_get_thread(axutil_thread_pool_t *pool,
- axutil_thread_start_t func,
- void *data);
+ axutil_thread_pool_get_thread(
+ axutil_thread_pool_t * pool,
+ axutil_thread_start_t func,
+ void *data);
+
/**
* Blocks until the desired thread stops executing.
* @param thd The thread to joined
* @return status of the operation
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_thread_pool_join_thread(axutil_thread_pool_t *pool,
- axutil_thread_t *thd);
+ axutil_thread_pool_join_thread(
+ axutil_thread_pool_t * pool,
+ axutil_thread_t * thd);
/**
* Stop the execution of current thread
@@ -66,46 +70,52 @@
* @return status of the operation
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_thread_pool_exit_thread(axutil_thread_pool_t *pool,
- axutil_thread_t *thd);
-
+ axutil_thread_pool_exit_thread(
+ axutil_thread_pool_t * pool,
+ axutil_thread_t * thd);
+
/**
* Detaches a thread
* @param thd thread to be detached
* @return status of the operation
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_thread_pool_thread_detach(axutil_thread_pool_t *pool,
- axutil_thread_t *thd);
+ axutil_thread_pool_thread_detach(
+ axutil_thread_pool_t * pool,
+ axutil_thread_t * thd);
/**
* Frees resources used by thread_pool
* @param pool thread_pool to be freed
*/
AXIS2_EXTERN void AXIS2_CALL
- axutil_thread_pool_free(axutil_thread_pool_t *pool);
+ axutil_thread_pool_free(
+ axutil_thread_pool_t * pool);
/**
* Initializes (creates) an thread_pool.
* @param allocator user defined allocator for the memory allocation.
* @return initialized thread_pool. NULL on error.
*/
- AXIS2_EXTERN axutil_thread_pool_t * AXIS2_CALL
- axutil_thread_pool_init(axutil_allocator_t *allocator);
+ AXIS2_EXTERN axutil_thread_pool_t *AXIS2_CALL
+ axutil_thread_pool_init(
+ axutil_allocator_t * allocator);
/**
* This function can be used to initialize the environment in case of
* spawning a new thread via a thread function
*/
- AXIS2_EXTERN struct axutil_env * AXIS2_CALL
- axutil_init_thread_env(const struct axutil_env *system_env);
+ AXIS2_EXTERN struct axutil_env *AXIS2_CALL
+ axutil_init_thread_env(
+ const struct axutil_env *system_env);
/**
* This function can be used to free the environment that was used
* in a thread function
*/
AXIS2_EXTERN void AXIS2_CALL
- axutil_free_thread_env(struct axutil_env *thread_env);
+ axutil_free_thread_env(
+ struct axutil_env *thread_env);
/** @} */
@@ -113,4 +123,4 @@
}
#endif
-#endif /* AXIS2_THREAD_POOL_H */
+#endif /* AXIS2_THREAD_POOL_H */
Modified: webservices/axis2/trunk/c/util/include/axutil_types.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_types.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_types.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_types.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -34,7 +35,8 @@
*/
AXIS2_EXTERN int AXIS2_CALL
- axutil_atoi(const char *s);
+ axutil_atoi(
+ const char *s);
#define AXIS2_ATOI(s) axutil_atoi(s)
@@ -45,4 +47,3 @@
#endif
#endif /* AXIS2_TYPES_H */
-
Modified: webservices/axis2/trunk/c/util/include/axutil_uri.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_uri.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_uri.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_uri.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -41,43 +42,67 @@
*/
#define AXIS2_URI_FTP_DEFAULT_PORT 21 /**< default FTP port */
+
#define AXIS2_URI_SSH_DEFAULT_PORT 22 /**< default SSH port */
+
#define AXIS2_URI_TELNET_DEFAULT_PORT 23 /**< default telnet port */
+
#define AXIS2_URI_GOPHER_DEFAULT_PORT 70 /**< default Gopher port */
+
#define AXIS2_URI_HTTP_DEFAULT_PORT 80 /**< default HTTP port */
+
#define AXIS2_URI_POP_DEFAULT_PORT 110 /**< default POP port */
+
#define AXIS2_URI_NNTP_DEFAULT_PORT 119 /**< default NNTP port */
+
#define AXIS2_URI_IMAP_DEFAULT_PORT 143 /**< default IMAP port */
+
#define AXIS2_URI_PROSPERO_DEFAULT_PORT 191 /**< default Prospero port */
+
#define AXIS2_URI_WAIS_DEFAULT_PORT 210 /**< default WAIS port */
+
#define AXIS2_URI_LDAP_DEFAULT_PORT 389 /**< default LDAP port */
+
#define AXIS2_URI_HTTPS_DEFAULT_PORT 443 /**< default HTTPS port */
+
#define AXIS2_URI_RTSP_DEFAULT_PORT 554 /**< default RTSP port */
+
#define AXIS2_URI_SNEWS_DEFAULT_PORT 563 /**< default SNEWS port */
+
#define AXIS2_URI_ACAP_DEFAULT_PORT 674 /**< default ACAP port */
+
#define AXIS2_URI_NFS_DEFAULT_PORT 2049 /**< default NFS port */
+
#define AXIS2_URI_TIP_DEFAULT_PORT 3372 /**< default TIP port */
+
#define AXIS2_URI_SIP_DEFAULT_PORT 5060 /**< default SIP port */
/** Flags passed to unparse_uri_components(): */
+
/** suppress "scheme://user\@site:port" */
#define AXIS2_URI_UNP_OMITSITEPART (1U<<0)
+
/** Just omit user */
#define AXIS2_URI_UNP_OMITUSER (1U<<1)
+
/** Just omit password */
#define AXIS2_URI_UNP_OMITPASSWORD (1U<<2)
+
/** omit "user:password\@" part */
#define AXIS2_URI_UNP_OMITUSERINFO (AXIS2_URI_UNP_OMITUSER | \
AXIS2_URI_UNP_OMITPASSWORD)
+
/** Show plain text password (default: show XXXXXXXX) */
#define AXIS2_URI_UNP_REVEALPASSWORD (1U<<3)
+
/** Show "scheme://user\@site:port" only */
#define AXIS2_URI_UNP_OMITPATHINFO (1U<<4)
+
/** Omit the "?queryarg" from the path */
#define AXIS2_URI_UNP_OMITQUERY (1U<<5)
/** @see axutil_uri_t */
- typedef unsigned short axis2_port_t;
+ typedef unsigned short axis2_port_t;
/* axutil_uri.c */
typedef struct axutil_uri axutil_uri_t;
@@ -90,7 +115,7 @@
*/
AXIS2_EXTERN axis2_port_t AXIS2_CALL
axutil_uri_port_of_scheme(
- const axis2_char_t *scheme_str);
+ const axis2_char_t * scheme_str);
/**
* Parse a given URI, fill in all supplied fields of a axutil_uri_t
@@ -102,8 +127,8 @@
*/
AXIS2_EXTERN axutil_uri_t *AXIS2_CALL
axutil_uri_parse_string(
- const axutil_env_t *env,
- const axis2_char_t *uri);
+ const axutil_env_t * env,
+ const axis2_char_t * uri);
/**
* Special case for CONNECT parsing: it comes with the hostinfo part only
@@ -113,15 +138,15 @@
*/
AXIS2_EXTERN axutil_uri_t *AXIS2_CALL
axutil_uri_parse_hostinfo(
- const axutil_env_t *env,
- const axis2_char_t *hostinfo);
+ const axutil_env_t * env,
+ const axis2_char_t * hostinfo);
/** Resolve relative to a base. This means host/etc, and (crucially) path */
AXIS2_EXTERN axutil_uri_t *AXIS2_CALL
axutil_uri_resolve_relative(
- const axutil_env_t *env,
- const axutil_uri_t* base,
- axutil_uri_t* uptr);
+ const axutil_env_t * env,
+ const axutil_uri_t * base,
+ axutil_uri_t * uptr);
/**
* Return a URI created from a context URI and a relative URI.
@@ -137,13 +162,14 @@
*/
AXIS2_EXTERN axutil_uri_t *AXIS2_CALL
axutil_uri_parse_relative(
- const axutil_env_t *env,
- const axutil_uri_t* base,
- const char* uri);
+ const axutil_env_t * env,
+ const axutil_uri_t * base,
+ const char *uri);
AXIS2_EXTERN void AXIS2_CALL
- axutil_uri_free(axutil_uri_t *uri,
- const axutil_env_t *env);
+ axutil_uri_free(
+ axutil_uri_t * uri,
+ const axutil_env_t * env);
/**
* Unparse a axutil_uri_t structure to an URI string. Optionally
@@ -161,35 +187,40 @@
* </PRE>
* @return The uri as a string
*/
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_uri_to_string(const axutil_uri_t *uri,
- const axutil_env_t *env,
- unsigned flags);
-
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_uri_get_protocol(axutil_uri_t *uri,
- const axutil_env_t *env);
-
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_uri_get_server(axutil_uri_t *uri,
- const axutil_env_t *env);
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_uri_to_string(
+ const axutil_uri_t * uri,
+ const axutil_env_t * env,
+ unsigned flags);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_uri_get_protocol(
+ axutil_uri_t * uri,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_uri_get_server(
+ axutil_uri_t * uri,
+ const axutil_env_t * env);
AXIS2_EXTERN axis2_port_t AXIS2_CALL
- axutil_uri_get_port(axutil_uri_t *uri,
- const axutil_env_t *env);
-
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_uri_get_path(axutil_uri_t *uri,
- const axutil_env_t *env);
-
- AXIS2_EXTERN axutil_uri_t* AXIS2_CALL
- axutil_uri_clone(const axutil_uri_t *uri,
- const axutil_env_t *env);
+ axutil_uri_get_port(
+ axutil_uri_t * uri,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_uri_get_path(
+ axutil_uri_t * uri,
+ const axutil_env_t * env);
+ AXIS2_EXTERN axutil_uri_t *AXIS2_CALL
+ axutil_uri_clone(
+ const axutil_uri_t * uri,
+ const axutil_env_t * env);
/** @} */
#ifdef __cplusplus
}
#endif
-#endif /* AXIS2_URI_H */
+#endif /* AXIS2_URI_H */
Modified: webservices/axis2/trunk/c/util/include/axutil_url.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_url.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_url.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_url.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,6 @@
#ifndef AXUTIL_URL_H
#define AXUTIL_URL_H
-
/**
* @file axutil_url.h
* @brief axis2 URL container implementation
@@ -41,71 +41,82 @@
typedef struct axutil_url axutil_url_t;
- AXIS2_EXTERN axutil_url_t * AXIS2_CALL
+ AXIS2_EXTERN axutil_url_t *AXIS2_CALL
axutil_url_create(
- const axutil_env_t *env,
- const axis2_char_t *protocol,
- const axis2_char_t *server,
+ const axutil_env_t * env,
+ const axis2_char_t * protocol,
+ const axis2_char_t * server,
const int port,
- const axis2_char_t *path);
+ const axis2_char_t * path);
- AXIS2_EXTERN axutil_url_t * AXIS2_CALL
+ AXIS2_EXTERN axutil_url_t *AXIS2_CALL
axutil_url_parse_string(
- const axutil_env_t *env,
- const axis2_char_t *str_url);
+ const axutil_env_t * env,
+ const axis2_char_t * str_url);
AXIS2_EXTERN axutil_uri_t *AXIS2_CALL
axutil_url_to_uri(
- axutil_url_t *url,
- const axutil_env_t *env);
+ axutil_url_t * url,
+ const axutil_env_t * env);
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_url_to_external_form(axutil_url_t *url,
- const axutil_env_t *env);
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_url_to_external_form(
+ axutil_url_t * url,
+ const axutil_env_t * env);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_url_set_protocol(axutil_url_t *url,
- const axutil_env_t *env,
- axis2_char_t *protocol);
-
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_url_get_protocol(axutil_url_t *url,
- const axutil_env_t *env);
+ axutil_url_set_protocol(
+ axutil_url_t * url,
+ const axutil_env_t * env,
+ axis2_char_t * protocol);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_url_get_protocol(
+ axutil_url_t * url,
+ const axutil_env_t * env);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_url_set_server(axutil_url_t *url,
- const axutil_env_t *env,
- axis2_char_t *server);
-
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_url_get_server(axutil_url_t *url,
- const axutil_env_t *env);
+ axutil_url_set_server(
+ axutil_url_t * url,
+ const axutil_env_t * env,
+ axis2_char_t * server);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_url_get_server(
+ axutil_url_t * url,
+ const axutil_env_t * env);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_url_set_port(axutil_url_t *url,
- const axutil_env_t *env,
+ axutil_url_set_port(
+ axutil_url_t * url,
+ const axutil_env_t * env,
int port);
AXIS2_EXTERN int AXIS2_CALL
- axutil_url_get_port(axutil_url_t *url,
- const axutil_env_t *env);
+ axutil_url_get_port(
+ axutil_url_t * url,
+ const axutil_env_t * env);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- axutil_url_set_path(axutil_url_t *url,
- const axutil_env_t *env,
- axis2_char_t *path);
-
- AXIS2_EXTERN axis2_char_t* AXIS2_CALL
- axutil_url_get_path(axutil_url_t *url,
- const axutil_env_t *env);
-
- AXIS2_EXTERN axutil_url_t* AXIS2_CALL
- axutil_url_clone(axutil_url_t *url,
- const axutil_env_t *env);
+ axutil_url_set_path(
+ axutil_url_t * url,
+ const axutil_env_t * env,
+ axis2_char_t * path);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ axutil_url_get_path(
+ axutil_url_t * url,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axutil_url_t *AXIS2_CALL
+ axutil_url_clone(
+ axutil_url_t * url,
+ const axutil_env_t * env);
AXIS2_EXTERN void AXIS2_CALL
- axutil_url_free(axutil_url_t *url,
- const axutil_env_t *env);
+ axutil_url_free(
+ axutil_url_t * url,
+ const axutil_env_t * env);
/** @} */
#ifdef __cplusplus
@@ -113,4 +124,3 @@
#endif
#endif /* AXIS2_URL_H */
-
Modified: webservices/axis2/trunk/c/util/include/axutil_utils.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_utils.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_utils.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_utils.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -29,27 +30,26 @@
{
#endif
-/**
- * @defgroup axutil_utils utils
- * @ingroup axis2_util
- * @{
- */
-
-/**
- * @file axutil_utils.h
- */
+ /**
+ * @defgroup axutil_utils utils
+ * @ingroup axis2_util
+ * @{
+ */
+ /**
+ * @file axutil_utils.h
+ */
-/** This macro is called to check whether structure on which function is called
- * is NULL and to check whether the environment structure passed is valid.
- * @param object structure on which function is called
- * @param env environment to be checked for validity
- * @param error_return If function return a status it should pass here
- * AXIS2_FAILURE. If function return a type pointer it should
- * pass NULL
- * @return If function return a status code return AXIS2_SUCCESS. Else if
- * function return a type pointer return NULL
- */
+ /** This macro is called to check whether structure on which function is called
+ * is NULL and to check whether the environment structure passed is valid.
+ * @param object structure on which function is called
+ * @param env environment to be checked for validity
+ * @param error_return If function return a status it should pass here
+ * AXIS2_FAILURE. If function return a type pointer it should
+ * pass NULL
+ * @return If function return a status code return AXIS2_SUCCESS. Else if
+ * function return a type pointer return NULL
+ */
#define AXIS2_FUNC_PARAM_CHECK(object, env, error_return) \
AXIS2_ENV_CHECK(env, error_return);\
if (!object) \
@@ -62,16 +62,16 @@
{ \
AXIS2_ERROR_SET_STATUS_CODE(env->error, AXIS2_SUCCESS); \
}
-
-/**This macro is called to check whether an object is NULL.
- * if object is NULL error number and status code is set
- * @param object object to be check for NULL
- * @param error_return If function return a status it should pass here
- * AXIS2_FAILURE. If function return a type pointer it should
- * pass NULL
- * @return If function return a status code return AXIS2_SUCCESS. Else if
- * function return a type pointer return NULL
- */
+
+ /**This macro is called to check whether an object is NULL.
+ * if object is NULL error number and status code is set
+ * @param object object to be check for NULL
+ * @param error_return If function return a status it should pass here
+ * AXIS2_FAILURE. If function return a type pointer it should
+ * pass NULL
+ * @return If function return a status code return AXIS2_SUCCESS. Else if
+ * function return a type pointer return NULL
+ */
#define AXIS2_PARAM_CHECK(error, object, error_return) \
if (!object) \
{ \
@@ -82,48 +82,61 @@
else \
{ \
AXIS2_ERROR_SET_STATUS_CODE(error, AXIS2_SUCCESS); \
- }
+ }
-/**This macro is used to handle error situation.
- * @param error_number Error number for the error occured
- * @param error_return If function return a status it should pass here
- * AXIS2_FAILURE. If function return a type pointer it should
- * pass NULL
- * @return If function return a status code return AXIS2_SUCCESS. Else if
- * function return a type pointer return NULL
- */
+ /**This macro is used to handle error situation.
+ * @param error_number Error number for the error occured
+ * @param error_return If function return a status it should pass here
+ * AXIS2_FAILURE. If function return a type pointer it should
+ * pass NULL
+ * @return If function return a status code return AXIS2_SUCCESS. Else if
+ * function return a type pointer return NULL
+ */
#define AXIS2_ERROR_SET(error, error_number, status_code) \
{ \
AXIS2_ERROR_SET_ERROR_NUMBER(error, error_number); \
AXIS2_ERROR_SET_STATUS_CODE(error, status_code); \
- }
-
+ }
-/** Method names in the loadable libraries */
+ /** Method names in the loadable libraries */
#define AXIS2_CREATE_FUNCTION "axis2_get_instance"
#define AXIS2_DELETE_FUNCTION "axis2_remove_instance"
-typedef void (AXIS2_CALL *AXIS2_FREE_VOID_ARG) (void *obj_to_be_freed,
- const axutil_env_t *env);
-
-/* Function pointer typedef for read callback */
-typedef int (AXIS2_CALL *AXIS2_READ_INPUT_CALLBACK)(char *buffer, int size,
- void* ctx);
-/* Function pointer typedef for close callback */
-typedef int (AXIS2_CALL *AXIS2_CLOSE_INPUT_CALLBACK)(void *ctx);
-
-/**
- * \brief Axis2 scopes
- *
- * Possible scope value for Axis2
- */
+ typedef void(
+ AXIS2_CALL
+ * AXIS2_FREE_VOID_ARG)(
+ void *obj_to_be_freed,
+ const axutil_env_t * env);
+
+ /* Function pointer typedef for read callback */
+ typedef int(
+ AXIS2_CALL
+ * AXIS2_READ_INPUT_CALLBACK)(
+ char *buffer,
+ int size,
+ void *ctx);
+
+ /* Function pointer typedef for close callback */
+ typedef int(
+ AXIS2_CALL
+ * AXIS2_CLOSE_INPUT_CALLBACK)(
+ void *ctx);
+
+ /**
+ * \brief Axis2 scopes
+ *
+ * Possible scope value for Axis2
+ */
enum axis2_scopes
{
+
/** Request scope */
AXIS2_SCOPE_REQUEST = 0,
+
/** Session scope */
AXIS2_SCOPE_SESSION,
+
/** Application scope */
AXIS2_SCOPE_APPLICATION
};
@@ -140,9 +153,12 @@
* @param request url
* @return axis2_char_t ** <code>axis2_char_t **<code>
*/
- AXIS2_EXTERN axis2_char_t** AXIS2_CALL
- axutil_parse_request_url_for_svc_and_op(const axutil_env_t *env, const axis2_char_t *request);
-
+ AXIS2_EXTERN axis2_char_t **AXIS2_CALL
+
+ axutil_parse_request_url_for_svc_and_op(
+ const axutil_env_t * env,
+ const axis2_char_t * request);
+
/**
* Quotes an XML string.
* Replace '<', '>', and '&' with '<', '>', and '&'.
@@ -158,15 +174,14 @@
*/
AXIS2_EXTERN axis2_char_t *AXIS2_CALL
axutil_xml_quote_string(
- const axutil_env_t *env,
- const axis2_char_t *s,
+ const axutil_env_t * env,
+ const axis2_char_t * s,
axis2_bool_t quotes);
-
-/** @} */
-
+
+ /** @} */
+
#ifdef __cplusplus
}
#endif
#endif /* AXIS2_UTILS_H */
-
Modified: webservices/axis2/trunk/c/util/include/axutil_utils_defines.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_utils_defines.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_utils_defines.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_utils_defines.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -25,9 +26,9 @@
{
#endif
-/**
- * Type definitions
- */
+ /**
+ * Type definitions
+ */
typedef char axis2_char_t;
typedef int axis2_bool_t;
typedef int axis2_status_t;
@@ -37,137 +38,144 @@
#define AXIS2_CRLF_LENGTH 2
-/* These constant definitions should later be moved to platform dependant
- * files
- */
+ /* These constant definitions should later be moved to platform dependant
+ * files
+ */
#define AXIS2_EOLN '\0'
-
-/**
- * Boolean values
- */
+
+ /**
+ * Boolean values
+ */
#define AXIS2_TRUE 1
#define AXIS2_FALSE 0
-
-/**
- * Exporting
- */
+ /**
+ * Exporting
+ */
#if defined(WIN32)
#define AXIS2_EXPORT __declspec(dllexport)
#else
#define AXIS2_EXPORT
#endif
-/**
- * Importing
- */
+ /**
+ * Importing
+ */
#if defined(WIN32)
#define AXIS2_IMPORT __declspec(dllimport)
#else
#define AXIS2_IMPORT
#endif
-/**
- * Calling Conventions
- */
+ /**
+ * Calling Conventions
+ */
#if defined(__GNUC__)
#if defined(__i386)
-#define AXIS2_CALL __attribute__((cdecl))
+#define AXIS2_CALL
+ __attribute__((cdecl))
#else
#define AXIS2_CALL
+
#endif
#else
#if defined(__unix)
#define AXIS2_CALL
+
#else /* WIN32 */
-#define AXIS2_CALL __stdcall
+#define AXIS2_CALL
+ __stdcall
#endif
#endif
#define AXIS2_THREAD_FUNC AXIS2_CALL
+
#ifdef DOXYGEN
-/* define these just so doxygen documents them */
+ /* define these just so doxygen documents them */
-/**
- * AXIS2_DECLARE_STATIC is defined when including Axis2's Core headers,
- * to provide static linkage when the dynamic library may be unavailable.
- *
- * @see AXIS2_DECLARE_EXPORT
- *
- * AXIS2_DECLARE_STATIC and AXIS2_DECLARE_EXPORT are left undefined when
- * including Axis2's Core headers, to import and link the symbols from the
- * dynamic Axis2 Core library and assure appropriate indirection and calling
- * conventions at compile time.
- */
+ /**
+ * AXIS2_DECLARE_STATIC is defined when including Axis2's Core headers,
+ * to provide static linkage when the dynamic library may be unavailable.
+ *
+ * @see AXIS2_DECLARE_EXPORT
+ *
+ * AXIS2_DECLARE_STATIC and AXIS2_DECLARE_EXPORT are left undefined when
+ * including Axis2's Core headers, to import and link the symbols from the
+ * dynamic Axis2 Core library and assure appropriate indirection and calling
+ * conventions at compile time.
+ */
# define AXIS2_DECLARE_STATIC
-/**
- * AXIS2_DECLARE_EXPORT is defined when building the Axis2 Core dynamic
- * library, so that all public symbols are exported.
- *
- * @see AXIS2_DECLARE_STATIC
- */
+
+ /**
+ * AXIS2_DECLARE_EXPORT is defined when building the Axis2 Core dynamic
+ * library, so that all public symbols are exported.
+ *
+ * @see AXIS2_DECLARE_STATIC
+ */
# define AXIS2_DECLARE_EXPORT
#endif /* def DOXYGEN */
#if !defined(WIN32)
-/**
- * Axis2 Core functions are declared with AXIS2_EXTERN AXIS2_CALL, so they may
- * use the most appropriate calling convention. Other
- * Core functions with variable arguments must use AXIS2_DECLARE_NONSTD().
- * @code
- * AXIS2_EXTERN rettype) axis2_func(args AXIS2_CALL
- * @endcode
- */
-#define AXIS2_EXTERN
-/**
- * Axis2 Core variable argument and hook functions are declared with
- * AXIS2_DECLARE_NONSTD(), as they must use the C language calling convention.
- * @see AXIS2_DECLARE
- * @code
- * AXIS2_DECLARE_NONSTD(rettype) axis2_func(args [...])
- * @endcode
- */
+ /**
+ * Axis2 Core functions are declared with AXIS2_EXTERN AXIS2_CALL
+ , so they may
+ * use the most appropriate calling convention. Other
+ * Core functions with variable arguments must use AXIS2_DECLARE_NONSTD().
+ * @code
+ * AXIS2_EXTERN rettype) axis2_func(args AXIS2_CALL
+
+ * @endcode
+ */
+#define AXIS2_EXTERN
+
+ /**
+ * Axis2 Core variable argument and hook functions are declared with
+ * AXIS2_DECLARE_NONSTD(), as they must use the C language calling convention.
+ * @see AXIS2_DECLARE
+ * @code
+ * AXIS2_DECLARE_NONSTD(rettype) axis2_func(args [...])
+ * @endcode
+ */
#define AXIS2_DECLARE_NONSTD(type) type
-/**
- * Axis2 Core variables are declared with AXIS2_DECLARE_DATA.
- * This assures the appropriate indirection is invoked at compile time.
- *
- * @code
- * AXIS2_DECLARE_DATA type axis2_variable
- * @endcode
- */
+ /**
+ * Axis2 Core variables are declared with AXIS2_DECLARE_DATA.
+ * This assures the appropriate indirection is invoked at compile time.
+ *
+ * @code
+ * AXIS2_DECLARE_DATA type axis2_variable
+ * @endcode
+ */
#define AXIS2_DECLARE_DATA
#elif defined(AXIS2_DECLARE_STATIC)
-#define AXIS2_EXTERN
+#define AXIS2_EXTERN
#define AXIS2_EXTERN_NONSTD
#define AXIS2_DECLARE_DATA
#elif defined(AXIS2_DECLARE_EXPORT)
#define AXIS2_EXTERN AXIS2_EXPORT
#define AXIS2_EXTERN_NONSTD AXIS2_EXPORT
-#define AXIS2_DECLARE_DATA
+#define AXIS2_DECLARE_DATA
#else
#define AXIS2_EXTERN AXIS2_IMPORT
#define AXIS2_EXTERN_NONSTD AXIS2_IMPORT
-#define AXIS2_DECLARE_DATA
+#define AXIS2_DECLARE_DATA
#endif
-/**
- * This enum is used to decide the type of storage used
- */
-typedef enum _axis2_xml_parser_type
-{
- AXIS2_XML_PARSER_TYPE_BUFFER = 1,
- AXIS2_XML_PARSER_TYPE_FILE,
- AXIS2_XML_PARSER_TYPE_DOC
-} axis2_xml_parser_type;
+ /**
+ * This enum is used to decide the type of storage used
+ */
+ typedef enum _axis2_xml_parser_type
+ {
+ AXIS2_XML_PARSER_TYPE_BUFFER = 1,
+ AXIS2_XML_PARSER_TYPE_FILE,
+ AXIS2_XML_PARSER_TYPE_DOC
+ } axis2_xml_parser_type;
-
#ifdef __cplusplus
}
#endif
Modified: webservices/axis2/trunk/c/util/include/axutil_uuid_gen.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_uuid_gen.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_uuid_gen.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_uuid_gen.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Copyright 2004,2005 The Apache Software Foundation.
*
@@ -22,13 +23,11 @@
#include <axutil_env.h>
#include <platforms/axutil_platform_auto_sense.h>
-
#ifdef __cplusplus
extern "C"
{
#endif
-
/**
* @defgroup axutil_uuid_gen UUID generator
* @ingroup axis2_util
@@ -40,7 +39,8 @@
* @return generated uuid as a string
*/
AXIS2_EXTERN axis2_char_t *AXIS2_CALL
- axutil_uuid_gen(const axutil_env_t *env);
+ axutil_uuid_gen(
+ const axutil_env_t * env);
/** @} */
Modified: webservices/axis2/trunk/c/util/include/axutil_version.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_version.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_version.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_version.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -19,10 +20,10 @@
#define AXUTIL_VERSION_H
/* The numeric compile-time version constants. These constants are the
- * authoritative version numbers for AXIS2.
+ * authoritative version numbers for AXIS2.
*/
-/** major version
+/** major version
* Major API changes that could cause compatibility problems for older
* programs such as structure size changes. No binary compatibility is
* possible across a change in the major version.
@@ -35,21 +36,21 @@
*/
#define AXIS2_MINOR_VERSION 1
-/** patch level
+/** patch level
* The Patch Level never includes API changes, simply bug fixes.
* Reset to 0 when upgrading AXIS2_MINOR_VERSION
*/
#define AXIS2_PATCH_VERSION 0
-/**
+/**
* The symbol AXIS2_IS_DEV_VERSION is only defined for internal,
* "development" copies of AXIS2. It is undefined for released versions
* of AXIS2.
*/
#undef AXIS2_IS_DEV_VERSION
-
#if defined(AXIS2_IS_DEV_VERSION) || defined(DOXYGEN)
+
/** Internal: string form of the "is dev" flag */
#define AXIS2_IS_DEV_STRING "-dev"
#else
@@ -58,6 +59,7 @@
/** Properly quote a value as a string in the C preprocessor */
#define AXIS2_STRINGIFY(n) AXIS2_STRINGIFY_HELPER(n)
+
/** Helper macro for AXIS2_STRINGIFY */
#define AXIS2_STRINGIFY_HELPER(n) #n
@@ -69,49 +71,62 @@
AXIS2_IS_DEV_STRING
/** An alternative formatted string of AXIS2's version */
+
/* macro for Win32 .rc files using numeric csv representation */
#define AXIS2_VERSION_STRING_CSV AXIS2_MAJOR_VERSION ##, \
##AXIS2_MINOR_VERSION ##, \
##AXIS2_PATCH_VERSION
-
#ifndef AXIS2_VERSION_ONLY
-/* The C language API to access the version at run time,
- * as opposed to compile time. AXIS2_VERSION_ONLY may be defined
- * externally when preprocessing axutil_version.h to obtain strictly
+/* The C language API to access the version at run time,
+ * as opposed to compile time. AXIS2_VERSION_ONLY may be defined
+ * externally when preprocessing axutil_version.h to obtain strictly
* the C Preprocessor macro declarations.
*/
#include "axutil_env.h"
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
-/**
- * The numeric version information is broken out into fields within this
- * structure.
- */
-typedef struct {
- int major; /**< major number */
- int minor; /**< minor number */
- int patch; /**< patch number */
- int is_dev; /**< is development (1 or 0) */
-} axis2_version_t;
-
-/**
- * Return AXIS2's version information information in a numeric form.
- *
- * @param pvsn Pointer to a version structure for returning the version
- * information.
- */
-AXIS2_EXTERN void AXIS2_CALL
-axis2_version(axis2_version_t *pvsn);
-
-/** Return AXIS2's version information as a string. */
-AXIS2_EXTERN const char *AXIS2_CALL
-axis2_version_string(void);
+ /**
+ * The numeric version information is broken out into fields within this
+ * structure.
+ */
+ typedef struct
+ {
+
+ int major;
+ /**< major number */
+
+ int minor;
+ /**< minor number */
+
+ int patch;
+ /**< patch number */
+
+ int is_dev;
+ /**< is development (1 or 0) */
+ }
+ axis2_version_t;
+
+ /**
+ * Return AXIS2's version information information in a numeric form.
+ *
+ * @param pvsn Pointer to a version structure for returning the version
+ * information.
+ */
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_version(
+ axis2_version_t * pvsn);
+
+ /** Return AXIS2's version information as a string. */
+ AXIS2_EXTERN const char *AXIS2_CALL
+ axis2_version_string(
+ void);
#ifdef __cplusplus
}
@@ -119,4 +134,3 @@
#endif
#endif /* AXIS2_VERSION_H */
-
Modified: webservices/axis2/trunk/c/util/include/platforms/axutil_platform_auto_sense.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/platforms/axutil_platform_auto_sense.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/platforms/axutil_platform_auto_sense.h (original)
+++ webservices/axis2/trunk/c/util/include/platforms/axutil_platform_auto_sense.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -15,7 +16,6 @@
* limitations under the License.
*/
-
#ifndef AXIS2_PLATFORM_AUTOSENSE_H
#define AXIS2_PLATFORM_AUTOSENSE_H
@@ -29,31 +29,31 @@
{
#endif
-/** @defgroup axis2_platform_auto_sense
- * @ingroup axis2_platforms
- * @{
- */
+ /** @defgroup axis2_platform_auto_sense
+ * @ingroup axis2_platforms
+ * @{
+ */
#if defined( WIN32 )
- #include "windows/axutil_windows.h"
- #include "windows/axutil_dir_windows.h"
- #include "windows/axutil_uuid_gen_windows.h"
- #include "windows/axutil_getopt_windows.h"
- #include "windows/axutil_date_time_util_windows.h"
- #include "windows/axutil_thread_windows.h"
+#include "windows/axutil_windows.h"
+#include "windows/axutil_dir_windows.h"
+#include "windows/axutil_uuid_gen_windows.h"
+#include "windows/axutil_getopt_windows.h"
+#include "windows/axutil_date_time_util_windows.h"
+#include "windows/axutil_thread_windows.h"
#elif defined ( __OS400__ )
- #include <os400/axis2_os400.h>
+#include <os400/axis2_os400.h>
#elif defined ( AIX )
- #include <aix/aix.h>
+#include <aix/aix.h>
#elif defined ( HPUX )
- #include <hp-ux/axis2_ht-ux.h>
+#include <hp-ux/axis2_ht-ux.h>
#else
- #include <platforms/unix/axutil_unix.h>
+#include <platforms/unix/axutil_unix.h>
#endif
-/** @} */
+ /** @} */
#ifdef __cplusplus
}
#endif
-#endif /* AXIS2_PLATFORM_AUTOSENSE_H */
+#endif /* AXIS2_PLATFORM_AUTOSENSE_H */
Modified: webservices/axis2/trunk/c/util/include/platforms/unix/axutil_date_time_util_unix.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/platforms/unix/axutil_date_time_util_unix.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/platforms/unix/axutil_date_time_util_unix.h (original)
+++ webservices/axis2/trunk/c/util/include/platforms/unix/axutil_date_time_util_unix.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Copyright 2004,2005 The Apache Software Foundation.
*
@@ -28,16 +29,17 @@
{
#endif
+ /**
+ * @defgroup axis2_milliseconds
+ * @ingroup axis2_milliseconds
+ * @{
+ */
+ AXIS2_EXTERN int AXIS2_CALL
+ axis2_platform_get_milliseconds(
+ );
-/**
- * @defgroup axis2_milliseconds
- * @ingroup axis2_milliseconds
- * @{
- */
-AXIS2_EXTERN int AXIS2_CALL axis2_platform_get_milliseconds();
-
#ifdef __cplusplus
}
#endif
-#endif
+#endif
Modified: webservices/axis2/trunk/c/util/include/platforms/unix/axutil_thread_unix.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/platforms/unix/axutil_thread_unix.h?rev=580209&r1=580208&r2=580209&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/platforms/unix/axutil_thread_unix.h (original)
+++ webservices/axis2/trunk/c/util/include/platforms/unix/axutil_thread_unix.h Thu Sep 27 20:31:17 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -23,30 +24,35 @@
#define SHELL_PATH "/bin/sh"
-typedef pthread_t axis2_os_thread_t; /* Native thread */
+typedef pthread_t axis2_os_thread_t; /* Native thread */
-struct axutil_thread_t {
+struct axutil_thread_t
+{
pthread_t *td;
void *data;
axutil_thread_start_t func;
};
-struct axutil_threadattr_t {
+struct axutil_threadattr_t
+{
pthread_attr_t attr;
};
-struct axutil_threadkey_t {
+struct axutil_threadkey_t
+{
pthread_key_t key;
};
-struct axutil_thread_once_t {
+struct axutil_thread_once_t
+{
pthread_once_t once;
};
/*************************Thread locking functions*****************************/
-struct axutil_thread_mutex_t {
+struct axutil_thread_mutex_t
+{
axutil_allocator_t *allocator;
pthread_mutex_t mutex;
};
-#endif /* AXIS2_THREAD_UNIX_H */
+#endif /* AXIS2_THREAD_UNIX_H */
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org