GMimeHeaderListCollection

GMimeHeaderListCollection — Ordered collections of header groups

Functions

Types and Values

Description

A mutable collection of header lists, retaining each group by reference. Groups may be shared by multiple collections or occur more than once in the same collection. Membership uses object identity, not field values.

Functions

g_mime_header_list_collection_new ()

GMimeHeaderListCollection *
g_mime_header_list_collection_new (void);

Returns

a new empty collection of header groups.

[transfer full]


g_mime_header_list_collection_get_count ()

int
g_mime_header_list_collection_get_count
                               (GMimeHeaderListCollection *collection);

Parameters

collection

a GMimeHeaderListCollection

 

Returns

the number of header groups, including duplicate references.


g_mime_header_list_collection_get_group ()

GMimeHeaderList *
g_mime_header_list_collection_get_group
                               (GMimeHeaderListCollection *collection,
                                int index);

Parameters

collection

a GMimeHeaderListCollection

 

index

an existing group index

 

Returns

the group at index .

[transfer none]


g_mime_header_list_collection_set_group ()

void
g_mime_header_list_collection_set_group
                               (GMimeHeaderListCollection *collection,
                                int index,
                                GMimeHeaderList *group);

Retains group and releases the previous group. Assigning the same group is a no-op. Matching MimeKit, indexed replacement changes group-change subscriptions but does not itself notify an owning entity; subsequent edits to the replacement group do notify it.

Parameters

collection

a GMimeHeaderListCollection

 

index

an existing group index

 

group

the replacement header group.

[transfer none]

g_mime_header_list_collection_add ()

void
g_mime_header_list_collection_add (GMimeHeaderListCollection *collection,
                                   GMimeHeaderList *group);

Retains group and appends it without copying. Adding the same group multiple times is allowed; its edits notify owners once per occurrence.

Parameters

collection

a GMimeHeaderListCollection

 

group

the header group to append.

[transfer none]

g_mime_header_list_collection_clear ()

void
g_mime_header_list_collection_clear (GMimeHeaderListCollection *collection);

Removes and releases all groups, disconnecting their change subscriptions. Notifies an owning entity even when the collection is already empty.

Parameters

collection

a GMimeHeaderListCollection

 

g_mime_header_list_collection_contains ()

gboolean
g_mime_header_list_collection_contains
                               (GMimeHeaderListCollection *collection,
                                GMimeHeaderList *group);

Parameters

collection

a GMimeHeaderListCollection

 

group

a header group

 

Returns

whether the exact group instance belongs to the collection.


g_mime_header_list_collection_remove ()

gboolean
g_mime_header_list_collection_remove (GMimeHeaderListCollection *collection,
                                      GMimeHeaderList *group);

Removes only the first occurrence of group and notifies an owning entity. Removing a group that is not present does not notify it.

Parameters

collection

a GMimeHeaderListCollection

 

group

the header group to remove.

[transfer none]

Returns

whether a group was removed.

Types and Values

GMimeHeaderListCollection

typedef struct _GMimeHeaderListCollection GMimeHeaderListCollection;

An ordered collection of shared header-list groups.

See Also

GMimeHeaderList