Camel.JunkFilter¶
| Implementations: | |
|---|---|
| None | |
Methods¶
| classify(message, cancellable) | |
| learn_junk(message, cancellable) | |
| learn_not_junk(message, cancellable) | |
| synchronize(cancellable) | 
Virtual Methods¶
| do_classify(message, cancellable) | |
| do_learn_junk(message, cancellable) | |
| do_learn_not_junk(message, cancellable) | |
| do_synchronize(cancellable) | 
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- 
class Camel.JunkFilter¶
- Bases: - GObject.GInterface- Structure: - Camel.JunkFilterInterface- New in version 3.2. - 
classify(message, cancellable)¶
- Parameters: - message (Camel.MimeMessage) – aCamel.MimeMessage
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - the junk status determined by self - Return type: - Classifies message as junk, not junk or inconclusive. - If an error occurs, the function sets error and returns - Camel.JunkStatus.ERROR.- New in version 3.2. 
- message (
 - 
learn_junk(message, cancellable)¶
- Parameters: - message (Camel.MimeMessage) – aCamel.MimeMessage
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Trueif message was successfully classified- Return type: - Instructs self to classify message as junk. If using an adaptive junk filtering algorithm, explicitly marking message as junk will influence the classification of future messages. - If an error occurs, the function sets error and returns - False.- New in version 3.2. 
- message (
 - 
learn_not_junk(message, cancellable)¶
- Parameters: - message (Camel.MimeMessage) – aCamel.MimeMessage
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Trueif message was successfully classified- Return type: - Instructs self to classify message as not junk. If using an adaptive junk filtering algorithm, explicitly marking message as not junk will influence the classification of future messages. - If an error occurs, the function sets error and returns - False.- New in version 3.2. 
- message (
 - 
synchronize(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – optional- Gio.Cancellableobject, or- None- Raises: - GLib.Error- Returns: - Trueif self was successfully synchronized- Return type: - bool- Instructs self to flush any in-memory caches to disk, if applicable. When filtering many messages, delaying this step until all messages have been classified can improve performance. - If an error occurs, the function sets error and returns - False.- New in version 3.2. 
 - 
do_classify(message, cancellable) virtual¶
- Parameters: - message (Camel.MimeMessage) – aCamel.MimeMessage
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Returns: - the junk status determined by junk_filter - Return type: - Classifies message as junk, not junk or inconclusive. - If an error occurs, the function sets error and returns - Camel.JunkStatus.ERROR.- New in version 3.2. 
- message (
 - 
do_learn_junk(message, cancellable) virtual¶
- Parameters: - message (Camel.MimeMessage) – aCamel.MimeMessage
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Returns: - Trueif message was successfully classified- Return type: - Instructs junk_filter to classify message as junk. If using an adaptive junk filtering algorithm, explicitly marking message as junk will influence the classification of future messages. - If an error occurs, the function sets error and returns - False.- New in version 3.2. 
- message (
 - 
do_learn_not_junk(message, cancellable) virtual¶
- Parameters: - message (Camel.MimeMessage) – aCamel.MimeMessage
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Returns: - Trueif message was successfully classified- Return type: - Instructs junk_filter to classify message as not junk. If using an adaptive junk filtering algorithm, explicitly marking message as not junk will influence the classification of future messages. - If an error occurs, the function sets error and returns - False.- New in version 3.2. 
- message (
 - 
do_synchronize(cancellable) virtual¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – optional- Gio.Cancellableobject, or- None- Returns: - Trueif junk_filter was successfully synchronized- Return type: - bool- Instructs junk_filter to flush any in-memory caches to disk, if applicable. When filtering many messages, delaying this step until all messages have been classified can improve performance. - If an error occurs, the function sets error and returns - False.- New in version 3.2. 
 
-