mimeproc.c File Reference
#include "mimeproc.h"
Detailed Description
Basic Mime Encoder/Decoder, v0.1
Lots of RFC reading and a few examples like mpack to do this. Well maybe not enough RFC reading but it does what it needs to do. Easily could be converted to be a much smarter mime handler.
I realize this is a strange way to handle mime (en/de)coding. This was not really meant to be used outside of iparser's binary loading/saving routines. Although, if you find it useful feel free, and i will try to document as best i can the functionality.
Function Documentation
|
- Parameters:
-
- Return values:
-
TRUE | On success or their is no action to preform. |
FALSE | When their is no strings present. |
- Description:
Automatically determines if the supplied MimeString needs to be encoded or decoded and performs the appropriate action. |
|
- Parameters:
-
- Return values:
-
TRUE | On success or decoded string allready present. |
FALSE | When their is no mime string to decode or mstr is NULL. |
- Description:
Converts the mime string member of the supplied MimeString to binary. The decoding method is determined automatically. |
|
- Parameters:
-
- Return values:
-
TRUE | On success or decoded string allready present. |
FALSE | When their is no mime string to decode or mstr is NULL. |
- Description:
Converts the Base64 encoded string member of the supplied MimeString to binary. - Note:
- It is recommended that you use mime_decode() instead of calling this function directly.
|
|
- Parameters:
-
- Return values:
-
TRUE | On success or decoded string allready present. |
FALSE | When their is no mime string to decode or mstr is NULL. |
- Description:
Converts the Quoted Printable encoded string member of the supplied MimeString to binary. - Note:
- It is recommended that you use mime_decode() instead of calling this function directly.
|
|
- Parameters:
-
- Return values:
-
TRUE | On success or encoded string allready present. |
FALSE | When their is no binary string to encode or mstr is NULL. |
- Description:
Converts the binary string member of the supplied MimeString to either Base64 or Quoted Printable. The encodeing method is determined automaticly by the amount of printable charters the binary string contains. |
|
- Parameters:
-
- Return values:
-
TRUE | On success or encoded string allready present. |
FALSE | When their is no binary string to encode or mstr is NULL. |
- Description:
Converts the binary string member of the supplied MimeString to Base64 encodeing. - Note:
- It is recommended that you use mime_encode() instead of calling this function directly, unless Base64 encoding is required.
|
|
- Parameters:
-
- Return values:
-
TRUE | On success or encoded string allready present. |
FALSE | When their is no binary string to encode or mstr is NULL. |
- Description:
Converts the binary string member of the supplied MimeString to Quoted Printable encodeing. - Note:
- It is recommended that you use mime_encode() instead of calling this function directly, unless Quoted Printable encoding is required.
|
|
- Parameters:
-
- Description:
Frees a MimeString structure and all its members. |
MimeString* mime_mstr_new |
( |
unsigned long |
blen, |
|
|
char * |
binstr, |
|
|
unsigned long |
mlen, |
|
|
char * |
mimestr |
|
) |
|
|
|
- Parameters:
-
blen | The binary string length. |
binstr | The binary string. |
mlen | The mime string length. |
mimestr | The mime string. |
- Return values:
-
#MimeString * | Containing a duplicate copy of the supplied strings and lengths. |
- Description:
Generates a MimeString containing a duplicate copy of the supplied binary or mime string(s). You only need to supply one of the strings and related lengths. |
|
- Parameters:
-
- Description:
Prints all the information about the members of the the supplied MimeString structure. - Note:
- Only useful for debugging.
|
Generated on Fri Jun 4 18:35:19 2004 for cuf by
1.3.6