Method

CamelFilterDriverfilter_message

Declaration [src]

gint
camel_filter_driver_filter_message (
  CamelFilterDriver* driver,
  CamelMimeMessage* message,
  CamelMessageInfo* info,
  const gchar* uid,
  CamelFolder* source,
  const gchar* store_uid,
  const gchar* original_store_uid,
  GCancellable* cancellable,
  GError** error
)

Description [src]

Filters a message based on rules defined in the FilterDriver object. If the source folder (source) and the uid (uid) are provided, the filter will operate on the CamelFolder (which in certain cases is more efficient than using the default camel_folder_append_message() function).

Parameters

message

Type: CamelMimeMessage

Message to filter or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
info

Type: CamelMessageInfo

Message info or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
uid

Type: const gchar*

Message uid or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
source

Type: CamelFolder

Source folder or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
store_uid

Type: const gchar*

UID of source store, or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
original_store_uid

Type: const gchar*

UID of source store (pre-movemail), or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
cancellable

Type: GCancellable

Optional GCancellable object, or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gint

-1 if errors were encountered during filtering, otherwise returns 0.