Name

em_format_add_puri —

Synopsis

EMFormatPURI * em_format_add_puri (emf,  
 size,  
 cid,  
 part,  
 func); 
EMFormat *  emf;
size_t  size;
const char *  cid;
CamelMimePart *  part;
EMFormatPURIFunc  func;

Arguments

emf

size

cid

Override the autogenerated content id.

part

func

Description

Add a pending-uri handler. When formatting parts that reference other parts, a pending-uri (PURI) can be used to track the reference.

size is used to allocate the structure, so that it can be directly subclassed by implementors.

cid can be used to override the key used to retreive the PURI, if NULL, then the content-location and the content-id of the part are stored as lookup keys for the part.

FIXME

This may need a free callback.

Return value

A new PURI, with a referenced copy of part, and the cid always set. The uri will be set if one is available. Clashes are resolved by forgetting the old PURI in the global index.