Constructor

CamelFolderThreadnew_items

unstable since: 3.58

Declaration [src]

CamelFolderThread*
camel_folder_thread_new_items (
  GPtrArray* items,
  CamelFolderThreadFlags flags,
  CamelFolderThreadStrFunc get_uid_func,
  CamelFolderThreadStrFunc get_subject_func,
  CamelFolderThreadUint64Func get_message_id_func,
  CamelFolderThreadArrayFunc get_references_func,
  CamelFolderThreadInt64Func get_date_sent_func,
  CamelFolderThreadInt64Func get_date_received_func,
  CamelFolderThreadVoidFunc lock_func,
  CamelFolderThreadVoidFunc unlock_func
)

Description [src]

Creates a folder tree of the provided items, which can be accessed only by the provided functions. The get_date_sent_func and the get_date_received_func can be NULL only when the flags does not contain CAMEL_FOLDER_THREAD_FLAG_SORT.

The lock_func and thed unlock_func can be NULL, but both at the same time can be set or unset.

The items array is referenced and should not be manipulated for the life time of the returned CamelFolderThread.

Available since: 3.58

This constructor is not directly available to language bindings.

Parameters

items

Type: An array of gpointer

Items to thread.

The data is owned by the caller of the function.
flags

Type: CamelFolderThreadFlags

Bit-or of CamelFolderThreadFlags.

get_uid_func

Type: CamelFolderThreadStrFunc

An item get function, to get UID.

get_subject_func

Type: CamelFolderThreadStrFunc

An item get function, to get subject.

get_message_id_func

Type: CamelFolderThreadUint64Func

An item get function, to get encoded message ID.

get_references_func

Type: CamelFolderThreadArrayFunc

An item get function, to get references.

get_date_sent_func

Type: CamelFolderThreadInt64Func

An item get function, to get sent date, or NULL.

The argument can be NULL.
get_date_received_func

Type: CamelFolderThreadInt64Func

An item get function, to get received date, or NULL.

The argument can be NULL.
lock_func

Type: CamelFolderThreadVoidFunc

An item get function, to lock for changes, or NULL.

The argument can be NULL.
unlock_func

Type: CamelFolderThreadVoidFunc

An item get function, to unlock for changes, or NULL.

The argument can be NULL.

Return value

Type: CamelFolderThread

A new CamelFolderThread, containing a tree of CamelFolderThreadNode-s which represent the threaded structure of the items.

The caller of the function takes ownership of the data, and is responsible for freeing it.