Camel.StoreSearch
Description: Reference for Camel.StoreSearch

### Class

# CamelStoreSearch

since: 3.58

#### Description [src]

    class Camel.StoreSearch : GObject.Object
    {
      /* No available fields */
    }

Search between multiple folders of one `CamelStore`.

The `CamelStoreSearch` allows to search between multiple folders of a single `CamelStore`. It’s primarily meant to be used by the search folders (`CamelVeeFolder`), but it can be used without it too.

It can run only one search at a time, using camel_store_search_rebuild_sync().

The `CamelStoreSearch` is not thread safe, it’s meant to be created, used and freed from within the same thread only.

Available since: 3.58

#### Hierarchy

#### Ancestors

- GObject

#### Constructors

###### camel_store_search_new

Creates a new `CamelStoreSearch`, which will operate on folders from the `store`.

since: 3.58

#### Instance methods

###### camel_store_search_add_folder

Adds the `folder` to the list of the folders to be searched in by the `self`. The function does nothing when the `folder` is already part of the `folder`.

since: 3.58

###### camel_store_search_add_match_index

Adds a match index `index` into the `self`. It can be referenced in the search expression with ‘in-match-index “index_key”’ statement, where the index_key is “%p” of the `index`.

since: 3.58

###### camel_store_search_add_match_threads_items_sync

Adds `CamelStoreSearchThreadItem` items into the location pointed to by the `inout_items` array. When it points to the `NULL`, the array is created if needed. Free the array with g_ptr_array_unref(), when no longer needed.

since: 3.58

###### camel_store_search_dup_additional_columns

Gets a new `GPtrArray` with additional columns names previously set by the camel_store_search_set_additional_columns(), or `NULL`, when none had been set.

since: 3.58

###### camel_store_search_get_expression

Gets search expression previously set by the camel_store_search_set_expression().

since: 3.58

###### camel_store_search_get_items_sync

Reads all the items from all the set folders satisfying the set expression.

since: 3.58

###### camel_store_search_get_match_threads_kind

Gets the kind of the ‘match-threads’ search statement of the expression as recognized by the last `camel_store_search_rebuild_sync()` call, as one of the `CamelMatchThreadsKind` values.

since: 3.58

###### camel_store_search_get_store

Gets a `CamelStore` the `self` was constructed for.

since: 3.58

###### camel_store_search_get_uids_sync

Reads all the message UID-s from the folder `folder_name` satisfying the set expression. Sets the `out_uids` to `NULL` and returns `TRUE` when the `folder_name` is not part of the `self`.

since: 3.58

###### camel_store_search_list_folders

Lists the `CamelFolder`-s the `self` searches in.

since: 3.58

###### camel_store_search_list_match_indexes

Lists all the match indexes added in the `self`.

since: 3.58

###### camel_store_search_rebuild_sync

Rebuilds content of the `self` with the current search expression. The function does nothing when no search expression is set. It can be called with no folder set, then it parses the expression and sets the values for the camel_store_search_get_match_threads_kind().

since: 3.58

###### camel_store_search_ref_result_index

Gets a `CamelStoreSearchIndex` being used as a search result index, previously set by camel_store_search_set_result_index(), or `NULL`, when none is set.

since: 3.58

###### camel_store_search_remove_folder

Removes the `folder` from the list of the folders the `self` should search in. It does nothing when the `folder` is not part of the `self`.

since: 3.58

###### camel_store_search_remove_match_index

Removes the `index` from from list of the match indexes. The function does nothing when the `index` is not part of the match indexes.

since: 3.58

###### camel_store_search_set_additional_columns

Sets what additional column names should be pre-read and provided in the `camel_store_search_get_items_sync()` result. An empty array is the same as passing `NULL` for the `colnames`.

since: 3.58

###### camel_store_search_set_expression

Sets the search `expression` to be used to search the messages in the selected folders with.

since: 3.58

###### camel_store_search_set_result_index

Sets, or unsets, a `CamelStoreSearchIndex` to be used for the search. The index contains all the items satisfying the expression.

since: 3.58

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Camel.StoreSearch:store

A `CamelStore` this search works with.

since: 3.58

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct CamelStoreSearchClass {
      GObjectClass parent_class;
      gpointer reserved;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.

`reserved: gpointer`

  No description available.