TnyMsg

TnyMsg — A type that defines a message

Synopsis




                    TnyMsg;
                    TnyMsgIface;
TnyHeader*          tny_msg_get_header                  (TnyMsg *self);
TnyFolder*          tny_msg_get_folder                  (TnyMsg *self);
gchar*              tny_msg_get_url_string              (TnyMsg *self);
void                tny_msg_uncache_attachments         (TnyMsg *self);
void                tny_msg_rewrite_cache               (TnyMsg *self);

Object Hierarchy


  GInterface
   +----TnyMsg

Prerequisites

TnyMsg requires TnyMimePart and GObject.

Known Implementations

TnyMsg is implemented by TnyCamelMsg.

Description

A type that defines a message. It inherits from TnyMsgMimePart and can therefore be used as a mime part.

Details

TnyMsg

typedef struct _TnyMsg TnyMsg;


TnyMsgIface

typedef struct {
	GTypeInterface parent;

	TnyHeader* (*get_header_func) (TnyMsg *self);
	TnyFolder* (*get_folder_func) (TnyMsg *self);
	gchar* (*get_url_string_func) (TnyMsg *self);
	void (*uncache_attachments_func) (TnyMsg *self);
	void (*rewrite_cache_func) (TnyMsg *self);
} TnyMsgIface;


tny_msg_get_header ()

TnyHeader*          tny_msg_get_header                  (TnyMsg *self);

Get the header of self. The returned header object must be unreferenced after use. You can't use the returned instance with the TnyFolder operations like tny_folder_transfer_msgs and tny_folder_transfer_msgs_async.

Once the header instance comes from a TnyMsg instance, it means that it has been permanently detached from any folder instance. To get a header instance that will work with these folder methods, you can use tny_folder_get_headers.

These instances are not the same as the ones that you will get using this API, indeed.

self : a TnyMsg object
Returns : The header of the message

tny_msg_get_folder ()

TnyFolder*          tny_msg_get_folder                  (TnyMsg *self);

Get the parent folder of self. If not NULL, the returned value must be unreferenced after use.

self : a TnyMsg object
Returns : The parent folder of this message or NULL if none

tny_msg_get_url_string ()

gchar*              tny_msg_get_url_string              (TnyMsg *self);

Get the url_string self or NULL if it's impossible to determine the url string of self. If not NULL, the returned value must be freed after use.

The url string is specified in RFC 1808 and looks for example like this: imap://userhostname/INBOX/folder/000 where 000 is the UID of the message on the IMAP server. Note that it doesn't necessarily contain the password of the IMAP account.

self : a TnyMsg object
Returns : The url string or NULL.

tny_msg_uncache_attachments ()

void                tny_msg_uncache_attachments         (TnyMsg *self);

API WARNING: This API might change

Uncache the attachments of self.

self : a TnyMsg object

tny_msg_rewrite_cache ()

void                tny_msg_rewrite_cache               (TnyMsg *self);

API WARNING: This API might change

Rewrite the message to cache, purging mime parts marked for purge.

self : a TnyMsg object

See Also

TnyMsgHeader, TnyFolder, TnyMsgMimePart