## CamelFolderSummary

CamelFolderSummary

## Functions

#define | CAMEL_MESSAGE_SYSTEM_MASK
CamelFolderSummary * | camel_folder_summary_new ()
struct _CamelFolder * | camel_folder_summary_get_folder ()
guint32 | camel_folder_summary_get_saved_count ()
guint32 | camel_folder_summary_get_unread_count ()
guint32 | camel_folder_summary_get_deleted_count ()
guint32 | camel_folder_summary_get_junk_count ()
guint32 | camel_folder_summary_get_junk_not_deleted_count ()
guint32 | camel_folder_summary_get_visible_count ()
void | camel_folder_summary_set_index ()
CamelIndex * | camel_folder_summary_get_index ()
void | camel_folder_summary_set_build_content ()
gboolean | camel_folder_summary_get_build_content ()
void | camel_folder_summary_set_need_preview ()
gboolean | camel_folder_summary_get_need_preview ()
guint32 | camel_folder_summary_next_uid ()
void | camel_folder_summary_set_next_uid ()
guint32 | camel_folder_summary_get_next_uid ()
gchar * | camel_folder_summary_next_uid_string ()
gboolean | camel_folder_summary_save_to_db ()
gboolean | camel_folder_summary_load_from_db ()
gboolean | camel_folder_summary_header_load_from_db ()
gboolean | camel_folder_summary_header_save_to_db ()
void | camel_folder_summary_touch ()
CamelMessageInfo * | camel_folder_summary_info_new_from_header ()
CamelMessageInfo * | camel_folder_summary_info_new_from_parser ()
CamelMessageInfo * | camel_folder_summary_info_new_from_message ()
CamelMessageContentInfo * | camel_folder_summary_content_info_new ()
void | camel_folder_summary_content_info_free ()
void | camel_folder_summary_add_preview ()
void | camel_folder_summary_add ()
void | camel_folder_summary_insert ()
gboolean | camel_folder_summary_remove ()
gboolean | camel_folder_summary_remove_uid ()
gboolean | camel_folder_summary_remove_uids ()
gboolean | camel_folder_summary_clear ()
guint | camel_folder_summary_count ()
gboolean | camel_folder_summary_check_uid ()
CamelMessageInfo * | camel_folder_summary_get ()
guint32 | camel_folder_summary_get_info_flags ()
GPtrArray * | camel_folder_summary_get_array ()
void | camel_folder_summary_free_array ()
GHashTable * | camel_folder_summary_get_hash ()
gboolean | camel_folder_summary_replace_flags ()
CamelMessageInfo * | camel_folder_summary_peek_loaded ()
GPtrArray * | camel_folder_summary_get_changed ()
void | camel_folder_summary_prepare_fetch_all ()
void | camel_folder_summary_lock ()
void | camel_folder_summary_unlock ()
gboolean | camel_flag_get ()
gboolean | camel_flag_set ()
gboolean | camel_flag_list_copy ()
gint | camel_flag_list_size ()
void | camel_flag_list_free ()
CamelMessageFlags | camel_system_flag ()
gboolean | camel_system_flag_get ()
const gchar * | camel_tag_get ()
gboolean | camel_tag_set ()
gboolean | camel_tag_list_copy ()
gint | camel_tag_list_size ()
void | camel_tag_list_free ()
gpointer | camel_message_info_new ()
gpointer | camel_message_info_ref ()
CamelMessageInfo * | camel_message_info_new_from_header ()
void | camel_message_info_unref ()
gpointer | camel_message_info_clone ()
gconstpointer | camel_message_info_ptr ()
guint32 | camel_message_info_uint32 ()
time_t | camel_message_info_time ()
#define | camel_message_info_uid()
#define | camel_message_info_subject()
#define | camel_message_info_preview()
#define | camel_message_info_from()
#define | camel_message_info_to()
#define | camel_message_info_cc()
#define | camel_message_info_mlist()
#define | camel_message_info_flags()
#define | camel_message_info_size()
#define | camel_message_info_date_sent()
#define | camel_message_info_date_received()
#define | camel_message_info_message_id()
#define | camel_message_info_references()
#define | camel_message_info_user_flags()
#define | camel_message_info_user_tags()
#define | camel_message_info_headers()
#define | camel_message_info_content()
gboolean | camel_message_info_user_flag ()
const gchar * | camel_message_info_user_tag ()
gboolean | camel_message_info_set_flags ()
gboolean | camel_message_info_set_user_flag ()
gboolean | camel_message_info_set_user_tag ()
void | camel_content_info_dump ()
void | camel_message_info_dump ()
gint | bdata_extract_digit ()
gchar * | bdata_extract_string ()

## Properties

gboolean | build-content | Read / Write
guint | deleted-count | Read
CamelFolder * | folder | Read / Write / Construct Only
guint | junk-count | Read
guint | junk-not-deleted-count | Read
gboolean | need-preview | Read / Write
guint | saved-count | Read
guint | unread-count | Read
guint | visible-count | Read

## Types and Values

struct | CamelFolderSummary
struct | CamelMessageInfo
struct | CamelMessageInfoBase
struct | CamelMessageContentInfo
enum | CamelMessageFlags
| CamelFlag
| CamelTag
| CamelSummaryMessageID
| CamelSummaryReferences
enum | CamelFolderSummaryFlags

## Object Hierarchy

        GObject
        ╰── CamelFolderSummary
            ├── CamelVeeSummary
            ├── CamelLocalSummary
            ├── CamelIMAPXSummary
            ╰── CamelNNTPSummary

## Description

## Functions

### CAMEL_MESSAGE_SYSTEM_MASK

    #define CAMEL_MESSAGE_SYSTEM_MASK (0xffff << 16)

### camel_folder_summary_new ()

    CamelFolderSummary *
    camel_folder_summary_new (struct _CamelFolder *folder);

Create a new CamelFolderSummary object.

#### Parameters

folder | parent CamelFolder object |

#### Returns

a new CamelFolderSummary object

### camel_folder_summary_get_folder ()

    struct _CamelFolder *
    camel_folder_summary_get_folder (CamelFolderSummary *summary);

### camel_folder_summary_get_saved_count ()

    guint32
    camel_folder_summary_get_saved_count (CamelFolderSummary *summary);

#### Parameters

summary | a CamelFolderSummary object |

#### Returns

Count of saved infos.

Since 3.4

### camel_folder_summary_get_unread_count ()

    guint32
    camel_folder_summary_get_unread_count (CamelFolderSummary *summary);

#### Parameters

summary | a CamelFolderSummary object |

#### Returns

Count of unread infos.

Since 3.4

### camel_folder_summary_get_deleted_count ()

    guint32
    camel_folder_summary_get_deleted_count
                                   (CamelFolderSummary *summary);

#### Parameters

summary | a CamelFolderSummary object |

#### Returns

Count of deleted infos.

Since 3.4

### camel_folder_summary_get_junk_count ()

    guint32
    camel_folder_summary_get_junk_count (CamelFolderSummary *summary);

#### Parameters

summary | a CamelFolderSummary object |

#### Returns

Count of junk infos.

Since 3.4

### camel_folder_summary_get_junk_not_deleted_count ()

    guint32
    camel_folder_summary_get_junk_not_deleted_count
                                   (CamelFolderSummary *summary);

#### Parameters

summary | a CamelFolderSummary object |

#### Returns

Count of junk and not deleted infos.

Since 3.4

### camel_folder_summary_get_visible_count ()

    guint32
    camel_folder_summary_get_visible_count
                                   (CamelFolderSummary *summary);

#### Parameters

summary | a CamelFolderSummary object |

#### Returns

Count of visible (not junk and not deleted) infos.

Since 3.4

### camel_folder_summary_set_index ()

    void
    camel_folder_summary_set_index (CamelFolderSummary *summary,
                                    CamelIndex *index);

Set the index used to index body content. If the index is `NULL`, or not set (the default), no indexing of body content will take place.

Unlike earlier behaviour, build_content need not be set to perform indexing.

#### Parameters

summary | a CamelFolderSummary object |
index | a CamelIndex |

### camel_folder_summary_get_index ()

    CamelIndex *
    camel_folder_summary_get_index (CamelFolderSummary *summary);

#### Parameters

summary | a CamelFolderSummary object |

#### Returns

a CamelIndex used to index body content.

Since 3.4

### camel_folder_summary_set_build_content ()

    void
    camel_folder_summary_set_build_content
                                   (CamelFolderSummary *summary,
                                    gboolean state);

Set a flag to tell the summary to build the content info summary (CamelMessageInfo.content). The default is not to build content info summaries.

#### Parameters

summary | a CamelFolderSummary object |
state | to build or not to build the content |

### camel_folder_summary_get_build_content ()

    gboolean
    camel_folder_summary_get_build_content
                                   (CamelFolderSummary *summary);

#### Parameters

summary | a CamelFolderSummary object |

#### Returns

Whether to build CamelMessageInfo.content.

Since 3.4

### camel_folder_summary_set_need_preview ()

    void
    camel_folder_summary_set_need_preview (CamelFolderSummary *summary,
                                           gboolean preview);

Since 2.28

### camel_folder_summary_get_need_preview ()

    gboolean
    camel_folder_summary_get_need_preview (CamelFolderSummary *summary);

Since 2.28

### camel_folder_summary_next_uid ()

    guint32
    camel_folder_summary_next_uid (CamelFolderSummary *summary);

Generate a new unique uid value as an integer. This may be used to create a unique sequence of numbers.

#### Parameters

summary | a CamelFolderSummary object |

#### Returns

the next unique uid value

### camel_folder_summary_set_next_uid ()

    void
    camel_folder_summary_set_next_uid (CamelFolderSummary *summary,
                                       guint32 uid);

Set the next minimum uid available. This can be used to ensure new uid's do not clash with existing uid's.

#### Parameters

summary | a CamelFolderSummary object |
uid | The next minimum uid to assign. To avoid clashing uid's, set this to the uid of a given messages + 1. |

### camel_folder_summary_get_next_uid ()

    guint32
    camel_folder_summary_get_next_uid (CamelFolderSummary *summary);

#### Parameters

summary | a CamelFolderSummary object |

#### Returns

Next uid currently awaiting for assignment. The difference from `camel_folder_summary_next_uid()` is that this function returns actual value and doesn't increment it before returning.

Since 3.4

### camel_folder_summary_next_uid_string ()

    gchar *
    camel_folder_summary_next_uid_string (CamelFolderSummary *summary);

Retrieve the next uid, but as a formatted string.

#### Parameters

summary | a CamelFolderSummary object |

#### Returns

the next uid as an unsigned integer string. This string must be freed by the caller.

### camel_folder_summary_save_to_db ()

    gboolean
    camel_folder_summary_save_to_db (CamelFolderSummary *summary,
                                     GError **error);

Since 2.24

### camel_folder_summary_load_from_db ()

    gboolean
    camel_folder_summary_load_from_db (CamelFolderSummary *summary,
                                       GError **error);

Since 2.24

### camel_folder_summary_header_load_from_db ()

    gboolean
    camel_folder_summary_header_load_from_db
                                   (CamelFolderSummary *summary,
                                    struct _CamelStore *store,
                                    const gchar *folder_name,
                                    GError **error);

Since 2.24

### camel_folder_summary_header_save_to_db ()

    gboolean
    camel_folder_summary_header_save_to_db
                                   (CamelFolderSummary *summary,
                                    GError **error);

Since 2.24

### camel_folder_summary_touch ()

    void
    camel_folder_summary_touch (CamelFolderSummary *summary);

Mark the summary as changed, so that a save will force it to be written back to disk.

#### Parameters

summary | a CamelFolderSummary object |

### camel_folder_summary_info_new_from_header ()

    CamelMessageInfo *
    camel_folder_summary_info_new_from_header
                                   (CamelFolderSummary *summary,
                                    struct _camel_header_raw *headers);

Create a new info record from a header.

#### Parameters

summary | a CamelFolderSummary object |
headers | rfc822 headers |

#### Returns

the newly allocated record which must be unreferenced with `camel_message_info_unref()`

### camel_folder_summary_info_new_from_parser ()

    CamelMessageInfo *
    camel_folder_summary_info_new_from_parser
                                   (CamelFolderSummary *summary,
                                    CamelMimeParser *parser);

Create a new info record from a parser. If the parser cannot determine a uid, then none will be assigned.

If indexing is enabled, and the parser cannot determine a new uid, then one is automatically assigned.

If indexing is enabled, then the content will be indexed based on this new uid. In this case, the message info MUST be added using :`add()`.

Once complete, the parser will be positioned at the end of the message.

#### Parameters

summary | a CamelFolderSummary object |
parser | a CamelMimeParser object |

#### Returns

the newly allocated record which must be unreferenced with `camel_message_info_unref()`

### camel_folder_summary_info_new_from_message ()

    CamelMessageInfo *
    camel_folder_summary_info_new_from_message
                                   (CamelFolderSummary *summary,
                                    CamelMimeMessage *message,
                                    const gchar *bodystructure);

Create a summary item from a message.

#### Parameters

summary | a CamelFolderSummary object |
message | a CamelMimeMessage object |
bodystructure | a bodystructure or NULL |

#### Returns

the newly allocated record which must be unreferenced with `camel_message_info_unref()`

### camel_folder_summary_content_info_new ()

    CamelMessageContentInfo *
    camel_folder_summary_content_info_new (CamelFolderSummary *summary);

Allocate a new CamelMessageContentInfo, suitable for adding to this summary.

#### Parameters

summary | a CamelFolderSummary object |

#### Returns

a newly allocated CamelMessageContentInfo

### camel_folder_summary_content_info_free ()

    void
    camel_folder_summary_content_info_free
                                   (CamelFolderSummary *summary,
                                    CamelMessageContentInfo *ci);

Free the content info `ci` , and all associated memory.

#### Parameters

summary | a CamelFolderSummary object |
ci | a CamelMessageContentInfo |

### camel_folder_summary_add_preview ()

    void
    camel_folder_summary_add_preview (CamelFolderSummary *summary,
                                      CamelMessageInfo *info);

Since 2.28

### camel_folder_summary_add ()

    void
    camel_folder_summary_add (CamelFolderSummary *summary,
                              CamelMessageInfo *info);

Adds a new `info` record to the summary. If `info->uid` is `NULL`, then a new uid is automatically re-assigned by calling `camel_folder_summary_next_uid_string()`.

The `info` record should have been generated by calling one of the info_new_*() functions, as it will be free'd based on the summary class. And MUST NOT be allocated directly using malloc.

#### Parameters

summary | a CamelFolderSummary object |
info | a CamelMessageInfo |

### camel_folder_summary_insert ()

    void
    camel_folder_summary_insert (CamelFolderSummary *summary,
                                 CamelMessageInfo *info,
                                 gboolean load);

Since 2.24

### camel_folder_summary_remove ()

    gboolean
    camel_folder_summary_remove (CamelFolderSummary *summary,
                                 CamelMessageInfo *info);

Remove a specific `info` record from the summary.

#### Parameters

summary | a CamelFolderSummary object |
info | a CamelMessageInfo |

#### Returns

Whether the `info` was found and removed from the `summary` .

### camel_folder_summary_remove_uid ()

    gboolean
    camel_folder_summary_remove_uid (CamelFolderSummary *summary,
                                     const gchar *uid);

Remove a specific info record from the summary, by `uid` .

#### Parameters

summary | a CamelFolderSummary object |
uid | a uid |

#### Returns

Whether the `uid` was found and removed from the `summary` .

### camel_folder_summary_remove_uids ()

    gboolean
    camel_folder_summary_remove_uids (CamelFolderSummary *summary,
                                      GList *uids);

Remove a specific info record from the summary, by `uid` .

#### Parameters

summary | a CamelFolderSummary object |
uids | a GList of uids |

#### Returns

Whether the `uid` was found and removed from the `summary` .

Since 3.6

### camel_folder_summary_clear ()

    gboolean
    camel_folder_summary_clear (CamelFolderSummary *summary,
                                GError **error);

Empty the summary contents.

#### Parameters

summary | a CamelFolderSummary object |

### camel_folder_summary_count ()

    guint
    camel_folder_summary_count (CamelFolderSummary *summary);

Get the number of summary items stored in this summary.

#### Parameters

summary | a CamelFolderSummary object |

#### Returns

the number of items in the summary

### camel_folder_summary_check_uid ()

    gboolean
    camel_folder_summary_check_uid (CamelFolderSummary *summary,
                                    const gchar *uid);

Check if the uid is valid. This isn't very efficient, so it shouldn't be called iteratively.

#### Parameters

summary | a CamelFolderSummary object |
uid | a uid |

#### Returns

if the uid is present in the summary or not (`TRUE` or `FALSE`)

Since 2.24

### camel_folder_summary_get ()

    CamelMessageInfo *
    camel_folder_summary_get (CamelFolderSummary *summary,
                              const gchar *uid);

Retrieve a summary item by uid.

A referenced to the summary item is returned, which may be ref'd or free'd as appropriate.

#### Parameters

summary | a CamelFolderSummary object |
uid | a uid |

#### Returns

the summary item, or `NULL` if the uid `uid` is not available

See `camel_folder_summary_get_info_flags()`.

Since 3.4

### camel_folder_summary_get_info_flags ()

    guint32
    camel_folder_summary_get_info_flags (CamelFolderSummary *summary,
                                         const gchar *uid);

Retrieve CamelMessageInfo::flags for a message info with UID `uid` . This is much quicker than `camel_folder_summary_get()`, because it doesn't require reading the message info from a disk.

#### Parameters

summary | a CamelFolderSummary object |
uid | a uid |

#### Returns

the flags currently stored for message info with UID `uid` , or (~0) on error

Since 3.12

### camel_folder_summary_get_array ()

    GPtrArray *
    camel_folder_summary_get_array (CamelFolderSummary *summary);

Obtain a copy of the summary array. This is done atomically, so cannot contain empty entries.

Free with `camel_folder_summary_free_array()`

#### Parameters

summary | a CamelFolderSummary object |

#### Returns

a GPtrArray of uids

Since 3.4

### camel_folder_summary_free_array ()

    void
    camel_folder_summary_free_array (GPtrArray *array);

Free's array and its elements returned from `camel_folder_summary_get_array()`.

#### Parameters

array | a GPtrArray returned from `camel_folder_summary_get_array()` |

Since 3.4

### camel_folder_summary_get_hash ()

    GHashTable *
    camel_folder_summary_get_hash (CamelFolderSummary *summary);

Returns hash of current stored 'uids' in summary, where key is 'uid' from the string pool, and value is 1. The returned pointer should be freed with `g_hash_table_destroy()`.

Note: When searching for values always use uids from the string pool.

#### Parameters

summary | a CamelFolderSummary object |

Since 3.6

### camel_folder_summary_replace_flags ()

    gboolean
    camel_folder_summary_replace_flags (CamelFolderSummary *summary,
                                        CamelMessageInfo *info);

Updates internal counts based on the flags in `info` .

#### Parameters

summary | a CamelFolderSummary |
info | a CamelMessageInfo |

#### Returns

Whether any count changed

Since 3.6

### camel_folder_summary_peek_loaded ()

    CamelMessageInfo *
    camel_folder_summary_peek_loaded (CamelFolderSummary *summary,
                                      const gchar *uid);

Since 2.26

### camel_folder_summary_get_changed ()

    GPtrArray *
    camel_folder_summary_get_changed (CamelFolderSummary *summary);

Since 2.24

### camel_folder_summary_prepare_fetch_all ()

    void
    camel_folder_summary_prepare_fetch_all
                                   (CamelFolderSummary *summary,
                                    GError **error);

Loads all infos into memory, if they are not yet and ensures they will not be freed in next couple minutes. Call this function before any mass operation or when all message infos will be needed, for better performance.

#### Parameters

summary | CamelFolderSummary object |
error | return location for a GError, or `NULL` |

Since 2.32

### camel_folder_summary_lock ()

    void
    camel_folder_summary_lock (CamelFolderSummary *summary);

Locks `summary` . Unlock it with `camel_folder_summary_unlock()`.

#### Parameters

summary | a CamelFolderSummary |

Since 2.32

### camel_folder_summary_unlock ()

    void
    camel_folder_summary_unlock (CamelFolderSummary *summary);

Unlocks `summary` , previously locked with `camel_folder_summary_lock()`.

#### Parameters

summary | a CamelFolderSummary |

Since 2.32

### camel_flag_get ()

    gboolean
    camel_flag_get (CamelFlag **list,
                    const gchar *name);

Find the state of the flag `name` in `list` .

#### Parameters

list | the address of a CamelFlag list |
name | name of the flag to get |

#### Returns

the state of the flag (`TRUE` or `FALSE`)

### camel_flag_set ()

    gboolean
    camel_flag_set (CamelFlag **list,
                    const gchar *name,
                    gboolean value);

Set the state of a flag `name` in the list `list` to `value` .

#### Parameters

list | the address of a CamelFlag list |
name | name of the flag to set or change |
value | the value to set on the flag |

#### Returns

`TRUE` if the value of the flag has been changed or `FALSE` otherwise

### camel_flag_list_copy ()

    gboolean
    camel_flag_list_copy (CamelFlag **to,
                          CamelFlag **from);

Copy a flag list.

#### Parameters

to | the address of the CamelFlag list to copy to |
from | the address of the CamelFlag list to copy from |

#### Returns

`TRUE` if `to` is changed or `FALSE` otherwise

### camel_flag_list_size ()

    gint
    camel_flag_list_size (CamelFlag **list);

Get the length of the flag list.

#### Parameters

list | the address of a CamelFlag list |

#### Returns

the number of flags in the list

### camel_flag_list_free ()

    void
    camel_flag_list_free (CamelFlag **list);

Free the memory associated with the flag list `list` .

#### Parameters

list | the address of a CamelFlag list |

### camel_system_flag ()

    CamelMessageFlags
    camel_system_flag (const gchar *name);

#### Parameters

name | name of a system flag |

#### Returns

the integer value of the system flag string

### camel_system_flag_get ()

    gboolean
    camel_system_flag_get (CamelMessageFlags flags,
                           const gchar *name);

Find the state of the flag `name` in `flags` .

#### Parameters

flags | bitwise system flags |
name | name of the flag to check for |

#### Returns

`TRUE` if the named flag is set or `FALSE` otherwise

### camel_tag_get ()

    const gchar *
    camel_tag_get (CamelTag **list,
                   const gchar *name);

Find the flag `name` in `list` and get the value.

#### Parameters

list | the address of a CamelTag list |
name | name of the tag to get |

#### Returns

the value of the flag or `NULL` if unset

### camel_tag_set ()

    gboolean
    camel_tag_set (CamelTag **list,
                   const gchar *name,
                   const gchar *value);

Set the tag `name` in the tag list `list` to `value` .

#### Parameters

list | the address of a CamelTag list |
name | name of the tag to set |
value | value to set on the tag |

#### Returns

`TRUE` if the value on the tag changed or `FALSE` otherwise

### camel_tag_list_copy ()

    gboolean
    camel_tag_list_copy (CamelTag **to,
                         CamelTag **from);

Copy a tag list.

#### Parameters

to | the address of the CamelTag list to copy to |
from | the address of the CamelTag list to copy from |

#### Returns

`TRUE` if `to` is changed or `FALSE` otherwise

### camel_tag_list_size ()

    gint
    camel_tag_list_size (CamelTag **list);

Get the number of tags present in the tag list `list` .

#### Parameters

list | the address of a CamelTag list |

#### Returns

the number of tags

### camel_tag_list_free ()

    void
    camel_tag_list_free (CamelTag **list);

Free the tag list `list` .

#### Parameters

list | the address of a CamelTag list |

### camel_message_info_new ()

    gpointer
    camel_message_info_new (CamelFolderSummary *summary);

Create a new CamelMessageInfo.

#### Parameters

summary | a CamelFolderSummary object or `NULL` |

#### Returns

a new CamelMessageInfo

### camel_message_info_ref ()

    gpointer
    camel_message_info_ref (gpointer info);

Reference an info.

#### Parameters

info | a CamelMessageInfo |

### camel_message_info_new_from_header ()

    CamelMessageInfo *
    camel_message_info_new_from_header (CamelFolderSummary *summary,
                                        struct _camel_header_raw *header);

Create a new CamelMessageInfo pre-populated with info from `header` .

#### Parameters

summary | a CamelFolderSummary object or `NULL` |
header | raw header |

#### Returns

a new CamelMessageInfo

### camel_message_info_unref ()

    void
    camel_message_info_unref (gpointer info);

Unref's and potentially frees a CamelMessageInfo and its contents.

#### Parameters

info | a CamelMessageInfo |

### camel_message_info_clone ()

    gpointer
    camel_message_info_clone (gconstpointer info);

Duplicate a CamelMessageInfo.

#### Parameters

info | a CamelMessageInfo |

#### Returns

the duplicated CamelMessageInfo

### camel_message_info_ptr ()

    gconstpointer
    camel_message_info_ptr (const CamelMessageInfo *info,
                            gint id);

Generic accessor method for getting pointer data.

#### Parameters

info | a CamelMessageInfo |
id | info to get |

#### Returns

the pointer data

### camel_message_info_uint32 ()

    guint32
    camel_message_info_uint32 (const CamelMessageInfo *info,
                               gint id);

Generic accessor method for getting 32bit gint data.

#### Parameters

info | a CamelMessageInfo |
id | info to get |

#### Returns

the gint data

### camel_message_info_time ()

    time_t
    camel_message_info_time (const CamelMessageInfo *info,
                             gint id);

Generic accessor method for getting time_t data.

#### Parameters

info | a CamelMessageInfo |
id | info to get |

#### Returns

the time_t data

### camel_message_info_uid()

    #define             camel_message_info_uid(mi)

### camel_message_info_subject()

    #define             camel_message_info_subject(mi)

### camel_message_info_preview()

    #define             camel_message_info_preview(mi)

FIXME Document me!

#### Parameters

mi | a CamelMessageInfo |

Since 2.28

### camel_message_info_from()

    #define             camel_message_info_from(mi)

### camel_message_info_to()

    #define             camel_message_info_to(mi)

### camel_message_info_cc()

    #define             camel_message_info_cc(mi)

### camel_message_info_mlist()

    #define             camel_message_info_mlist(mi)

### camel_message_info_flags()

    #define             camel_message_info_flags(mi)

### camel_message_info_size()

    #define             camel_message_info_size(mi)

### camel_message_info_date_sent()

    #define             camel_message_info_date_sent(mi)

### camel_message_info_date_received()

    #define             camel_message_info_date_received(mi)

### camel_message_info_message_id()

    #define             camel_message_info_message_id(mi)

### camel_message_info_references()

    #define             camel_message_info_references(mi)

### camel_message_info_user_flags()

    #define             camel_message_info_user_flags(mi)

### camel_message_info_user_tags()

    #define             camel_message_info_user_tags(mi)

### camel_message_info_headers()

    #define             camel_message_info_headers(mi)

FIXME Document me!

#### Parameters

mi | a CamelMessageInfo |

Since 2.24

### camel_message_info_content()

    #define             camel_message_info_content(mi)

FIXME Document me!

#### Parameters

mi | a CamelMessageInfo |

Since 2.30

### camel_message_info_user_flag ()

    gboolean
    camel_message_info_user_flag (const CamelMessageInfo *info,
                                  const gchar *id);

Get the state of a user flag named `id` .

#### Parameters

info | a CamelMessageInfo |
id | user flag to get |

#### Returns

the state of the user flag

### camel_message_info_user_tag ()

    const gchar *
    camel_message_info_user_tag (const CamelMessageInfo *info,
                                 const gchar *id);

Get the value of a user tag named `id` .

#### Parameters

info | a CamelMessageInfo |
id | user tag to get |

#### Returns

the value of the user tag

### camel_message_info_set_flags ()

    gboolean
    camel_message_info_set_flags (CamelMessageInfo *info,
                                  CamelMessageFlags flags,
                                  guint32 set);

Change the state of the system flags on the CamelMessageInfo

#### Parameters

info | a CamelMessageInfo |
flags | mask of flags to change |
set | state the flags should be changed to |

#### Returns

`TRUE` if any of the flags changed or `FALSE` otherwise

### camel_message_info_set_user_flag ()

    gboolean
    camel_message_info_set_user_flag (CamelMessageInfo *info,
                                      const gchar *id,
                                      gboolean state);

Set the state of a user flag on a CamelMessageInfo.

#### Parameters

info | a CamelMessageInfo |
id | name of the user flag to set |
state | state to set the flag to |

#### Returns

`TRUE` if the state changed or `FALSE` otherwise

### camel_message_info_set_user_tag ()

    gboolean
    camel_message_info_set_user_tag (CamelMessageInfo *info,
                                     const gchar *id,
                                     const gchar *val);

Set the value of a user tag on a CamelMessageInfo.

#### Parameters

info | a CamelMessageInfo |
id | name of the user tag to set |
val | value to set |

#### Returns

`TRUE` if the value changed or `FALSE` otherwise

### camel_content_info_dump ()

    void
    camel_content_info_dump (CamelMessageContentInfo *ci,
                             gint depth);

### camel_message_info_dump ()

    void
    camel_message_info_dump (CamelMessageInfo *info);

### bdata_extract_digit ()

    gint
    bdata_extract_digit (gchar **part);

### bdata_extract_string ()

    gchar *
    bdata_extract_string (gchar **part);

## Types and Values

### struct CamelFolderSummary

    struct CamelFolderSummary;

### struct CamelMessageInfo

    struct CamelMessageInfo {
    	CamelFolderSummary *summary;

    	volatile gint refcount;
    	const gchar *uid;
    	/*FIXME: Make it work with the CAMEL_MESSADE_DB_DIRTY flag instead of another 4 bytes*/
    	guint dirty : 1;
    };

### struct CamelMessageInfoBase

    struct CamelMessageInfoBase {
    	CamelFolderSummary *summary;

    	volatile gint refcount;
    	const gchar *uid;
    	/*FIXME: Make it work with the CAMEL_MESSADE_DB_DIRTY flag instead of another 4 bytes*/
    	guint dirty : 1;

    	const gchar *subject;
    	const gchar *from;
    	const gchar *to;
    	const gchar *cc;
    	const gchar *mlist;

    	CamelMessageFlags flags;
    	guint32 size;

    	time_t date_sent;
    	time_t date_received;

    	CamelSummaryMessageID message_id;
    	CamelSummaryReferences *references;/* from parent to root */

    	struct _CamelFlag *user_flags;
    	struct _CamelTag *user_tags;

    	/* tree of content description - NULL if it is not available */
    	CamelMessageContentInfo *content;
    	struct _camel_header_param *headers;
    	gchar *preview;
    	gchar *bodystructure;
    };

### struct CamelMessageContentInfo

    struct CamelMessageContentInfo {
    	CamelMessageContentInfo *next;

    	CamelMessageContentInfo *childs;
    	CamelMessageContentInfo *parent;

    	CamelContentType *type;
    	gchar *id;
    	gchar *description;
    	gchar *encoding;		/* this should be an enum?? */
    	guint32 size;
    };

### enum CamelMessageFlags

#### Members

CAMEL_MESSAGE_ANSWERED |  |
CAMEL_MESSAGE_DELETED |  |
CAMEL_MESSAGE_DRAFT |  |
CAMEL_MESSAGE_FLAGGED |  |
CAMEL_MESSAGE_SEEN |  |
CAMEL_MESSAGE_ATTACHMENTS |  |
CAMEL_MESSAGE_ANSWERED_ALL |  |
CAMEL_MESSAGE_JUNK |  |
CAMEL_MESSAGE_SECURE |  |
CAMEL_MESSAGE_NOTJUNK |  |
CAMEL_MESSAGE_FORWARDED |  |
CAMEL_MESSAGE_FOLDER_FLAGGED |  |
CAMEL_MESSAGE_JUNK_LEARN |  |
CAMEL_MESSAGE_USER |  |

### CamelFlag

    typedef struct {
    	struct _CamelFlag *next;
    	gchar name[1];		/* name allocated as part of the structure */
    } CamelFlag;

### CamelTag

    typedef struct {
    	struct _CamelTag *next;
    	gchar *value;
    	gchar name[1];		/* name allocated as part of the structure */
    } CamelTag;

### CamelSummaryMessageID

    typedef struct {
    	union {
    		guint64 id;
    		guchar hash[8];
    		struct {
    			guint32 hi;
    			guint32 lo;
    		} part;
    	} id;
    } CamelSummaryMessageID;

### CamelSummaryReferences

    typedef struct {
    	gint size;
    	CamelSummaryMessageID references[1];
    } CamelSummaryReferences;

### enum CamelFolderSummaryFlags

#### Members

CAMEL_FOLDER_SUMMARY_DIRTY | There are changes in summary, which should be saved. |
CAMEL_FOLDER_SUMMARY_IN_MEMORY_ONLY | Summary with this flag doesn't use DB for storing its content, it is always created on the fly. |

## Property Details

### The `“build-content”` property

      “build-content”            gboolean

Whether to build CamelMessageInfo.content.

Flags: Read / Write

Default value: FALSE

### The `“deleted-count”` property

      “deleted-count”            guint

How many deleted infos is saved in a summary.

Flags: Read

Default value: 0

### The `“folder”` property

      “folder”                   CamelFolder *

The CamelFolder to which the folder summary belongs.

Flags: Read / Write / Construct Only

### The `“junk-count”` property

      “junk-count”               guint

How many junk infos is saved in a summary.

Flags: Read

Default value: 0

### The `“junk-not-deleted-count”` property

      “junk-not-deleted-count”   guint

How many junk and not deleted infos is saved in a summary.

Flags: Read

Default value: 0

### The `“need-preview”` property

      “need-preview”             gboolean

Flags: Read / Write

Default value: FALSE

### The `“saved-count”` property

      “saved-count”              guint

How many infos is saved in a summary.

Flags: Read

Default value: 0

### The `“unread-count”` property

      “unread-count”             guint

How many unread infos is saved in a summary.

Flags: Read

Default value: 0

### The `“visible-count”` property

      “visible-count”            guint

How many visible (not deleted and not junk) infos is saved in a summary.

Flags: Read

Default value: 0