axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ros...@apache.org
Subject cvs commit: ws-axis/c/src/common AxisUtils.h AxisUtils.cpp
Date Tue, 18 Jan 2005 10:48:16 GMT
roshan      2005/01/18 02:48:16

  Modified:    c/src/common AxisUtils.h AxisUtils.cpp
  Log:
  added the decodeFromBase64Binary method
  
  Revision  Changes    Path
  1.18      +2 -0      ws-axis/c/src/common/AxisUtils.h
  
  Index: AxisUtils.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/AxisUtils.h,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- AxisUtils.h	23 Nov 2004 17:21:02 -0000	1.17
  +++ AxisUtils.h	18 Jan 2005 10:48:15 -0000	1.18
  @@ -20,6 +20,7 @@
   #define AXIS_AXISUTILS_H__OF_AXIS_INCLUDED_
   
   #include <axis/GDefine.hpp>
  +#include <axis/AxisUserAPI.hpp>
   #include <string>
   
   using namespace std;
  @@ -40,6 +41,7 @@
       friend class TypeMapping;
       friend class URIMapping;
       public:
  +	    xsd__base64Binary decodeFromBase64Binary(const AxisChar* pValue);
           /*
   	 * Converts the given character pointer value to lowercase.
   	 * @param pchWord The character pointer to be converted.
  
  
  
  1.21      +16 -1     ws-axis/c/src/common/AxisUtils.cpp
  
  Index: AxisUtils.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/AxisUtils.cpp,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- AxisUtils.cpp	23 Nov 2004 17:21:02 -0000	1.20
  +++ AxisUtils.cpp	18 Jan 2005 10:48:16 -0000	1.21
  @@ -23,6 +23,7 @@
   
   #include "AxisUtils.h"
   #include <axis/GDefine.hpp>
  +#include "../soap/apr_base64.h"
   
   AXIS_CPP_NAMESPACE_START
   
  @@ -129,4 +130,18 @@
       return NULL;
   }
   
  -AXIS_CPP_NAMESPACE_END
  +xsd__base64Binary AxisUtils::decodeFromBase64Binary(const AxisChar *pValue)
  +{
  +    xsd__base64Binary value;
  +    value.__size = apr_base64_decode_len (pValue);
  +    value.__ptr = new unsigned char[value.__size + 1];
  +    value.__size = apr_base64_decode_binary (value.__ptr, pValue);
  +    /* put null at the end because it enables the decoded string to be used
  +     * as a string 
  +     */
  +    value.__ptr[value.__size] = 0;
  +
  +    return value;
  +}
  +
  +AXIS_CPP_NAMESPACE_END
  \ No newline at end of file
  
  
  

Mime
View raw message