|  |  |  | GMime 2.6 Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
GMimeObject; void (*GMimeObjectForeachFunc) (GMimeObject *parent,GMimeObject *part,gpointer user_data); void g_mime_object_register_type (const char *type,const char *subtype,GType object_type); GMimeObject * g_mime_object_new (GMimeContentType *content_type); GMimeObject * g_mime_object_new_type (const char *type,const char *subtype); void g_mime_object_set_content_type (GMimeObject *object,GMimeContentType *content_type); GMimeContentType * g_mime_object_get_content_type (GMimeObject *object); void g_mime_object_set_content_type_parameter (GMimeObject *object,const char *name,const char *value); const char * g_mime_object_get_content_type_parameter (GMimeObject *object,const char *name); void g_mime_object_set_disposition (GMimeObject *object,const char *disposition); const char * g_mime_object_get_disposition (GMimeObject *object); void g_mime_object_set_content_disposition (GMimeObject *object,GMimeContentDisposition *disposition); GMimeContentDisposition * g_mime_object_get_content_disposition (GMimeObject *object); void g_mime_object_set_content_disposition_parameter (GMimeObject *object,const char *attribute,const char *value); const char * g_mime_object_get_content_disposition_parameter (GMimeObject *object,const char *attribute); void g_mime_object_set_content_id (GMimeObject *object,const char *content_id); const char * g_mime_object_get_content_id (GMimeObject *object); void g_mime_object_prepend_header (GMimeObject *object,const char *header,const char *value); void g_mime_object_append_header (GMimeObject *object,const char *header,const char *value); gboolean g_mime_object_remove_header (GMimeObject *object,const char *header); void g_mime_object_set_header (GMimeObject *object,const char *header,const char *value); const char * g_mime_object_get_header (GMimeObject *object,const char *header); char * g_mime_object_get_headers (GMimeObject *object); GMimeHeaderList * g_mime_object_get_header_list (GMimeObject *object); ssize_t g_mime_object_write_to_stream (GMimeObject *object,GMimeStream *stream); char * g_mime_object_to_string (GMimeObject *object); void g_mime_object_encode (GMimeObject *object,GMimeEncodingConstraint constraint);
GObject +----GMimeObject +----GMimeMessage +----GMimePart +----GMimeMultipart +----GMimeMessagePart
void (*GMimeObjectForeachFunc) (GMimeObject *parent,GMimeObject *part,gpointer user_data);
The function signature for a callback to g_mime_message_foreach()
and g_mime_multipart_foreach().
| 
 | parent GMimeObject | 
| 
 | a GMimeObject | 
| 
 | User-supplied callback data. | 
void g_mime_object_register_type (const char *type,const char *subtype,GType object_type);
Registers the object type object_type for use with the
g_mime_object_new_type() convenience function.
Note: You may use the wildcard "*" to match any type and/or subtype.
| 
 | mime type | 
| 
 | mime subtype | 
| 
 | object type | 
GMimeObject *       g_mime_object_new                   (GMimeContentType *content_type);
Performs a lookup of registered GMimeObject subclasses, registered
using g_mime_object_register_type(), to find an appropriate class
capable of handling MIME parts of the specified Content-Type. If no
class has been registered to handle that type, it looks for a
registered class that can handle content_type's media type. If
that also fails, then it will use the generic part class,
GMimePart.
| 
 | a GMimeContentType object | 
| Returns : | an appropriate GMimeObject registered to handle MIME
parts appropriate for content_type. | 
GMimeObject * g_mime_object_new_type (const char *type,const char *subtype);
Performs a lookup of registered GMimeObject subclasses, registered
using g_mime_object_register_type(), to find an appropriate class
capable of handling MIME parts of type type/subtype. If no class
has been registered to handle that type, it looks for a registered
class that can handle type. If that also fails, then it will use
the generic part class, GMimePart.
| 
 | mime type | 
| 
 | mime subtype | 
| Returns : | an appropriate GMimeObject registered to handle mime-types
of type/subtype. | 
void g_mime_object_set_content_type (GMimeObject *object,GMimeContentType *content_type);
Sets the content-type for the specified MIME object and then serializes it to the Content-Type header field.
| 
 | a GMimeObject | 
| 
 | a GMimeContentType object | 
GMimeContentType *  g_mime_object_get_content_type      (GMimeObject *object);
Gets the GMimeContentType object for the given MIME object or
NULL on fail.
| 
 | a GMimeObject | 
| Returns : | the content-type object for the specified MIME object. | 
void g_mime_object_set_content_type_parameter (GMimeObject *object,const char *name,const char *value);
Sets the content-type param name to the value value.
| 
 | a GMimeObject | 
| 
 | param name | 
| 
 | param value | 
const char * g_mime_object_get_content_type_parameter (GMimeObject *object,const char *name);
Gets the value of the content-type param name set on the MIME part
object.
| 
 | a GMimeObject | 
| 
 | param name | 
| Returns : | the value of the requested content-type param or NULLon
if the param doesn't exist. | 
void g_mime_object_set_disposition (GMimeObject *object,const char *disposition);
Sets the disposition to disposition which may be one of
GMIME_DISPOSITION_ATTACHMENT or GMIME_DISPOSITION_INLINE or, by
your choice, any other string which would indicate how the MIME
part should be displayed by the MUA.
| 
 | a GMimeObject | 
| 
 | disposition ("attachment" or "inline") | 
const char *        g_mime_object_get_disposition       (GMimeObject *object);
Gets the MIME object's disposition if set or NULL otherwise.
| 
 | a GMimeObject | 
| Returns : | the disposition string which is probably one of GMIME_DISPOSITION_ATTACHMENT or GMIME_DISPOSITION_INLINE. | 
void g_mime_object_set_content_disposition (GMimeObject *object,GMimeContentDisposition *disposition);
Set the content disposition for the specified mime part and then serializes it to the Content-Disposition header field.
| 
 | a GMimeObject | 
| 
 | a GMimeContentDisposition object | 
GMimeContentDisposition * g_mime_object_get_content_disposition
                                                        (GMimeObject *object);
Gets the GMimeContentDisposition for the specified MIME object.
| 
 | a GMimeObject | 
| Returns : | the GMimeContentDisposition set on the MIME object. | 
void g_mime_object_set_content_disposition_parameter (GMimeObject *object,const char *attribute,const char *value);
Add a content-disposition parameter to the specified mime part.
| 
 | a GMimeObject | 
| 
 | parameter name | 
| 
 | parameter value | 
const char * g_mime_object_get_content_disposition_parameter (GMimeObject *object,const char *attribute);
Gets the value of the Content-Disposition parameter specified by
attribute, or NULL if the parameter does not exist.
| 
 | a GMimeObject | 
| 
 | parameter name | 
| Returns : | the value of a previously defined content-disposition
parameter specified by attribute. | 
void g_mime_object_set_content_id (GMimeObject *object,const char *content_id);
Sets the Content-Id of the MIME object.
| 
 | a GMimeObject | 
| 
 | content-id (addr-spec portion) | 
const char *        g_mime_object_get_content_id        (GMimeObject *object);
Gets the Content-Id of the MIME object or NULL if one is not set.
| 
 | a GMimeObject | 
| Returns : | a const pointer to the Content-Id header. | 
void g_mime_object_prepend_header (GMimeObject *object,const char *header,const char *value);
Prepends a raw, unprocessed header to the MIME object.
| 
 | a GMimeObject | 
| 
 | header name | 
| 
 | header value | 
void g_mime_object_append_header (GMimeObject *object,const char *header,const char *value);
Appends a raw, unprocessed header to the MIME object.
| 
 | a GMimeObject | 
| 
 | header name | 
| 
 | header value | 
gboolean g_mime_object_remove_header (GMimeObject *object,const char *header);
Removed the specified header if it exists.
| 
 | a GMimeObject | 
| 
 | header name | 
| Returns : | TRUEif the header was removed orFALSEif it could not
be found. | 
void g_mime_object_set_header (GMimeObject *object,const char *header,const char *value);
Sets an arbitrary raw, unprocessed header on the MIME object.
| 
 | a GMimeObject | 
| 
 | header name | 
| 
 | header value | 
const char * g_mime_object_get_header (GMimeObject *object,const char *header);
Gets the raw, unprocessed value of the requested header.
| 
 | a GMimeObject | 
| 
 | header name | 
| Returns : | the raw, unprocessed value of the requested header if it
exists or NULLotherwise. | 
char *              g_mime_object_get_headers           (GMimeObject *object);
Allocates a string buffer containing all of the MIME object's raw headers.
| 
 | a GMimeObject | 
| Returns : | an allocated string containing all of the raw MIME headers. | 
GMimeHeaderList *   g_mime_object_get_header_list       (GMimeObject *object);
Get the header list for object.
| 
 | a GMimeObject | 
| Returns : | the GMimeHeaderList for object. Do not free this pointer
when you are done with it. | 
ssize_t g_mime_object_write_to_stream (GMimeObject *object,GMimeStream *stream);
Write the contents of the MIME object to stream.
| 
 | a GMimeObject | 
| 
 | stream | 
| Returns : | the number of bytes written or -1on fail. | 
char *              g_mime_object_to_string             (GMimeObject *object);
Allocates a string buffer containing the contents of object.
| 
 | a GMimeObject | 
| Returns : | an allocated string containing the contents of the mime object. | 
void g_mime_object_encode (GMimeObject *object,GMimeEncodingConstraint constraint);
Calculates and sets the most efficient Content-Transfer-Encoding
for this GMimeObject and all child parts based on the constraint
provided.
| 
 | a GMimeObject | 
| 
 | a GMimeEncodingConstraint |