|  |  |  | GMime Reference Manual |  | 
|---|---|---|---|---|
                    GMimeObject;
void                (*GMimePartFunc)                    (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_type              (const char *type,
                                                         const char *subtype);
void                g_mime_object_ref                   (GMimeObject *object);
void                g_mime_object_unref                 (GMimeObject *object);
void                g_mime_object_set_content_type      (GMimeObject *object,
                                                         GMimeContentType *mime_type);
const 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_content_id        (GMimeObject *object,
                                                         const char *content_id);
const char*         g_mime_object_get_content_id        (GMimeObject *object);
void                g_mime_object_add_header            (GMimeObject *object,
                                                         const char *header,
                                                         const char *value);
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);
void                g_mime_object_remove_header         (GMimeObject *object,
                                                         const char *header);
char*               g_mime_object_get_headers           (GMimeObject *object);
ssize_t             g_mime_object_write_to_stream       (GMimeObject *object,
                                                         GMimeStream *stream);
char*               g_mime_object_to_string             (GMimeObject *object);
  GObject
   +----GMimeObject
         +----GMimePart
         +----GMimeMultipart
         +----GMimeMessagePart
         +----GMimeMessage
void (*GMimePartFunc) (GMimeObject *part, gpointer user_data);
The function signature for a callback to
g_mime_message_foreach_part() and g_mime_multipart_foreach().
| 
 | A MIME part. | 
| 
 | 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_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_ref (GMimeObject *object);
g_mime_object_ref is deprecated and should not be used in newly-written code.
Ref's a MIME object.
WARNING: This method is deprecated. Use g_object_ref() instead.
| 
 | mime object | 
void g_mime_object_unref (GMimeObject *object);
g_mime_object_unref is deprecated and should not be used in newly-written code.
Unref's a MIME object.
WARNING: This method is deprecated. Use g_object_unref() instead.
| 
 | mime object | 
void g_mime_object_set_content_type (GMimeObject *object, GMimeContentType *mime_type);
Sets the content-type for the specified MIME object.
| 
 | MIME object | 
| 
 | MIME type | 
const GMimeContentType* g_mime_object_get_content_type (GMimeObject *object);
Gets the Content-Type object for the given MIME object or NULL on
fail.
| 
 | MIME object | 
| 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.
| 
 | MIME object | 
| 
 | 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.
| 
 | MIME object | 
| 
 | param name | 
| Returns : | the value of the requested content-type param or NULLon
if the param doesn't exist. | 
void g_mime_object_set_content_id (GMimeObject *object, const char *content_id);
Sets the Content-Id of the MIME object.
| 
 | MIME object | 
| 
 | 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.
| 
 | MIME object | 
| Returns : | a const pointer to the Content-Id header. | 
void g_mime_object_add_header (GMimeObject *object, const char *header, const char *value);
Adds an arbitrary header to the MIME object.
| 
 | mime object | 
| 
 | header name | 
| 
 | header value | 
void g_mime_object_set_header (GMimeObject *object, const char *header, const char *value);
Sets an arbitrary header on the MIME object.
| 
 | mime object | 
| 
 | header name | 
| 
 | header value | 
const char* g_mime_object_get_header (GMimeObject *object, const char *header);
Gets the value of the requested header if it exists or NULL
otherwise.
| 
 | mime object | 
| 
 | header name | 
| Returns : | the value of the header headerif it exists orNULLotherwise. | 
void g_mime_object_remove_header (GMimeObject *object, const char *header);
Removed the specified header if it exists.
| 
 | mime object | 
| 
 | header name | 
char* g_mime_object_get_headers (GMimeObject *object);
Allocates a string buffer containing all of the MIME object's raw headers.
| 
 | mime object | 
| Returns : | an allocated string containing all of the raw MIME headers. | 
ssize_t g_mime_object_write_to_stream (GMimeObject *object, GMimeStream *stream);
Write the contents of the MIME object to stream.
| 
 | mime object | 
| 
 | stream | 
| Returns : | -1 on fail. | 
char* g_mime_object_to_string (GMimeObject *object);
Allocates a string buffer containing the contents of object.
| 
 | mime object | 
| Returns : | an allocated string containing the contents of the mime object. |