]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/base64.h
implement support for per-state bitmaps in wxMSW wxButton
[wxWidgets.git] / interface / wx / base64.h
index 3967d697b95fce2ef58449a437c83a395ab9d4c7..02c39d63339d9368c63b17e46d9b2d7c526a1ff8 100644 (file)
 // Global functions/macros
 // ============================================================================
 
 // Global functions/macros
 // ============================================================================
 
-/** @ingroup 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.
 
@@ -130,10 +141,10 @@ size_t wxBase64Decode(void* dst, size_t dstLen,
                       const char* src,
                       size_t srcLen = wxNO_LEN,
                       wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
                       const char* src,
                       size_t srcLen = wxNO_LEN,
                       wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
-                      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
@@ -147,10 +158,10 @@ size_t wxBase64Decode(void* dst, size_t dstLen,
 wxMemoryBuffer wxBase64Decode(const char* src,
                               size_t srcLen = wxNO_LEN,
                               wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
 wxMemoryBuffer wxBase64Decode(const char* src,
                               size_t srcLen = wxNO_LEN,
                               wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
-                              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
@@ -160,7 +171,7 @@ wxMemoryBuffer wxBase64Decode(const char* src,
 */
 wxMemoryBuffer wxBase64Decode(const wxString& src,
                               wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
 */
 wxMemoryBuffer wxBase64Decode(const wxString& src,
                               wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
-                              size_t posErr = NULL);
+                              size_t *posErr = NULL);
 
 //@}
 
 
 //@}