You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2005/11/09 05:30:26 UTC
svn commit: r331946 [1/4] - in /webservices/axis2/trunk/c: include/
modules/xml/om/src/
Author: samisa
Date: Tue Nov 8 20:29:48 2005
New Revision: 331946
URL: http://svn.apache.org/viewcvs?rev=331946&view=rev
Log:
om code converted to new style , patch applied
Modified:
webservices/axis2/trunk/c/include/axis2_om_attribute.h
webservices/axis2/trunk/c/include/axis2_om_comment.h
webservices/axis2/trunk/c/include/axis2_om_doctype.h
webservices/axis2/trunk/c/include/axis2_om_document.h
webservices/axis2/trunk/c/include/axis2_om_element.h
webservices/axis2/trunk/c/include/axis2_om_namespace.h
webservices/axis2/trunk/c/include/axis2_om_node.h
webservices/axis2/trunk/c/include/axis2_om_output.h
webservices/axis2/trunk/c/include/axis2_om_processing_instruction.h
webservices/axis2/trunk/c/include/axis2_om_stax_builder.h
webservices/axis2/trunk/c/include/axis2_om_text.h
webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_attribute.c
webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_comment.c
webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_doctype.c
webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_document.c
webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_element.c
webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_namespace.c
webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_node.c
webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_output.c
webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_processing_instruction.c
webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_stax_builder.c
webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_text.c
Modified: webservices/axis2/trunk/c/include/axis2_om_attribute.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_attribute.h?rev=331946&r1=331945&r2=331946&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_attribute.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_attribute.h Tue Nov 8 20:29:48 2005
@@ -53,11 +53,9 @@
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
*/
- axis2_status_t (AXIS2_CALL *axis2_om_attribute_ops_free) (axis2_env_t *
- environment,
- struct
- axis2_om_attribute *
- om_attribute);
+ axis2_status_t
+ (AXIS2_CALL *free) (struct axis2_om_attribute *om_attribute,
+ axis2_env_t **env);
/**
* Creates and returns a qname struct for this attribute
@@ -66,11 +64,9 @@
* @return returns qname for given attribute. NULL on error
*/
- axis2_qname_t
- *(AXIS2_CALL *axis2_om_attribute_ops_get_qname) (axis2_env_t *
- environment,
- struct axis2_om_attribute *
- om_attribute);
+ axis2_qname_t *
+ (AXIS2_CALL *get_qname) (struct axis2_om_attribute *om_attribute,
+ axis2_env_t **env);
/**
* Serialize operation
@@ -80,12 +76,38 @@
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
*/
- int (AXIS2_CALL *axis2_om_attribute_ops_serialize) (axis2_env_t *
- environment,
- struct axis2_om_attribute *
- om_attribute,
- axis2_om_output_t *
- om_output);
+ int
+ (AXIS2_CALL *serialize) (struct axis2_om_attribute *om_attribute,
+ axis2_env_t **env,
+ axis2_om_output_t *om_output);
+ axis2_char_t*
+ (AXIS2_CALL *get_localname)(struct axis2_om_attribute *om_attribute,
+ axis2_env_t **env);
+
+ axis2_char_t*
+ (AXIS2_CALL *get_value)(struct axis2_om_attribute *om_attribute,
+ axis2_env_t **env);
+
+ axis2_om_namespace_t*
+ (AXIS2_CALL *get_namespace)(struct axis2_om_attribute *om_attribute,
+ axis2_env_t **env);
+
+ axis2_status_t
+ (AXIS2_CALL *set_localname)(struct axis2_om_attribute *om_attribute,
+ axis2_env_t **env,
+ const axis2_char_t *localname);
+
+ axis2_status_t
+ (AXIS2_CALL *set_value)(struct axis2_om_attribute *om_attribute,
+ axis2_env_t **env,
+ const axis2_char_t *value);
+
+ axis2_status_t
+ (AXIS2_CALL *set_namespace)(struct axis2_om_attribute *om_attribute,
+ axis2_env_t **env,
+ axis2_om_namespace_t *om_namespace);
+
+
} axis2_om_attribute_ops_t;
@@ -97,12 +119,7 @@
{
/** operations of attribute struct */
axis2_om_attribute_ops_t *ops;
- /** localname of this attribute */
- axis2_char_t *localname;
- /** value of this attribute */
- axis2_char_t *value;
- /** attribute namespace */
- axis2_om_namespace_t *ns;
+
} axis2_om_attribute_t;
/**
@@ -113,22 +130,45 @@
* @param ns namespace, if any, of the attribute. Optional, can be NULL
* @return a pointer to newly created attribute struct
*/
- AXIS2_DECLARE(axis2_om_attribute_t *) axis2_om_attribute_create (axis2_env_t *
- environment,
- const axis2_char_t *
- localname,
- const axis2_char_t *
- value,
- axis2_om_namespace_t *
- ns);
+ AXIS2_DECLARE(axis2_om_attribute_t *)
+ axis2_om_attribute_create (axis2_env_t **env,
+ const axis2_char_t *localname,
+ const axis2_char_t *value,
+ axis2_om_namespace_t *ns);
+
+/******************** Macros *********************************************/
-/* macros */
/** free given attribute */
-#define axis2_om_attribute_free(environment, om_attribute) ((om_attribute)->ops->axis2_om_attribute_ops_free(environment, om_attribute))
+#define AXIS2_OM_ATTRIBUTE_FREE(om_attribute, env) \
+ ((om_attribute)->ops->free(om_attribute, env))
+
/** get qname of given attribute */
-#define axis2_om_attribute_get_qname(environment, om_attribute) ((om_attribute)->ops->axis2_om_attribute_ops_get_qname(environment, om_attribute))
+#define AXIS2_OM_ATTRIBUTE_GET_QNAME(om_attribute,env) \
+ ((om_attribute)->ops->get_qname(om_attribute, env))
+
/** serialize given attribute */
-#define axis2_om_attribute_serialize(environment, om_attribute,om_ouput) ((om_attribute)->ops->axis2_om_attribute_ops_serialize(environment, om_attribute,om_output))
+#define AXIS2_OM_ATTRIBUTE_SERIALIZE(om_attribute, env, om_ouput) \
+ ((om_attribute)->ops->serialize(om_attribute, env, om_output))
+
+#define AXIS2_OM_ATTRIBUTE_GET_NAMESPACE(om_attribute, env) \
+ ((om_attribute)->ops->get_namespace(om_attribute, env))
+
+#define AXIS2_OM_ATTRIBUTE_GET_LOCALNAME(om_attribute, env) \
+ ((om_attribute)->ops->get_localname(om_attribute, env))
+
+#define AXIS2_OM_ATTRIBUTE_GET_VALUE(om_attribute, env) \
+ ((om_attribute)->ops->get_value(om_attribute, env))
+
+#define AXIS2_OM_ATTRIBUTE_SET_NAMESPACE(om_attribute, env) \
+ ((om_attribute)->ops->set_namespace(om_attribute, env))
+
+#define AXIS2_OM_ATTRIBUTE_SET_LOCALNAME(om_attribute, env) \
+ ((om_attribute)->ops->set_localname(om_attribute, env))
+
+#define AXIS2_OM_ATTRIBUTE_SET_VALUE(om_attribute, env) \
+ ((om_attribute)->ops->set_value(om_attribute, env))
+
+
/** @} */
Modified: webservices/axis2/trunk/c/include/axis2_om_comment.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_comment.h?rev=331946&r1=331945&r2=331946&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_comment.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_comment.h Tue Nov 8 20:29:48 2005
@@ -51,11 +51,17 @@
* @param comment pointer to axis2_commnet struct to be freed
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE.
*/
- axis2_status_t (AXIS2_CALL *axis2_om_comment_ops_free) (axis2_env_t *
- environment,
- struct axis2_om_comment *
- comment);
+ axis2_status_t (AXIS2_CALL *free) (struct axis2_om_comment *om_comment,
+ axis2_env_t **env);
+ axis2_char_t* (AXIS2_CALL *get_value)(struct axis2_om_comment *om_comment,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *set_value)(struct axis2_om_comment *om_comment,
+ axis2_env_t **env,
+ const axis2_char_t* value);
+
+
} axis2_om_comment_ops_t;
/**
@@ -66,8 +72,7 @@
{
/** operations struct */
axis2_om_comment_ops_t *ops;
- /** comment text */
- axis2_char_t *value;
+
} axis2_om_comment_t;
/**
@@ -79,14 +84,21 @@
* Node type will be set to AXIS2_OM_COMMENT
* @return a pointer to the newly created comment struct
*/
- AXIS2_DECLARE(axis2_om_comment_t *) axis2_om_comment_create (axis2_env_t *
- environment,
- const axis2_char_t * value,
- axis2_om_node_t **
- comment_node);
+ AXIS2_DECLARE(axis2_om_comment_t *)
+ axis2_om_comment_create (axis2_env_t **env,
+ const axis2_char_t *value,
+ axis2_om_node_t **comment_node);
/** free given comment */
-#define axis2_om_comment_free(environment, comment) ((comment)->ops->axis2_om_comment_ops_free(environment, comment))
+#define AXIS2_OM_COMMENT_FREE(om_comment, env) \
+ ((om_comment)->ops->free(om_comment, env))
+
+#define AXIS2_OM_COMMENT_GET_VALUE(om_comment, env) \
+ ((om_comment)->ops->get_value(om_comment, env))
+
+#define AXIS2_OM_COMMENT_SET_VALUE(om_comment, env, value) \
+ ((om_comment)->ops->set_value(om_comment, env, value))
+
/** @} */
Modified: webservices/axis2/trunk/c/include/axis2_om_doctype.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_doctype.h?rev=331946&r1=331945&r2=331946&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_doctype.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_doctype.h Tue Nov 8 20:29:48 2005
@@ -50,10 +50,16 @@
* @param om_doctype pointer to doctype struct to be freed
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
*/
- axis2_status_t (AXIS2_CALL *axis2_om_doctype_ops_free) (axis2_env_t *
- environment,
- struct axis2_om_doctype *
- om_doctype);
+ axis2_status_t (AXIS2_CALL *free) (struct axis2_om_doctype *om_doctype,
+ axis2_env_t **env);
+
+ axis2_char_t* (AXIS2_CALL *get_value)(struct axis2_om_doctype *om_doctype,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *set_value)(struct axis2_om_doctype *om_doctype,
+ axis2_env_t **env,
+ const axis2_char_t *value);
+
} axis2_om_doctype_ops_t;
/**
@@ -64,8 +70,7 @@
{
/** Doctype related operations */
axis2_om_doctype_ops_t *ops;
- /** Doctype value */
- axis2_char_t *value;
+
} axis2_om_doctype_t;
/**
@@ -78,14 +83,22 @@
* Node type will be set to AXIS2_OM_DOCTYPE
* @return pointer to newly created doctype struct
*/
- AXIS2_DECLARE(axis2_om_doctype_t *) axis2_om_doctype_create (axis2_env_t *
- environment,
- axis2_om_node_t * parent,
- const axis2_char_t * value,
- axis2_om_node_t ** node);
+ AXIS2_DECLARE(axis2_om_doctype_t *)
+ axis2_om_doctype_create (axis2_env_t **env,
+ axis2_om_node_t * parent,
+ const axis2_char_t * value,
+ axis2_om_node_t ** node);
/** free given doctype */
-#define axis2_om_doctype_free(environment, doctype) ((doctype)->ops->axis2_om_doctype_ops_free(environment, doctype))
+#define AXIS2_OM_DOCTYPE_FREE(doctype,env) \
+ ((doctype)->ops->free(doctype,env))
+
+#define AXIS2_OM_DOCTYPE_GET_VALUE(doctype,env) \
+ ((doctype)->ops->get_value(doctype,value))
+
+#define AXIS2_OM_DOCTYPE_SET_VALUE(doctype,env,value) \
+ ((doctype)->ops->set_value(doctype,env,value))
+
/** @} */
Modified: webservices/axis2/trunk/c/include/axis2_om_document.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_document.h?rev=331946&r1=331945&r2=331946&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_document.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_document.h Tue Nov 8 20:29:48 2005
@@ -58,10 +58,8 @@
* @param document pointer to document struct to be freed
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE.
*/
- axis2_status_t (AXIS2_CALL *axis2_om_document_ops_free) (axis2_env_t *
- environment,
- struct axis2_om_document
- * document);
+ axis2_status_t (AXIS2_CALL *free) (struct axis2_om_document *document,
+ axis2_env_t **env);
/**
* Builds the next node if the builder is not finished with input xml stream
@@ -69,11 +67,8 @@
* @param document document whose next node is to be built. Mandatory, cannot be NULL
* @return pointer to the next node. NULL on error.
*/
- axis2_om_node_t
- *(AXIS2_CALL *axis2_om_document_ops_build_next) (axis2_env_t *
- environment,
- struct axis2_om_document *
- document);
+ axis2_om_node_t* (AXIS2_CALL *build_next) (struct axis2_om_document *document,
+ axis2_env_t **env);
/**
* adds the child node to the document. To the back of the children list.
@@ -82,9 +77,9 @@
* @param child child node to be added. Mandatory, cannot be NULL.
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE.
*/
- axis2_status_t (AXIS2_CALL *axis2_om_document_ops_add_child)
- (axis2_env_t * environment,
- struct axis2_om_document * document, axis2_om_node_t * child);
+ axis2_status_t (AXIS2_CALL *add_child)(struct axis2_om_document * document,
+ axis2_env_t **env,
+ axis2_om_node_t * child);
/**
* Gets the root element of the document.
@@ -93,59 +88,14 @@
* @return returns a pointer to the root node. If no root present, this method tries to
* build the root. Returns NULL on error.
*/
- axis2_om_node_t
- * (AXIS2_CALL *axis2_om_document_ops_get_root_element) (axis2_env_t *
- environment,
- struct
- axis2_om_document *
- document);
+ axis2_om_node_t* (AXIS2_CALL *get_root_element)(struct axis2_om_document *document,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *set_root_element)(struct axis2_om_document *document,
+ axis2_env_t **env,
+ axis2_om_node_t *om_node);
- /**
- * Gets the next sibling of the current element of document's builder
- * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
- * @param document document to be used
- * @return returns a pointer to the next sibling. Tries to build the document
- * till the next sibling is found. Returns NULL if no sibling is present.
- * On error, returns NULL and set the error.
- */
- axis2_om_node_t
- * (AXIS2_CALL *axis2_om_document_ops_get_next_sibling) (axis2_env_t *
- environment,
- struct
- axis2_om_document *
- document);
-
- /**
- * Gets the first child of the document's root node. get_root_element must have been
- * caled before this method is called.
- * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
- * @param document document to be used
- * @return returns a pointer to the first child. Tries to build the document
- * till the first child is found. Returns NULL if no child is present.
- * On error, returns NULL and sets the error.
- */
- axis2_om_node_t
- * (AXIS2_CALL *axis2_om_document_ops_get_first_child) (axis2_env_t *
- environment,
- struct
- axis2_om_document *
- document);
- /**
- * Gets the next child of the document's current node. get_first_child must have been
- * caled before this method is called.
- * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
- * @param document document to be used
- * @return returns a pointer to the next child. Tries to build the document
- * till the next child is found. Returns NULL if no child is present.
- * On error, returns NULL and sets the error.
- */
- axis2_om_node_t
- * (AXIS2_CALL *axis2_om_document_ops_get_next_child) (axis2_env_t *
- environment,
- struct
- axis2_om_document *
- document);
} axis2_om_document_ops_t;
/**
@@ -156,20 +106,7 @@
{
/** operations of document struct */
axis2_om_document_ops_t *ops;
- /** root element */
- axis2_om_node_t *root_element;
- /** last child */
- axis2_om_node_t *last_child;
- /** first child */
- axis2_om_node_t *first_child;
- /** done building the document */
- axis2_bool_t done;
- /** builder of the document */
- struct axis2_om_stax_builder *builder;
- /** char set encoding */
- axis2_char_t *char_set_encoding;
- /** XML version */
- axis2_char_t *xml_version;
+
} axis2_om_document_t;
/**
@@ -179,27 +116,30 @@
* @param builder pointer to xml builder
* @return pointer to the newly created document.
*/
- AXIS2_DECLARE(axis2_om_document_t *) axis2_om_document_create (axis2_env_t *
- environment,
- axis2_om_node_t * root,
- struct
- axis2_om_stax_builder
- *builder);
+ AXIS2_DECLARE(axis2_om_document_t *)
+ axis2_om_document_create (axis2_env_t **env,
+ axis2_om_node_t * root,
+ struct axis2_om_stax_builder *builder);
/** frees given document */
-#define axis2_om_document_free(environment, document) ((document)->ops->axis2_om_document_ops_free(environment, document))
+#define AXIS2_OM_DOCUMENT_FREE(document,env) \
+ ((document)->ops->free(document,env))
+
/** adds a child to document */
-#define axis2_om_document_add_child(environment, document, child) ((document)->ops->axis2_om_document_ops_add_child(environment, document, child))
+#define AXIS2_OM_DOCUMENT_ADD_CHILD(document,env, child) \
+ ((document)->ops->add_child(document,env,child))
+
/** builds next node of document */
-#define axis2_om_document_build_next(environment, document) ((document)->ops->axis2_om_document_ops_build_next(environment, document))
+#define AXIS2_OM_DOCUMENT_BUILD_NEXT(document,env) \
+ ((document)->ops->build_next(document,env))
+
/** gets the root eleemnt of given document */
-#define axis2_om_document_get_root_element(environment, document) ((document)->ops->axis2_om_document_ops_get_root_element(environment, document))
-/** gets the next sibling of given document's current node */
-#define axis2_om_document_get_next_sibling(environment, document) ((document)->ops->axis2_om_document_ops_get_next_sibling(environment, document))
-/** gets the first child of given document's root node */
-#define axis2_om_document_get_first_child(environment, document) ((document)->ops->axis2_om_document_ops_get_first_child(environment, document))
-/** gets the next child of given document's current node */
-#define axis2_om_document_get_next_child(environment, document) ((document)->ops->axis2_om_document_ops_get_next_child(environment, document))
+#define AXIS2_OM_DOCUMENT_GET_ROOT_ELEMENT(document,env) \
+ ((document)->ops->get_root_element(document,env))
+
+#define AXIS2_OM_DOCUMENT_SET_ROOT_ELEMENT(document,env,om_node) \
+ ((document)->ops->set_root_element(document,env,om_node))
+
/** @} */
Modified: webservices/axis2/trunk/c/include/axis2_om_element.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_element.h?rev=331946&r1=331945&r2=331946&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_element.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_element.h Tue Nov 8 20:29:48 2005
@@ -22,6 +22,7 @@
#include <axis2_om_output.h>
#include <axis2_om_node.h>
#include <axis2_hash.h>
+#include <axis2.h>
#ifdef __cplusplus
extern "C"
@@ -54,13 +55,11 @@
* @return pointer to the namespace, if found, else NULL. On error, returns
* NULL and sets the errorno in environment.
*/
- axis2_om_namespace_t *
- (AXIS2_CALL *axis2_om_element_ops_find_namespace) (axis2_env_t *
- environment,
- axis2_om_node_t * node,
- const axis2_char_t * uri,
- const axis2_char_t *
- prefix);
+ axis2_om_namespace_t* (AXIS2_CALL *find_namespace)(struct axis2_om_element *om_element,
+ axis2_env_t **env,
+ axis2_om_node_t *node,
+ const axis2_char_t *uri,
+ const axis2_char_t *prefix);
/**
* Declare a namespace in current element (in the scope of this element ).
* It checks to see if it is already declared.
@@ -69,9 +68,10 @@
* @param ns pointer to the namespace struct to be declared
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE.
*/
- axis2_status_t (AXIS2_CALL *axis2_om_element_ops_declare_namespace)
- (axis2_env_t * environment, axis2_om_node_t *node,
- axis2_om_namespace_t * ns);
+ axis2_status_t (AXIS2_CALL *declare_namespace)(struct axis2_om_element *om_element,
+ axis2_env_t **env,
+ axis2_om_node_t *node,
+ axis2_om_namespace_t * ns);
/**
* find namespaces in the scope of current element
@@ -96,10 +96,10 @@
* @return pointer to the namespace, if found, else NULL. On error, returns
* NULL and sets the errorno in environment.
*/
- axis2_om_namespace_t *
- (AXIS2_CALL *axis2_om_element_ops_find_namespace_with_qname)
- (axis2_env_t *environment, axis2_om_node_t *node,
- axis2_qname_t *qname);
+ axis2_om_namespace_t *(AXIS2_CALL *find_namespace_with_qname)(struct axis2_om_element *om_element,
+ axis2_env_t **env,
+ axis2_om_node_t *node,
+ axis2_qname_t *qname);
/**
* Adds an attribute to current element
@@ -108,10 +108,9 @@
* @param attribute attribute to be added.
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE.
*/
- axis2_status_t (AXIS2_CALL *axis2_om_element_ops_add_attribute)
- (axis2_env_t * environment,
- struct axis2_om_element * element,
- axis2_om_attribute_t * attribute);
+ axis2_status_t (AXIS2_CALL *add_attribute)(struct axis2_om_element *om_element,
+ axis2_env_t **env,
+ axis2_om_attribute_t *attribute);
/**
* Gets (finds) the attribute with the given qname
@@ -121,12 +120,9 @@
* @return a pointer to the attribute with given qname if found, else NULL.
* On error, returns NULL and sets the error.
*/
- axis2_om_attribute_t *
- (AXIS2_CALL *axis2_om_element_ops_get_attribute) (axis2_env_t *
- environment,
- struct axis2_om_element *
- element,
- axis2_qname_t * qname);
+ axis2_om_attribute_t *(AXIS2_CALL *get_attribute) (struct axis2_om_element *om_element,
+ axis2_env_t **env,
+ axis2_qname_t * qname);
/**
* Frees given element
@@ -134,10 +130,8 @@
* @param element OM element to be freed.
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE.
*/
- axis2_status_t (AXIS2_CALL *axis2_om_element_ops_free) (axis2_env_t *
- environment,
- struct axis2_om_element
- * element);
+ axis2_status_t (AXIS2_CALL *free) (struct axis2_om_element *element,
+ axis2_env_t **env);
/**
* Serializes the start part of the given element
@@ -146,10 +140,9 @@
* @param om_output OM output handler to be used in serializing
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
*/
- axis2_status_t (AXIS2_CALL *axis2_om_element_ops_serialize_start_part)
- (axis2_env_t * environment,
- struct axis2_om_element * element,
- axis2_om_output_t * om_output);
+ axis2_status_t (AXIS2_CALL *serialize_start_part)(struct axis2_om_element *om_element,
+ axis2_env_t **env,
+ axis2_om_output_t * om_output);
/**
* Serializes the end part of the given element. serialize_start_part must
@@ -159,10 +152,26 @@
* @param om_output OM output handler to be used in serializing
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
*/
- axis2_status_t (AXIS2_CALL *axis2_om_element_ops_serialize_end_part)
- (axis2_env_t * environment,
- struct axis2_om_element * element,
- axis2_om_output_t * om_output);
+ axis2_status_t (AXIS2_CALL *serialize_end_part)(struct axis2_om_element *om_element,
+ axis2_env_t **env,
+ axis2_om_output_t * om_output);
+
+
+ axis2_char_t* (AXIS2_CALL *get_localname)(struct axis2_om_element *om_element,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *set_localname)(struct axis2_om_element *om_element,
+ axis2_env_t **env,
+ const axis2_char_t *localname);
+
+ axis2_om_namespace_t *(AXIS2_CALL *get_namespace)(struct axis2_om_element *om_element,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *set_namespace)(struct axis2_om_element *om_element,
+ axis2_env_t **env,
+ axis2_om_namespace_t *ns,
+ axis2_om_node_t *node);
+
} axis2_om_element_ops_t;
@@ -175,14 +184,7 @@
{
/** operations of attribute struct */
axis2_om_element_ops_t *ops;
- /** Element's namespace */
- axis2_om_namespace_t *ns;
- /** Element's local name */
- axis2_char_t *localname;
- /** List of attributes */
- axis2_hash_t *attributes;
- /** List of namespaces */
- axis2_hash_t *namespaces;
+
} axis2_om_element_t;
/**
@@ -196,13 +198,12 @@
* Node type will be set to AXIS2_OM_ELEMENT
* @return a pointer to the newly created element struct
*/
- AXIS2_DECLARE(axis2_om_element_t *) axis2_om_element_create (axis2_env_t *
- environment,
- axis2_om_node_t * parent,
- const axis2_char_t *
- localname,
- axis2_om_namespace_t * ns,
- axis2_om_node_t ** node);
+ AXIS2_DECLARE(axis2_om_element_t *)
+ axis2_om_element_create (axis2_env_t **env,
+ axis2_om_node_t *parent,
+ const axis2_char_t *localname,
+ axis2_om_namespace_t *ns,
+ axis2_om_node_t **node);
/**
* Creates an OM element with given qname
@@ -215,30 +216,57 @@
* @return a pointer to the newly created element struct
*/
AXIS2_DECLARE(axis2_om_element_t *)
- axis2_om_element_create_with_qname (axis2_env_t *
- environment,
- axis2_om_node_t * parent,
- axis2_qname_t * qname,
- axis2_om_node_t ** node);
+ axis2_om_element_create_with_qname (axis2_env_t **env,
+ axis2_om_node_t *parent,
+ axis2_qname_t *qname,
+ axis2_om_node_t ** node);
/** finds given namespace with respect to given node */
-#define axis2_om_element_find_namespace(environment, node, uri, prefix) (((axis2_om_element_t*)(node->data_element))->ops->axis2_om_element_ops_find_namespace(environment, node, uri, prefix))
+#define AXIS2_OM_ELEMENT_FIND_NAMESPACE(om_element,env,om_node, uri, prefix) \
+ ((om_element)->ops->find_namespace (om_element, env,om_node, uri, prefix))
+
/** declares given namespace with respect to the given node */
-#define axis2_om_element_declare_namespace(environment, node, ns) (((axis2_om_element_t*)(node->data_element))->ops->axis2_om_element_ops_declare_namespace(environment, node, ns) )
+#define AXIS2_OM_ELEMENT_DECLARE_NAMESPACE(om_element, env , om_node, ns) \
+ ((om_element)->ops->declare_namespace (om_element, env, om_node, ns))
+
/** finds namespace with given qname */
-#define axis2_om_element_find_namespace_with_qname (environment, node, qname) ((element)->ops->axis2_om_element_ops_find_namespace_with_qname (environment, node, qname))
+#define AXIS2_OM_ELEMENT_FIND_NAMESPACE_WITH_QNAME (om_element, env, om_node, qname) \
+ ((om_element)->ops->find_namespace_with_qname (om_element, environment, node, qname))
+
/** adds given attribute to given element */
-#define axis2_om_element_add_attribute(environment, element, attribute) ((element)->ops->axis2_om_element_ops_add_attribute(environment, element, attribute))
+#define AXIS2_OM_ELEMENT_ADD_ATTRIBUTE(om_element, env, attribute) \
+ ((om_element)->ops->add_attribute(om_element , env, attribute))
+
/** gets (finds) given attribute in given element */
-#define axis2_om_element_get_attribute(environment, element, qname) ((element)->ops->axis2_om_element_ops_get_attribute(environment, element, qname))
+#define AXIS2_OM_ELEMENT_GET_ATTRIBUTE(om_element, env, qname) \
+ ((om_element)->ops->get_attribute(om_element, env, qname))
+
/*#define axis2_om_element_find_declared_namespace(environment,element,uri,prefix) ((element)->ops->axis2_om_element_find_declared_namespace(environment,element,uri,prefix))*/
/** frees given element */
-#define axis2_om_element_free(environment, element) ((element)->ops->axis2_om_element_ops_free(environment, element))
+
+#define AXIS2_OM_ELEMENT_FREE(om_element, env) \
+ ((om_element)->ops->free(om_element, env))
+
/** serialize the start part of given element */
-#define axis2_om_element_serialize_start_part(environment, element, om_output) ((element)->ops->axis2_om_element_ops_serialize_start_part(environment, element, om_output))
+#define AXIS2_OM_ELEMENT_SERIALIZE_START_PART(om_element, env, om_output) \
+ ((om_element)->ops->serialize_start_part(om_element, env, om_output))
+
/** serialize the end part of given element */
-#define axis2_om_element_serialize_end_part(environment, element, om_output) ((element)->ops->axis2_om_element_ops_serialize_end_part(environment, element, om_output))
+#define AXIS2_OM_ELEMENT_SERIALIZE_END_PART(om_element, env, om_output) \
+ ((om_element)->ops->serialize_end_part(om_element, env, om_output))
+#define AXIS2_OM_ELEMENT_GET_LOCALNAME(om_element, env)\
+ ((om_element)->ops->get_localname(om_element,env))
+
+#define AXIS2_OM_ELEMENT_GET_NAMESPACE(om_element, env) \
+ ((om_element)->ops->get_namespace(om_element, env))
+
+#define AXIS2_OM_ELEMENT_SET_LOCALNAME(om_element, env, localname) \
+ ((om_element)->ops->set_localname(om_element, env))
+
+#define AXIS2_OM_ELEMENT_SET_NAMESPACE(om_element, env, ns , node) \
+ ((om_element)->ops->set_namespace(om_element, env, ns, node))
+
/** @} */
Modified: webservices/axis2/trunk/c/include/axis2_om_namespace.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_namespace.h?rev=331946&r1=331945&r2=331946&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_namespace.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_namespace.h Tue Nov 8 20:29:48 2005
@@ -52,11 +52,8 @@
* @param om_namespace namespace to be freed.
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE.
*/
- axis2_status_t (AXIS2_CALL *axis2_om_namespace_ops_free) (axis2_env_t *
- environment,
- struct
- axis2_om_namespace *
- om_namespace);
+ axis2_status_t (AXIS2_CALL *free) (struct axis2_om_namespace *om_namespace,
+ axis2_env_t **env);
/**
* Compares two namepsaces
@@ -65,14 +62,9 @@
* @param om_namespace2 second namespace to be compared
* @return true if the two namespaces are equal, false otherwise
*/
- axis2_bool_t (AXIS2_CALL *axis2_om_namespace_ops_equals) (axis2_env_t *
- environment,
- struct
- axis2_om_namespace *
- om_namespace1,
- struct
- axis2_om_namespace *
- om_namespace2);
+ axis2_bool_t (AXIS2_CALL *equals) (struct axis2_om_namespace *om_namespace,
+ axis2_env_t **env,
+ struct axis2_om_namespace *om_namespace1);
/**
* Serializes given namespace
@@ -81,10 +73,27 @@
* @param om_output OM output handler to be used in serializing
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE.
*/
- axis2_status_t (AXIS2_CALL *axis2_om_namespace_ops_serialize)
- (axis2_env_t * environment,
- struct axis2_om_namespace * om_namespace,
- axis2_om_output_t * om_output);
+ axis2_status_t (AXIS2_CALL *serialize)(struct axis2_om_namespace *om_namespace,
+ axis2_env_t **env,
+ axis2_om_output_t * om_output);
+
+
+ axis2_char_t* (AXIS2_CALL *get_uri)(struct axis2_om_namesapce *om_namespace,
+ axis2_env_t **env);
+
+ axis2_char_t* (AXIS2_CALL *get_prefix)(struct axis2_om_namespace *om_namespace,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *set_uri)(struct axis2_om_namespace *om_namespace,
+ axis2_env_t **env,
+ const axis2_char_t *uri);
+
+ axis2_status_t (AXIS2_CALL *set_prefix)(struct axis2_om_namespace *om_namespace,
+ axis2_env_t **env,
+ const axis2_char_t *prefix);
+
+
+
} axis2_om_namespace_ops_t;
@@ -96,10 +105,7 @@
{
/** OM namespace related operations */
axis2_om_namespace_ops_t *ops;
- /** namespace URI */
- axis2_char_t *uri;
- /** namespace prefix */
- axis2_char_t *prefix;
+
} axis2_om_namespace_t;
/**
@@ -108,18 +114,34 @@
* @param prefix namespace prefix
* @return a pointer to newly created namespace struct
*/
- AXIS2_DECLARE(axis2_om_namespace_t *) axis2_om_namespace_create (axis2_env_t *
- environment,
- const axis2_char_t * uri,
- const axis2_char_t *
- prefix);
+ AXIS2_DECLARE(axis2_om_namespace_t *)
+ axis2_om_namespace_create (axis2_env_t **env,
+ const axis2_char_t * uri,
+ const axis2_char_t *prefix);
/** frees given namespace */
-#define axis2_om_namespace_free(environment, om_namespace) ((om_namespace)->ops->axis2_om_namespace_ops_free(environment, om_namespace))
+#define AXIS2_OM_NAMESPACE_FREE(om_namespace,env) \
+ ((om_namespace)->ops->free(om_namespace, env))
+
/** compares the given two namespaces for equality */
-#define axis2_om_namespace_equals(environment, om_namespace1, om_namespace2) ((om_namespace1)->ops->axis2_om_namespace_ops_equals(environment, om_namespace1, om_namespace2))
+#define AXIS2_OM_NAMESPACE_EQUALS(om_namespace, env, om_namespace1) \
+ ((om_namespace)->ops->equals(om_namespace, env, om_namespace1))
+
/** serializes given namespace */
-#define axis2_om_namespace_serialize(environment, om_namespace,om_output) ((om_namespace)->ops->axis2_om_namespace_ops_serialize(environment, om_namespace, om_output))
+#define AXIS2_OM_NAMESPACE_SERIALIZE(om_namespace,env, om_output) \
+ ((om_namespace)->ops->serialize(om_namespace, env,om_output))
+
+#define AXIS2_OM_NAMESPACE_GET_PREFIX(om_namespace, env) \
+ ((om_namespace)->ops->get_prefix(om_namespace, env))
+
+#define AXIS2_OM_NAMESPACE_GET_URI(om_namespace, env) \
+ ((om_namespace)->ops->get_uri(om_namespace, env))
+
+#define AXIS2_OM_NAMESPACE_SET_URI(om_namespace, env, uri) \
+ ((om_namespace)->ops->set_uri(om_namespace, env, uri))
+
+#define AXIS2_OM_NAMESPACE_SET_PREFIX(om_namespace, env, prefix) \
+ ((om_namespace)->ops->set_prefix(om_namesapce, env, prefix))
/** @} */
Modified: webservices/axis2/trunk/c/include/axis2_om_node.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_node.h?rev=331946&r1=331945&r2=331946&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_node.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_node.h Tue Nov 8 20:29:48 2005
@@ -29,13 +29,14 @@
* @brief defines axis2_om_node struct and its operations
*/
#include <axis2_env.h>
+#include <axis2.h>
#ifdef __cplusplus
extern "C"
{
#endif
- struct axis2_om_node;
+ struct axis2_om_node ;
struct axis2_om_node_ops;
struct axis2_om_output;
@@ -78,121 +79,146 @@
{
/**
* Frees an om node and all of its children
- * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+ * @param env Environment. MUST NOT be NULL, if NULL behaviour is undefined.
* @param om_node node to be freed.
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
*/
- axis2_status_t (AXIS2_CALL *axis2_om_node_ops_free) (axis2_env_t *
- environment,
- struct axis2_om_node *
- om_node);
+ axis2_status_t (AXIS2_CALL *free) (struct axis2_om_node *om_node,
+ axis2_env_t **env);
/**
* Adds given node as child to parent
- * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+ * @param env Environment. MUST NOT be NULL, if NULL behaviour is undefined.
* @param parent parent node. Mandatory, cannot be NULL.
* @param child child node. Mandatory, cannot be NULL.
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
*/
- axis2_status_t (AXIS2_CALL *axis2_om_node_ops_add_child) (axis2_env_t *
- environment,
- struct axis2_om_node *
- parent,
- struct axis2_om_node *
- child);
+ axis2_status_t (AXIS2_CALL *add_child) (struct axis2_om_node *om_node,
+ axis2_env_t **env,
+ struct axis2_om_node *parent);
/**
* Detaches given node from the parent and reset the links
- * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+ * @param env Environment. MUST NOT be NULL, if NULL behaviour is undefined.
* @param om_node node to be detached. Mandatory, cannot be NULL.
* @return a pointer to detached node, NULL on error.
*/
- struct axis2_om_node *(AXIS2_CALL *axis2_om_node_ops_detach) (axis2_env_t
- * environment,
- struct
- axis2_om_node *
- om_node);
+ struct axis2_om_node *(AXIS2_CALL *detach) (struct axis2_om_node *om_node,
+ axis2_env_t **env);
/**
* Inserts a sibling node after the given current node
- * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+ * @param env Environment. MUST NOT be NULL, if NULL behaviour is undefined.
* @param current_node node to whom the sibling to be inserted. Mandatory, cannot be NULL.
* @param node_to_insert the node to be inserted. Mandatory, cannot be NULL.
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
*/
- axis2_status_t (AXIS2_CALL *axis2_om_node_ops_insert_sibling_after)
- (axis2_env_t * environment,
- struct axis2_om_node * current_node,
- struct axis2_om_node * node_to_insert);
+ axis2_status_t (AXIS2_CALL *insert_sibling_after)(struct axis2_om_node *om_node,
+ axis2_env_t **env,
+ struct axis2_om_node * node_to_insert);
/**
* Inserts a sibling node before the given current node
- * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+ * @param env Environment. MUST NOT be NULL, if NULL behaviour is undefined.
* @param current_node node to whom the sibling to be inserted. Mandatory, cannot be NULL.
* @param node_to_insert the node to be inserted. Mandatory, cannot be NULL.
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
*/
- axis2_status_t (AXIS2_CALL *axis2_om_node_ops_insert_sibling_before)
- (axis2_env_t * environment,
- struct axis2_om_node * current_node,
- struct axis2_om_node * node_to_insert);
+ axis2_status_t (AXIS2_CALL *insert_sibling_before)(struct axis2_om_node *om_node,
+ axis2_env_t **env,
+ struct axis2_om_node * node_to_insert);
/**
* Sets a parent node to a given node
- * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+ * @param env Environment. MUST NOT be NULL, if NULL behaviour is undefined.
* @param child_node child node to whom a parent to be added. Mandatory, cannot be NULL.
* @param parent the node that will be set as parent. Mandatory, cannot be NULL.
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
*/
- axis2_status_t (AXIS2_CALL *axis2_om_node_ops_set_parent) (axis2_env_t
- * environment,
- struct axis2_om_node
- * child_node,
- struct axis2_om_node
- * parent_node);
+ axis2_status_t (AXIS2_CALL *set_parent) (struct axis2_om_node *om_node,
+ axis2_env_t **env,
+ struct axis2_om_node *parent_node);
/**
* gets the first child of a given node
- * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+ * @param env Environment. MUST NOT be NULL, if NULL behaviour is undefined.
* @param parent_node node whose first child is to be returnd.
* @return a pointer to first child if there is one, else returns NULL.
* On error sets the error and returns NULL
*/
- struct axis2_om_node
- *(AXIS2_CALL *axis2_om_node_ops_get_first_child) (axis2_env_t *
- environment,
- struct axis2_om_node *
- parent_node);
+ struct axis2_om_node *(AXIS2_CALL *iterator_get_first_child)(struct axis2_om_node *om_node,
+ axis2_env_t **env);
/**
* Gets the next child of the given node.
* This function should only be called after a call to get_first_child function
- * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+ * @param env Environment. MUST NOT be NULL, if NULL behaviour is undefined.
* @param parent_node node whose next child is to be returned.
* @return a pointer to next child if there is one, else returns NULL.
* On error sets the error and returns NULL
*/
- struct axis2_om_node
- *(AXIS2_CALL *axis2_om_node_ops_get_next_child) (axis2_env_t *
- environment,
- struct axis2_om_node *
- parent_node);
+ struct axis2_om_node* (AXIS2_CALL *iterator_get_next_child) (struct axis2_om_node *om_node,
+ axis2_env_t **env);
/**
* Serializes the given node. This operation makes the node go through its children and
* serialize them in order.
- * @param environment Environment .MUST NOT be NULL, if NULL behaviour is undefined.
+ * @param env Environment .MUST NOT be NULL, if NULL behaviour is undefined.
* @param node node to be serialized. Mandatory cannot be NULL.
* @param om_output OM output handler to be used in serializing
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
*/
- axis2_status_t (AXIS2_CALL *axis2_om_node_ops_serialize) (axis2_env_t *
- environment,
- struct axis2_om_node
- * om_node,
- struct axis2_om_output *
- om_output);
-
-
+ axis2_status_t (AXIS2_CALL *serialize) (struct axis2_om_node * om_node, axis2_env_t **env,
+ struct axis2_om_output *om_output);
+
+ struct axis2_om_node* (AXIS2_CALL *get_parent)(struct axis2_om_node *om_node,
+ axis2_env_t **env);
+
+ struct axis2_om_node* (AXIS2_CALL *get_first_child)(struct axis2_om_node *om_node,
+ axis2_env_t **env);
+
+ struct axis2_om_node* (AXIS2_CALL *get_last_child)(struct axis2_om_node *om_node,
+ axis2_env_t **env);
+
+ struct axis2_om_node* (AXIS2_CALL *get_previous_sibling)(struct axis2_om_node *om_node,
+ axis2_env_t **env);
+
+ struct axis2_om_node* (AXIS2_CALL *get_next_sibling)(struct axis2_om_node *om_node,
+ axis2_env_t **env);
+
+ axis2_om_types_t (AXIS2_CALL *get_node_type)(struct axis2_om_node *om_node,
+ axis2_env_t **env);
+
+ void* (AXIS2_CALL *get_data_element)(struct axis2_om_node *om_node,
+ axis2_env_t **env);
+
+ axis2_bool_t (AXIS2_CALL *get_build_status)(struct axis2_om_node *om_node,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *set_first_child)(struct axis2_om_node *om_node,
+ axis2_env_t **env,
+ struct axis2_om_node *first_child);
+
+ axis2_status_t (AXIS2_CALL *set_last_child)(struct axis2_om_node *om_node,
+ axis2_env_t **env,
+ struct axis2_om_node *last_child);
+ axis2_status_t (AXIS2_CALL *set_next_sibling)(struct axis2_om_node *om_node,
+ axis2_env_t **env,
+ struct axis2_om_node *last_sibling);
+
+ axis2_status_t (AXIS2_CALL *set_previous_sibling)(struct axis2_om_node *om_node,
+ axis2_env_t **env,
+ struct axis2_om_node *prev_sibling);
+
+ axis2_status_t (AXIS2_CALL *set_node_type)(struct axis2_om_node *om_node,
+ axis2_env_t **env,
+ axis2_om_types_t type);
+
+ axis2_status_t (AXIS2_CALL *set_data_element)(struct axis2_om_node *om_node,
+ axis2_env_t **env,
+ void* data_element);
+ axis2_status_t (AXIS2_CALL *set_build_status)(struct axis2_om_node *om_node,
+ axis2_env_t **env,
+ axis2_bool_t done);
} axis2_om_node_ops_t;
@@ -213,53 +239,94 @@
{
/** operations of node struct */
axis2_om_node_ops_t *ops;
- /* links that maintain the tree */
- /** parent node */
- struct axis2_om_node *parent;
- /** previous sibling */
- struct axis2_om_node *prev_sibling;
- /** next sibling */
- struct axis2_om_node *next_sibling;
- /** first child */
- struct axis2_om_node *first_child;
- /** current child */
- struct axis2_om_node *current_child;
- /** last child */
- struct axis2_om_node *last_child;
- /** node type, indicates the type stored in data_element */
- axis2_om_types_t node_type;
- /** done true means that this node is completely built , false otherwise */
- int done;
- /** instances of an om struct, whose type is defined by node type */
- void *data_element;
+
} axis2_om_node_t;
/**
* Creates a node struct.
- * @param environment Environment. MUST NOT be NULL, if NULL behaviour is undefined.
+ * @param env Environment. MUST NOT be NULL, if NULL behaviour is undefined.
* @return a pointer to newly created node struct. NULL on error.
*/
- AXIS2_DECLARE(axis2_om_node_t *) axis2_om_node_create (axis2_env_t * environment);
+AXIS2_DECLARE(axis2_om_node_t *) axis2_om_node_create (axis2_env_t **env);
/** frees given node */
-#define axis2_om_node_free(environment,om_node) ((om_node)->ops->axis2_om_node_ops_free(environment,om_node))
+#define AXIS2_OM_NODE_FREE(om_node,env) ((om_node)->ops->free(om_node,env))
/** adds given child to the given parent */
-#define axis2_om_node_add_child(environment,parent,child) ((parent)->ops->axis2_om_node_ops_add_child(environment,parent,child))
+
+#define AXIS2_OM_NODE_ADD_CHILD(om_node,env,parent) \
+ ((parent)->ops->add_child(om_node,env,parent))
/** detaches the given node from its parent */
-#define axis2_om_node_detach(environment,om_node) ((om_node)->ops->axis2_om_node_ops_detach(environment,om_node))
+
+#define AXIS2_OM_NODE_DETACH(om_node,env) ((om_node)->ops->detach(om_node,env))
/** inserts a sibling after the given node */
-#define axis2_om_node_insert_sibling_after(environment,current_node,node_to_insert) \
- ((current_node)->ops->axis2_om_node_ops_insert_sibling_after(environment,current_node,node_to_insert))
+
+#define AXIS2_OM_NODE_INSERT_SIBLING_AFTER(om_node,env,node_to_insert) \
+ ((current_node)->ops->insert_sibling_after(om_node,env,node_to_insert))
/** inserts a sibling before the given node */
-#define axis2_om_node_insert_sibling_before(environment,current_node,node_to_insert) ((current_node)->ops->axis2_om_node_ops_insert_sibling_before(environment,current_node,node_to_insert))
+#define AXIS2_OM_NODE_INSERT_SIBLING_BEFORE(om_node,env,node_to_insert) \
+ ((current_node)->ops->insert_sibling_before(om_node,env,node_to_insert))
+
/** sets the parent of the given node */
-#define axis2_om_node_set_parent(environment,child_node,parent_node) ((child_node)->ops->axis2_om_node_ops_set_parent(environment, child_node,parent_node))
+#define AXIS2_OM_NODE_SET_PARENT(om_node,env,parent_node) \
+ ((om_node)->ops->set_parent(om_node,env,parent_node))
+
/** gets the first child of the given node */
-#define axis2_om_node_get_first_child(environment, om_node) ((om_node)->ops->axis2_om_node_ops_get_first_child(environment, om_node))
+#define AXIS2_OM_NODE_ITERATOR_GET_FIRST_CHILD(om_node,env) \
+ ((om_node)->ops->iterator_get_first_child(om_node,env))
/** gets the next child of the given node */
-#define axis2_om_node_get_next_child(environment, om_node) ((om_node)->ops->axis2_om_node_ops_get_next_child(environment, om_node))
+
+#define AXIS2_OM_NODE_ITERATOR_GET_NEXT_CHILD(om_node,env) \
+ ((om_node)->ops->iterator_get_next_child(om_node,env))
/** serializes the given node */
-#define axis2_om_node_serialize(environment, om_node, om_output) ((om_node)->ops->axis2_om_node_ops_serialize(environment, om_node, om_output))
+#define AXIS2_OM_NODE_SERIALIZE(om_node,env, om_output) \
+ ((om_node)->ops->serialize(om_node,env,om_output))
+
+#define AXIS2_OM_NODE_GET_PARENT(om_node,env) \
+ ((om_node)->ops->get_parent(om_node,env))
+
+#define AXIS2_OM_NODE_GET_FIRST_CHILD(om_node,env) \
+ ((om_node)->ops->get_first_child(om_node,env))
+
+#define AXIS2_OM_NODE_GET_LAST_CHILD(om_node,env) \
+ ((om_node)->ops->get_last_child(om_node,env))
+
+#define AXIS2_OM_NODE_GET_NEXT_SIBLING(om_node,env) \
+ ((om_node)->ops->get_next_sibling(om_node,env))
+
+#define AXIS2_OM_NODE_GET_PREVIOUS_SIBLING(om_node,env) \
+ ((om_node)->ops->get_previous_sibling(om_node,env))
+
+#define AXIS2_OM_NODE_GET_BUILD_STATUS(om_node,env) \
+ ((om_node)->ops->get_build_status(om_node,env))
+
+#define AXIS2_OM_NODE_GET_DATA_ELEMENT(om_node,env) \
+ ((om_node)->ops->get_data_element(om_node,env))
+
+
+#define AXIS2_OM_NODE_GET_NODE_TYPE(om_node,env) \
+ ((om_node)->ops->get_node_type(om_node,env))
+
+#define AXIS2_OM_NODE_SET_LAST_CHILD(om_node,env,last_child) \
+ ((om_node)->ops->set_last_child(om_node,env,last_child))
+
+#define AXIS2_OM_NODE_SET_FIRST_CHILD(om_node,env,first_child)\
+ ((om_node)->ops->set_first_child(om_node,env,first_child))
+
+#define AXIS2_OM_NODE_SET_PREVIOUS_SIBLING(om_node,env,prev_sibling) \
+ ((om_node)->ops->set_previous_sibling(om_node,env,prev_sibling))
+
+#define AXIS2_OM_NODE_SET_NEXT_SIBLING(om_node,env,next_sibling) \
+ ((om_node)->ops->set_next_sibling(om_node,env,next_sibling))
+
+#define AXIS2_OM_NODE_SET_BUILD_STATUS(om_node,env,done) \
+ ((om_node)->ops->set_build_status(om_node,env,done))
+
+#define AXIS2_OM_NODE_SET_DATA_ELEMENT(om_node,env,data_element) \
+ ((om_node)->ops->set_data_element(om_node,env,data_element))
+
+#define AXIS2_OM_NODE_SET_NODE_TYPE(om_node,env,node_type) \
+ ((om_node)->ops->set_node_type(om_node,env,node_type))
+
/** @} */
@@ -267,4 +334,4 @@
}
#endif
-#endif /* AXIS2_OM_NODE_H */
+#endif /* AXIS2_OM_NODE_H */
\ No newline at end of file
Modified: webservices/axis2/trunk/c/include/axis2_om_output.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_output.h?rev=331946&r1=331945&r2=331946&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_output.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_output.h Tue Nov 8 20:29:48 2005
@@ -70,8 +70,8 @@
* @return a pointer to newly created output struct.
*/
- AXIS2_DECLARE(axis2_om_output_t*) axis2_om_output_create (axis2_env_t *
- environment, void *xml_writer, void* writer_env);
+ AXIS2_DECLARE(axis2_om_output_t*)
+ axis2_om_output_create (axis2_env_t **environment, void *xml_writer, void* writer_env);
/**
* Performs xml writing.
@@ -83,10 +83,10 @@
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
*/
- AXIS2_DECLARE(axis2_status_t) axis2_om_output_write (axis2_env_t * environment,
- axis2_om_output_t * om_output,
- axis2_om_types_t type,
- int no_of_args, ...);
+ AXIS2_DECLARE(axis2_status_t)
+ axis2_om_output_write (axis2_om_output_t * om_output, axis2_env_t **env,
+ axis2_om_types_t type,
+ int no_of_args, ...);
/** @} */
Modified: webservices/axis2/trunk/c/include/axis2_om_processing_instruction.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_processing_instruction.h?rev=331946&r1=331945&r2=331946&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_processing_instruction.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_processing_instruction.h Tue Nov 8 20:29:48 2005
@@ -52,9 +52,26 @@
* @param om_pi processing instruction to be freed.
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
*/
- axis2_status_t (AXIS2_CALL *axis2_om_processing_instruction_ops_free)
- (axis2_env_t * environment,
- struct axis2_om_processing_instruction * om_pi);
+ axis2_status_t
+ (AXIS2_CALL *free)(struct axis2_om_processing_instruction * om_pi,
+ axis2_env_t **env);
+ axis2_status_t
+ (AXIS2_CALL *set_value)(struct axis2_om_processing_instruction *om_pi,
+ axis2_env_t **env,
+ const axis2_char_t* value);
+ axis2_status_t
+ (AXIS2_CALL *set_target)(struct axis2_om_processing_instruction *om_pi,
+ axis2_env_t **env,
+ const axis2_char_t* target);
+ axis2_char_t*
+ (AXIS2_CALL *get_target)(struct axis2_om_processing_instruction *om_pi,
+ axis2_env_t **env);
+ axis2_char_t*
+ (AXIS2_CALL *get_value)(struct axis2_om_processing_instruction *om_pi,
+ axis2_env_t **env);
+
+
+
} axis2_om_processing_instruction_ops_t;
/**
@@ -65,10 +82,7 @@
{
/** operations struct */
axis2_om_processing_instruction_ops_t *ops;
- /** processing instruction target */
- axis2_char_t *target;
- /** processing instruction value */
- axis2_char_t *value;
+
} axis2_om_processing_instruction_t;
/**
@@ -83,15 +97,25 @@
* @return a pointer tonewly created processing instruction struct
*/
AXIS2_DECLARE(axis2_om_processing_instruction_t *)
- axis2_om_processing_instruction_create (axis2_env_t *
- environment,
- axis2_om_node_t * parent,
- const axis2_char_t * target,
- const axis2_char_t * value,
- axis2_om_node_t ** node);
+ axis2_om_processing_instruction_create (axis2_env_t **env,
+ axis2_om_node_t * parent,
+ const axis2_char_t * target,
+ const axis2_char_t * value,
+ axis2_om_node_t ** node);
/** frees given processing instruction */
-#define axis2_om_processing_instruction_free(environment,pi) ((pi)->ops->axis2_om_processing_instruction_impl_free(environment,pi))
+#define AXIS2_OM_PROCESSING_INSTRUCTION_FREE(pi,env) \
+ ((pi)->ops->free(pi, env))
+#define AXIS2_OM_PROCESSING_INSTRUCION_SET_VALUE(pi,env,value) \
+ ((pi)->ops->set_value(pi,env,value))
+#define AXIS2_OM_PROCESSING_INSTRUCTION_GET_VALUE(pi,env) \
+ ((pi)->ops->get_value(pi,env))
+#define AXIS2_OM_PROCESSING_INSTRUCION_SET_TARGET(pi,env,value) \
+ ((pi)->ops->set_target(pi,env,value))
+#define AXIS2_OM_PROCESSING_INSTRUCTION_GET_TARGET(pi,env) \
+ ((pi)->ops->get_target(pi,env))
+
+#define AXIS2
/** @} */
#ifdef __cplusplus
Modified: webservices/axis2/trunk/c/include/axis2_om_stax_builder.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_stax_builder.h?rev=331946&r1=331945&r2=331946&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_stax_builder.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_stax_builder.h Tue Nov 8 20:29:48 2005
@@ -54,11 +54,8 @@
* @return a pointer to the next node, or NULL if there are no more nodes.
* On erros sets the error and returns NULL.
*/
- axis2_om_node_t *
- (AXIS2_CALL *axis2_om_stax_builder_ops_next) (axis2_env_t *
- environment,
- struct axis2_om_stax_builder *
- builder);
+ axis2_om_node_t*(AXIS2_CALL *next) (struct axis2_om_stax_builder *builder,
+ axis2_env_t **env);
/**
* Discards the element that is being built currently.
@@ -66,12 +63,29 @@
* @param builder pointer to stax builder struct to be used
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE.
*/
- axis2_status_t (AXIS2_CALL *axis2_om_stax_builder_ops_discard_current_element)
- (axis2_env_t * environment,
- struct axis2_om_stax_builder * builder);
+ axis2_status_t (AXIS2_CALL *discard_current_element)(
+ struct axis2_om_stax_builder *builder,axis2_env_t **env);
- axis2_status_t (AXIS2_CALL *axis2_om_stax_builder_ops_free)(axis2_env_t *envioronment,struct axis2_om_stax_builder *builder);
+ axis2_status_t (AXIS2_CALL *free)(struct axis2_om_stax_builder *builder,
+ axis2_env_t **env);
+
+
+ axis2_om_node_t* (AXIS2_CALL *get_lastnode)(struct axis2_om_stax_builder *builder,
+ axis2_env_t **env);
+
+ axis2_om_document_t* (AXIS2_CALL *get_document)(struct axis2_om_stax_builder *builder,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *set_lastnode)(struct axis2_om_stax_builder *builder,
+ axis2_env_t **env,
+ axis2_om_node_t *om_node);
+
+ axis2_status_t (AXIS2_CALL *set_document)(struct axis2_om_stax_builder *builder,
+ axis2_env_t **env,
+ axis2_om_document_t *document);
+
+
} axis2_om_stax_builder_ops_t;
@@ -83,19 +97,8 @@
{
/** operations struct */
axis2_om_stax_builder_ops_t *ops;
- /** pull parser instance used by the builder */
- void *parser;
- /** last node the builder found */
- axis2_om_node_t *lastnode;
- /** document associated with the builder */
- axis2_om_document_t *document;
- /** done building the document? */
- axis2_bool_t done;
- /** parser was accessed? */
- axis2_bool_t parser_accessed;
- /** caching enabled? */
- axis2_bool_t cache;
- } axis2_om_stax_builder_t;
+
+ }axis2_om_stax_builder_t;
/**
* creates an stax builder
@@ -106,17 +109,32 @@
* @param parser_env parser envioronment. Optional, can be NULL.
* @return a pointer to the newly created builder struct.
*/
- AXIS2_DECLARE(axis2_om_stax_builder_t *) axis2_om_stax_builder_create (axis2_env_t
- * environment,
- void *parser, void* parser_env);
+ AXIS2_DECLARE(axis2_om_stax_builder_t *)
+ axis2_om_stax_builder_create (axis2_env_t **env,
+ void *parser,
+ void* parser_env);
/** builds next node */
-#define axis2_om_stax_builder_next(environment, builder) ((builder)->ops->axis2_om_stax_builder_ops_next(environment, builder))
+#define AXIS2_OM_STAX_BUILDER_NEXT(builder,env) \
+ ((builder)->ops->next(builder, env))
/** discards current node */
-#define axis2_om_stax_builder_discard_current_element(environment, builder) ((builder)->ops->axis2_om_stax_builder_ops_discard_current_element(environment, builder))
+#define AXIS2_OM_STAX_BUILDER_DISCARD(builder,env) \
+ ((builder)->ops->discard_current_element(builder, env))
/** free builder */
-#define axis2_om_stax_builder_free(environment,builder) ((builder)->ops->axis2_om_stax_builder_ops_free(environment,builder))
-
+#define AXIS2_OM_STAX_BUILDER_FREE(builder,env) \
+ ((builder)->ops->free(builder,env))
+
+#define AXIS2_OM_STAX_BUILDER_SET_DOCUMENT(builder,env,document) \
+ ((builder)->ops->set_document(builder,env,document))
+
+#define AXIS2_OM_STAX_BUILDER_SET_LASTNODE(builder,env,lastnode) \
+ ((builder)->ops->set_lastnode(builder,env,lastnode))
+
+#define AXIS2_OM_STAX_BUILDER_GET_LASTNODE(builder,env) \
+ ((builder)->ops->get_lastnode(builder,env))
+
+#define AXIS2_OM_STAX_BUILDER_GET_DOCUMENT(builder,env) \
+ ((builder)->ops->get_document(builder,env))
/** @} */
Modified: webservices/axis2/trunk/c/include/axis2_om_text.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_text.h?rev=331946&r1=331945&r2=331946&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_text.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_text.h Tue Nov 8 20:29:48 2005
@@ -52,10 +52,8 @@
* @param om_text pointer to om text struct to be freed
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
*/
- axis2_status_t (AXIS2_CALL *axis2_om_text_ops_free) (axis2_env_t *
- environment,
- struct axis2_om_text *
- om_text);
+ axis2_status_t (AXIS2_CALL *free) (struct axis2_om_text *om_text,
+ axis2_env_t **env);
/**
* Serialize operation
@@ -64,13 +62,18 @@
* @param om_output OM output handler to be used in serializing
* @return satus of the operation. AXIS2_SUCCESS on success else AXIS2_FAILURE
*/
- axis2_status_t (AXIS2_CALL *axis2_om_text_ops_serialize) (axis2_env_t *
- environment,
- const struct
- axis2_om_text *
- om_text,
- axis2_om_output_t *
- om_output);
+ axis2_status_t (AXIS2_CALL *serialize) (struct axis2_om_text *om_text,
+ axis2_env_t **env,
+ axis2_om_output_t *om_output);
+
+ axis2_status_t (AXIS2_CALL *set_value)(struct axis2_om_text *om_text,
+ axis2_env_t **env,
+ const axis2_char_t *value);
+
+ axis2_char_t* (AXIS2_CALL *get_value)(struct axis2_om_text *om_text,
+ axis2_env_t **env);
+
+
} axis2_om_text_ops_t;
/**
@@ -81,15 +84,7 @@
{
/** OM text related operations */
axis2_om_text_ops_t *ops;
- /** Text value */
- axis2_char_t *value;
- /** The following fields are for MTOM
- TODO: Implement MTOM support */
- axis2_char_t *mime_type;
- axis2_bool_t optimize;
- axis2_char_t *localname;
- axis2_bool_t is_binary;
- axis2_char_t *content_id;
+
} axis2_om_text_t;
@@ -104,15 +99,27 @@
* Node type will be set to AXIS2_OM_TEXT
* @return pointer to newly created text struct
*/
- AXIS2_DECLARE(axis2_om_text_t *) axis2_om_text_create (axis2_env_t * environment,
- axis2_om_node_t * parent,
- const axis2_char_t * value,
- axis2_om_node_t ** node);
+ AXIS2_DECLARE(axis2_om_text_t *)
+ axis2_om_text_create (axis2_env_t **env,
+ axis2_om_node_t *parent,
+ const axis2_char_t *value,
+ axis2_om_node_t ** node);
+
+/** frees given text */
+#define AXIS2_OM_TEXT_FREE( om_text,env) \
+ ((om_text)->ops->free(om_text,env))
/** serializes given text */
-#define axis2_om_text_serialize(environment, om_text, om_output) ((om_text)->ops->axis2_om_text_ops_serialize(environment, om_text, om_output))
-/** frees given text */
-#define axis2_om_text_free(environment, om_text) ((om_text)->ops->axis2_om_text_ops_free(environment, om_text))
+#define AXIS2_OM_TEXT_SERIALIZE(om_text, env, om_output) \
+ ((om_text)->ops->serialize(om_text, env, om_output))
+
+#define AXIS2_OM_TEXT_GET_VALUE(om_text, env) \
+ ((om_text)->ops->get_value(om_text, env))
+
+#define AXIS2_OM_TEXT_SET_VALUE(om_text, env, value) \
+ ((om_text)->ops->set_value(om_text, env, value))
+
+
/** @} */