]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/base64.h
Minor clarifation and typo fix
[wxWidgets.git] / interface / wx / base64.h
index f59ea7ce8209de27af84ef30b6ee114766465af6..f72320ee9f936bb640e01ca4e3aace0694083ae1 100644 (file)
 /** @addtogroup group_funcmacro_misc */
 //@{
 
 /** @addtogroup group_funcmacro_misc */
 //@{
 
+/** 
+    Elements of this enum specify the possible behaviours of wxBase64Decode
+    when an invalid character is encountered.
+*/
+enum wxBase64DecodeMode
+{
+    wxBase64DecodeMode_Strict,  ///< Normal behaviour: stop at any invalid characters.
+    wxBase64DecodeMode_SkipWS,  ///< Skip whitespace characters.
+    wxBase64DecodeMode_Relaxed  ///< The most lenient behaviour: simply ignore all invalid characters.
+};
+
 /**
     This function encodes the given data using base64.
 
 /**
     This function encodes the given data using base64.
 
@@ -95,7 +106,8 @@ size_t wxBase64EncodedSize(size_t len);
     This overload is a raw decoding function and decodes the data into the
     provided buffer @a dst of the given size @e dstLen. An error is returned if
     the buffer is not large enough -- that is not at least
     This overload is a raw decoding function and decodes the data into the
     provided buffer @a dst of the given size @e dstLen. An error is returned if
     the buffer is not large enough -- that is not at least
-    wxBase64DecodedSize(srcLen) bytes.
+    wxBase64DecodedSize(srcLen) bytes. Notice that the buffer will @e not be
+    @NULL-terminated.
 
     This overload returns the number of bytes written to the buffer or the
     necessary buffer size if @a dst was @NULL or @c wxCONV_FAILED on error,
 
     This overload returns the number of bytes written to the buffer or the
     necessary buffer size if @a dst was @NULL or @c wxCONV_FAILED on error,
@@ -133,7 +145,7 @@ size_t wxBase64Decode(void* dst, size_t dstLen,
                       size_t *posErr = NULL);
 
 /**
                       size_t *posErr = NULL);
 
 /**
-    See the wxBase64Decode(void*,size_t,const char*,size_t,wxBase64DecodeMode,size_t)
+    See the wxBase64Decode(void*,size_t,const char*,size_t,wxBase64DecodeMode,size_t*)
     overload for more info about the parameters of this function.
 
     This overload allocates memory internally and returns it as wxMemoryBuffer
     overload for more info about the parameters of this function.
 
     This overload allocates memory internally and returns it as wxMemoryBuffer
@@ -150,7 +162,7 @@ wxMemoryBuffer wxBase64Decode(const char* src,
                               size_t *posErr = NULL);
 
 /**
                               size_t *posErr = NULL);
 
 /**
-    See the wxBase64Decode(void*,size_t,const char*,size_t,wxBase64DecodeMode,size_t)
+    See the wxBase64Decode(void*,size_t,const char*,size_t,wxBase64DecodeMode,size_t*)
     overload for more info about the parameters of this function.
 
     This overload takes as input a wxString and returns the internally-allocated
     overload for more info about the parameters of this function.
 
     This overload takes as input a wxString and returns the internally-allocated