Main Page | Data Structures | File List | Data Fields | Globals

mimeproc.h File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cuf-global.h"
#include "win32lacks.h"

Go to the source code of this file.

Data Structures

struct  _MimeString

Typedefs

typedef _MimeString MimeString

Functions

MimeStringmime_mstr_new (unsigned long blen, char *binstr, unsigned long mlen, char *mimestr)
void mime_mstr_free (MimeString *mstr)
void mime_print (MimeString *mstr)
int mime_encode (MimeString *mstr)
int mime_decode (MimeString *mstr)
int mime_convert (MimeString *mstr)


Detailed Description

Basic Mime Encoder/Decoder, v0.1

Typedef Documentation

typedef struct _MimeString MimeString
 

Description:
The mime string structure. You should only need to read the approate members after a conversion is made.


Function Documentation

int mime_convert MimeString mstr  ) 
 

Parameters:
mstr The MimeString to convert.
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.

int mime_decode MimeString mstr  ) 
 

Parameters:
mstr The MimeString to decode.
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.

int mime_encode MimeString mstr  ) 
 

Parameters:
mstr The MimeString to encode.
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.

void mime_mstr_free MimeString mstr  ) 
 

Parameters:
mstr The MimeString to free.
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.

void mime_print MimeString mstr  ) 
 

Parameters:
mstr The MimeString to print.
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 doxygen 1.3.6