| Top |
| GMimeReceivedClause * | g_mime_received_clause_new () |
| GMimeReceivedClause * | g_mime_received_clause_new_with_comment () |
| GMimeReceivedClauseId | g_mime_received_clause_get_id () |
| const char * | g_mime_received_clause_get_keyword () |
| const char * | g_mime_received_clause_get_value () |
| gboolean | g_mime_received_clause_set_value () |
| int | g_mime_received_clause_get_comment_count () |
| const char * | g_mime_received_clause_get_comment () |
| int | g_mime_received_clause_index_of_comment () |
| void | g_mime_received_clause_add_comment () |
| void | g_mime_received_clause_insert_comment () |
| void | g_mime_received_clause_set_comment () |
| gboolean | g_mime_received_clause_remove_comment () |
| void | g_mime_received_clause_remove_comment_at () |
| void | g_mime_received_clause_clear_comments () |
Ports MimeKit's ReceivedClause model. Keywords retain their spelling, while common clause identifiers are recognized ignoring ASCII case. Values are validated without trimming, unfolding or normalization. Failed assignments leave the previous value and comments unchanged.
Comments are independent UTF-8 strings, without parentheses. Like MimeKit's public comment list, they may be empty and may contain control characters or line breaks. This model does not serialize them; a writer must escape and fold comments rather than emitting them verbatim.
GMimeReceivedClause * g_mime_received_clause_new (const char *keyword,const char *value,GError **error);
Creates a clause with no comments. The keyword must not start with a hyphen.
Common keywords are recognized ignoring case; extension keywords use
GMIME_RECEIVED_CLAUSE_UNKNOWN. Invalid text reports GMIME_ERROR_PARSE_ERROR.
keyword |
a nonempty ASCII keyword containing only letters and hyphens |
|
value |
a nonempty UTF-8 clause value |
|
error |
return location for a GError. |
[nullable] |
GMimeReceivedClause * g_mime_received_clause_new_with_comment (const char *keyword,const char *value,const char *comment,GError **error);
Creates a validated clause with one comment, which may be empty.
keyword |
the clause keyword |
|
value |
a nonempty UTF-8 clause value |
|
comment |
a UTF-8 comment without enclosing parentheses |
|
error |
return location for a GError. |
[nullable] |
GMimeReceivedClauseId
g_mime_received_clause_get_id (GMimeReceivedClause *clause);
const char *
g_mime_received_clause_get_keyword (GMimeReceivedClause *clause);
const char *
g_mime_received_clause_get_value (GMimeReceivedClause *clause);
gboolean g_mime_received_clause_set_value (GMimeReceivedClause *clause,const char *value,GError **error);
Validates and copies value
without normalization. Invalid text reports
GMIME_ERROR_PARSE_ERROR and leaves the clause unchanged.
clause |
||
value |
a nonempty UTF-8 clause value |
|
error |
return location for a GError. |
[nullable] |
int
g_mime_received_clause_get_comment_count
(GMimeReceivedClause *clause);
const char * g_mime_received_clause_get_comment (GMimeReceivedClause *clause,int index);
int g_mime_received_clause_index_of_comment (GMimeReceivedClause *clause,const char *comment);
void g_mime_received_clause_add_comment (GMimeReceivedClause *clause,const char *comment);
Appends an owned copy of comment
.
void g_mime_received_clause_insert_comment (GMimeReceivedClause *clause,int index,const char *comment);
Inserts an owned copy without changing the order of existing comments.
void g_mime_received_clause_set_comment (GMimeReceivedClause *clause,int index,const char *comment);
Replaces one comment with an owned copy. comment
may alias any comment
or other string stored in clause
.
gboolean g_mime_received_clause_remove_comment (GMimeReceivedClause *clause,const char *comment);
Removes only the first exact, case-sensitive match.
void g_mime_received_clause_remove_comment_at (GMimeReceivedClause *clause,int index);
Removes one comment, preserving the order of the remaining comments.
void
g_mime_received_clause_clear_comments (GMimeReceivedClause *clause);
Removes all comments without changing the keyword or value.