camel-mime-utils
3
CAMEL Library

# camel-mime-utils

## Synopsis

    #define             CAMEL_FOLD_SIZE
    #define             CAMEL_FOLD_MAX_SIZE
    #define             CAMEL_UUDECODE_STATE_INIT
    #define             CAMEL_UUDECODE_STATE_BEGIN
    #define             CAMEL_UUDECODE_STATE_END
    #define             CAMEL_UUDECODE_STATE_MASK
    enum                CamelTransferEncoding;
    struct              camel_header_references;
    char*               camel_header_param                  (struct _camel_header_param *params,
                                                             const char *name);
                        CamelContentType;
    struct              camel_header_raw;
                        CamelContentDisposition;
    enum                camel_header_address_t;
    struct              camel_header_address;
    struct              camel_header_newsgroup;
    #define             camel_mime_is_ctrl                  (x)
    #define             camel_mime_is_lwsp                  (x)
    #define             camel_mime_is_tspecial              (x)
    #define             camel_mime_is_type                  (x, t)
    #define             camel_mime_is_ttoken                (x)
    #define             camel_mime_is_atom                  (x)
    #define             camel_mime_is_dtext                 (x)
    #define             camel_mime_is_fieldname             (x)
    #define             camel_mime_is_qpsafe                (x)
    #define             camel_mime_is_especial              (x)
    #define             camel_mime_is_psafe                 (x)
    #define             camel_mime_is_attrchar              (x)

## Description

## Details

### CAMEL_FOLD_SIZE

    #define CAMEL_FOLD_SIZE (77)

### CAMEL_FOLD_MAX_SIZE

    #define CAMEL_FOLD_MAX_SIZE (998)

### CAMEL_UUDECODE_STATE_INIT

    #define CAMEL_UUDECODE_STATE_INIT   (0)

### CAMEL_UUDECODE_STATE_BEGIN

    #define CAMEL_UUDECODE_STATE_BEGIN  (1 << 16)

### CAMEL_UUDECODE_STATE_END

    #define CAMEL_UUDECODE_STATE_END    (1 << 17)

### CAMEL_UUDECODE_STATE_MASK

    #define CAMEL_UUDECODE_STATE_MASK   (CAMEL_UUDECODE_STATE_BEGIN | CAMEL_UUDECODE_STATE_END)

### enum CamelTransferEncoding

    typedef enum _CamelTransferEncoding {
    	CAMEL_TRANSFER_ENCODING_DEFAULT,
    	CAMEL_TRANSFER_ENCODING_7BIT,
    	CAMEL_TRANSFER_ENCODING_8BIT,
    	CAMEL_TRANSFER_ENCODING_BASE64,
    	CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE,
    	CAMEL_TRANSFER_ENCODING_BINARY,
    	CAMEL_TRANSFER_ENCODING_UUENCODE,
    	CAMEL_TRANSFER_NUM_ENCODINGS
    } CamelTransferEncoding;

### struct camel_header_references

    struct camel_header_references {
    	struct _camel_header_references *next;
    	char *id;
    };

### camel_header_param ()

    char*               camel_header_param                  (struct _camel_header_param *params,
                                                             const char *name);

Searches `params` for a param named `name` and gets the value.

`params` :

  parameters

`name` :

  name of param to find

Returns :

  the value of the `name` param

### CamelContentType

    typedef struct {
    	char *type;
    	char *subtype;
    	struct _camel_header_param *params;
    	unsigned int refcount;
    } CamelContentType;

### struct camel_header_raw

    struct camel_header_raw {
    	struct _camel_header_raw *next;
    	char *name;
    	char *value;
    	int offset;		/* in file, if known */
    };

### CamelContentDisposition

    typedef struct {
    	char *disposition;
    	struct _camel_header_param *params;
    	unsigned int refcount;
    } CamelContentDisposition;

### enum camel_header_address_t

    typedef enum _camel_header_address_t {
    	CAMEL_HEADER_ADDRESS_NONE,	/* uninitialised */
    	CAMEL_HEADER_ADDRESS_NAME,
    	CAMEL_HEADER_ADDRESS_GROUP
    } camel_header_address_t;

### struct camel_header_address

    struct camel_header_address {
    	struct _camel_header_address *next;
    	camel_header_address_t type;
    	char *name;
    	union {
    		char *addr;
    		struct _camel_header_address *members;
    	} v;
    	unsigned int refcount;
    };

### struct camel_header_newsgroup

    struct camel_header_newsgroup {
    	struct _camel_header_newsgroup *next;

    	char *newsgroup;
    };

### camel_mime_is_ctrl()

    #define camel_mime_is_ctrl(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_CTRL) != 0)

`x` :

### camel_mime_is_lwsp()

    #define camel_mime_is_lwsp(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_LWSP) != 0)

`x` :

### camel_mime_is_tspecial()

    #define camel_mime_is_tspecial(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_TSPECIAL) != 0)

`x` :

### camel_mime_is_type()

    #define camel_mime_is_type(x, t) ((camel_mime_special_table[(unsigned char)(x)] & (t)) != 0)

`x` :

`t` :

### camel_mime_is_ttoken()

    #define camel_mime_is_ttoken(x) ((camel_mime_special_table[(unsigned char)(x)] & (CAMEL_MIME_IS_TSPECIAL|CAMEL_MIME_IS_LWSP|CAMEL_MIME_IS_CTRL)) == 0)

`x` :

### camel_mime_is_atom()

    #define camel_mime_is_atom(x) ((camel_mime_special_table[(unsigned char)(x)] & (CAMEL_MIME_IS_SPECIAL|CAMEL_MIME_IS_SPACE|CAMEL_MIME_IS_CTRL)) == 0)

`x` :

### camel_mime_is_dtext()

    #define camel_mime_is_dtext(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_DSPECIAL) == 0)

`x` :

### camel_mime_is_fieldname()

    #define camel_mime_is_fieldname(x) ((camel_mime_special_table[(unsigned char)(x)] & (CAMEL_MIME_IS_CTRL|CAMEL_MIME_IS_SPACE)) == 0)

`x` :

### camel_mime_is_qpsafe()

    #define camel_mime_is_qpsafe(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_QPSAFE) != 0)

`x` :

### camel_mime_is_especial()

    #define camel_mime_is_especial(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_ESPECIAL) != 0)

`x` :

### camel_mime_is_psafe()

    #define camel_mime_is_psafe(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_PSAFE) != 0)

`x` :

### camel_mime_is_attrchar()

    #define camel_mime_is_attrchar(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_ATTRCHAR) != 0)

`x` :