| Top |
HTML compliance diagnosticsHTML compliance diagnostics — HTML recovery diagnostics and reporting limits |
A logger receives an issue valid for the duration of its callback. Description and remarks strings are static. A zero per-violation limit means unlimited reporting. Otherwise one truncation marker is emitted at the first suppressed issue; changing the logger, options or limit starts a new reporting budget.
void (*GMimeHtmlComplianceLogger) (const GMimeHtmlComplianceIssue *issue,gpointer user_data);
Receives an HTML compliance diagnostic.
issue |
a diagnostic valid only during this callback. |
[transfer none] |
user_data |
callback data. |
[closure][nullable] |
GMimeHtmlComplianceOptions *
g_mime_html_compliance_options_new (void);
GMimeHtmlComplianceOptions *
g_mime_html_compliance_options_ref (GMimeHtmlComplianceOptions *options);
void
g_mime_html_compliance_options_unref (GMimeHtmlComplianceOptions *options);
Releases one reference to options
.
GMimeHtmlComplianceOptions *
g_mime_html_compliance_options_clone (const GMimeHtmlComplianceOptions *options);
guint
g_mime_html_compliance_options_get_max_issues_per_violation
(const GMimeHtmlComplianceOptions *options);
Gets the reporting limit for each violation. The default is zero, meaning unlimited reporting.
void g_mime_html_compliance_options_set_max_issues_per_violation (GMimeHtmlComplianceOptions *options,guint maximum);
Sets the reporting limit. A tokenizer emits one
GMIME_HTML_COMPLIANCE_VIOLATION_TOO_MANY_COMPLIANCE_ISSUES diagnostic when
reports are first suppressed. Changing the limit resets its reporting budget.
const char *
g_mime_html_compliance_violation_get_description
(GMimeHtmlComplianceViolation violation);
const char *
g_mime_html_compliance_violation_get_remarks
(GMimeHtmlComplianceViolation violation);
GMimeComplianceSeverity
g_mime_html_compliance_violation_get_severity
(GMimeHtmlComplianceViolation violation);
Gets the default severity of violation
.
GMimeComplianceCategories
g_mime_html_compliance_violation_get_categories
(GMimeHtmlComplianceViolation violation);
Gets the diagnostic categories associated with violation
.
HTML lexical and structural recovery diagnostics. Descriptions, remarks, severities and categories are available through the violation accessors.
typedef struct {
GMimeHtmlComplianceViolation violation;
GMimeComplianceSeverity severity;
GMimeComplianceCategories categories;
gint64 offset;
int line_number, line_position;
const char *description;
} GMimeHtmlComplianceIssue;
A diagnostic borrowed by a compliance callback. The structure is only valid for the duration of that callback.
GMimeHtmlComplianceViolation |
the reported violation |
|
GMimeComplianceSeverity |
diagnostic severity |
|
GMimeComplianceCategories |
diagnostic categories |
|
zero-based Unicode scalar offset |
||
one-based line number |
||
one-based Unicode scalar column |
||
a borrowed description. |
[transfer none] |