| Top |
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.
GMimeHeaderListCollection *
g_mime_header_list_collection_new (void);
int
g_mime_header_list_collection_get_count
(GMimeHeaderListCollection *collection);
GMimeHeaderList * g_mime_header_list_collection_get_group (GMimeHeaderListCollection *collection,int index);
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.
collection |
||
index |
an existing group index |
|
group |
the replacement header group. |
[transfer none] |
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.
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.
gboolean g_mime_header_list_collection_contains (GMimeHeaderListCollection *collection,GMimeHeaderList *group);
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.