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 TnyCamelBsMsg and 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;

A special kind of TnyMimePart that has a header

free-function: g_object_free


TnyMsgIface

typedef struct {
	GTypeInterface parent;

	TnyHeader* (*get_header) (TnyMsg *self);
	TnyFolder* (*get_folder) (TnyMsg *self);
	gchar* (*get_url_string) (TnyMsg *self);
	void (*uncache_attachments) (TnyMsg *self);
	void (*rewrite_cache) (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 TnyFolder operations like tny_folder_transfer_msgs() and tny_folder_transfer_msgs_async()!

If self is a writable message, you can write to the returned TnyHeader too.

self :

a TnyMsg

Returns :

(caller-owns): header of the message

Since 1.0 audience: application-developer


tny_msg_get_folder ()

TnyFolder*          tny_msg_get_folder                  (TnyMsg *self);

Get the parent folder of self or NULL if self is not contained in a folder. If not NULL, the returned value must be unreferenced after use.

self :

a TnyMsg

Returns :

(null-ok) (caller-owns): The parent folder of this message or NULL

Since 1.0 audience: application-developer


tny_msg_get_url_string ()

gchar*              tny_msg_get_url_string              (TnyMsg *self);

Get the url string for 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

Returns :

(null-ok): The url string or NULL.

Since 1.0 audience: application-developer


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

Since 1.0 audience: application-developer


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

Since 1.0 audience: application-developer

See Also

TnyMsgHeader, TnyFolder, TnyMsgMimePart