axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From din...@apache.org
Subject svn commit: r499349 - in /webservices/axis2/trunk/c: axiom/src/parser/guththila/ guththila/include/ guththila/src/
Date Wed, 24 Jan 2007 10:45:43 GMT
Author: dinesh
Date: Wed Jan 24 02:45:42 2007
New Revision: 499349

URL: http://svn.apache.org/viewvc?view=rev&rev=499349
Log:
guththila get buffer size function implemented

Modified:
    webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c
    webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c
    webservices/axis2/trunk/c/guththila/include/guththila.h
    webservices/axis2/trunk/c/guththila/include/guththila_writer.h
    webservices/axis2/trunk/c/guththila/src/guththila_writer.c
    webservices/axis2/trunk/c/guththila/src/guththila_xml_pull_parser.c
    webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c

Modified: webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c?view=diff&rev=499349&r1=499348&r2=499349
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c Wed
Jan 24 02:45:42 2007
@@ -488,6 +488,7 @@
 
     if (parser->ops)
         AXIS2_FREE(env->allocator, parser->ops);
+
     AXIS2_FREE(env->allocator, parser_impl);
     return AXIS2_SUCCESS;
 }
@@ -669,4 +670,3 @@
             data);
     return AXIS2_SUCCESS;
 }
-

Modified: webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c?view=diff&rev=499349&r1=499348&r2=499349
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c Wed
Jan 24 02:45:42 2007
@@ -214,6 +214,11 @@
 	axiom_xml_writer_t *writer,
 	const axis2_env_t *env);
 
+unsigned int AXIS2_CALL
+guththila_xml_writer_wrapper_get_xml_size(
+	axiom_xml_writer_t *writer,
+	const axis2_env_t *env);
+
 axis2_status_t AXIS2_CALL
 guththila_xml_writer_wrapper_write_raw (
 	axiom_xml_writer_t *writer,
@@ -352,6 +357,8 @@
         guththila_xml_writer_wrapper_write_encoded;
     writer_impl->writer.ops->get_xml =
         guththila_xml_writer_wrapper_get_xml;
+    writer_impl->writer.ops->get_xml_size =
+        guththila_xml_writer_wrapper_get_xml_size;
     writer_impl->writer.ops->write_raw =
         guththila_xml_writer_wrapper_write_raw;
 
@@ -473,7 +480,9 @@
         guththila_xml_writer_wrapper_write_encoded;
     writer_impl->writer.ops->get_xml =
         guththila_xml_writer_wrapper_get_xml;
-    writer_impl->writer.ops->write_raw =
+ writer_impl->writer.ops->get_xml_size =
+        guththila_xml_writer_wrapper_get_xml_size;
+       writer_impl->writer.ops->write_raw =
         guththila_xml_writer_wrapper_write_raw;
 
     return &(writer_impl->writer);
@@ -977,4 +986,13 @@
 		guththila_flush ((axis2_env_t *)env, AXIS2_INTF_TO_IMPL (writer)->parser);
 		return  AXIS2_SUCCESS;
 	}
+}
+
+unsigned int AXIS2_CALL
+guththila_xml_writer_wrapper_get_xml_size (	axiom_xml_writer_t *writer,
+											const axis2_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+	return guththila_get_memory_buffer_size ((axis2_env_t *)env,
+											 AXIS2_INTF_TO_IMPL(writer)->parser);
 }

Modified: webservices/axis2/trunk/c/guththila/include/guththila.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/include/guththila.h?view=diff&rev=499349&r1=499348&r2=499349
==============================================================================
--- webservices/axis2/trunk/c/guththila/include/guththila.h (original)
+++ webservices/axis2/trunk/c/guththila/include/guththila.h Wed Jan 24 02:45:42 2007
@@ -618,6 +618,11 @@
 guththila_get_memory_buffer (axis2_env_t *environemnt, 
 					     guththila_t *p);
 
+AXIS2_EXTERN unsigned int AXIS2_CALL
+guththila_get_memory_buffer_size(axis2_env_t *env, 
+								 guththila_t *p);
+
+
 AXIS2_EXTERN void AXIS2_CALL
 guththila_xml_writer_free (axis2_env_t *environment,
 					   guththila_t *t);

Modified: webservices/axis2/trunk/c/guththila/include/guththila_writer.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/include/guththila_writer.h?view=diff&rev=499349&r1=499348&r2=499349
==============================================================================
--- webservices/axis2/trunk/c/guththila/include/guththila_writer.h (original)
+++ webservices/axis2/trunk/c/guththila/include/guththila_writer.h Wed Jan 24 02:45:42 2007
@@ -67,4 +67,9 @@
 AXIS2_EXTERN char * AXIS2_CALL
 guththila_writer_get_buffer (axis2_env_t *env, 
 		       guththila_writer_t *wt);
+
+AXIS2_EXTERN unsigned int AXIS2_CALL
+guththila_writer_get_buffer_size (axis2_env_t *env,
+								  guththila_writer_t *wt);
+
 #endif	/* GUTHTHILA_WRITE_H */

Modified: webservices/axis2/trunk/c/guththila/src/guththila_writer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_writer.c?view=diff&rev=499349&r1=499348&r2=499349
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/guththila_writer.c (original)
+++ webservices/axis2/trunk/c/guththila/src/guththila_writer.c Wed Jan 24 02:45:42 2007
@@ -91,6 +91,7 @@
             writer_impl->buffer = guththila_buffer_grow(env, writer_impl->buffer);
         }
         memcpy (writer_impl->buffer->buff, buffer, strlen (buffer));
+		writer_impl->buffer->next += length;
         c = length;
     }
     return c;
@@ -108,6 +109,19 @@
         return (char *)writer_impl->buffer->buff;
     else
         return (char *)NULL;
+}
+
+AXIS2_EXTERN unsigned int AXIS2_CALL
+guththila_writer_get_buffer_size (axis2_env_t *env,
+								  guththila_writer_t *wt)
+{
+	guththila_writer_impl_t *writer_impl = NULL;
+	unsigned int size = 0;
+	writer_impl = (guththila_writer_impl_t *)wt;
+
+	if (writer_impl->buffer->buff)
+		size = (unsigned int) writer_impl->buffer->next;
+	return size;
 }
 
 

Modified: webservices/axis2/trunk/c/guththila/src/guththila_xml_pull_parser.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_xml_pull_parser.c?view=diff&rev=499349&r1=499348&r2=499349
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/guththila_xml_pull_parser.c (original)
+++ webservices/axis2/trunk/c/guththila/src/guththila_xml_pull_parser.c Wed Jan 24 02:45:42
2007
@@ -72,7 +72,10 @@
 		guththila_token_free (environment, parser->name);
 
     if (parser->stack)
+	{
         AXIS2_STACK_FREE(parser->stack, environment);
+	}
+
     if (parser->attrib)
 	{
 		int ii = AXIS2_STACK_SIZE(parser->attrib, environment);
@@ -84,6 +87,7 @@
 		}
         AXIS2_STACK_FREE(parser->attrib, environment);
 	}
+
     if (parser->namesp)
         AXIS2_STACK_FREE(parser->namesp, environment);
     if (parser->dep)

Modified: webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c?view=diff&rev=499349&r1=499348&r2=499349
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c (original)
+++ webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c Wed Jan 24 02:45:42 2007
@@ -23,7 +23,8 @@
 {
     if (p || file)
     {
-        p->xsw = (guththila_xml_writer_t *) AXIS2_MALLOC(env->allocator, sizeof(guththila_xml_writer_t));
+        p->xsw = (guththila_xml_writer_t *) AXIS2_MALLOC(env->allocator, 
+														 sizeof(guththila_xml_writer_t));
         p->xsw->writer = guththila_writer_create_for_file(env, file);
         p->xsw->writer_buffer = guththila_buffer_create(env, GUTHTHILA_BUFFER_SIZE);
         p->xsw->writer_buffer->buff[0] = 0;
@@ -228,7 +229,7 @@
     
     if (p->xsw->writer_buffer->buff)
     {
-        ii = strlen(p->xsw->writer_buffer->buff);
+        ii = p->xsw->next;
         c = guththila_writer_write(env, p->xsw->writer_buffer->buff, 0, ii, p->xsw->writer);
         p->xsw->writer_buffer->buff[0] = 0;
         p->xsw->writer_buffer->buff[1] = 0;
@@ -1269,4 +1270,10 @@
         buffer = guththila_writer_get_buffer(env, p->xsw->writer);
 
     return buffer;
+}
+
+AXIS2_EXTERN unsigned int AXIS2_CALL
+guththila_get_memory_buffer_size(axis2_env_t *env, guththila_t *p)
+{
+	return guththila_writer_get_buffer_size (env, p->xsw->writer);
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message