## CdIccStore

CdIccStore — An object to monitor a directory full of ICC profiles

## Functions

CdIccStore * | cd_icc_store_new ()
gboolean | cd_icc_store_search_location ()
gboolean | cd_icc_store_search_kind ()
void | cd_icc_store_set_load_flags ()
CdIccLoadFlags | cd_icc_store_get_load_flags ()
void | cd_icc_store_set_cache ()
GPtrArray * | cd_icc_store_get_all ()
CdIcc * | cd_icc_store_find_by_filename ()
CdIcc * | cd_icc_store_find_by_checksum ()

## Types and Values

#define | CD_TYPE_ICC_STORE
struct | CdIccStoreClass
enum | CdIccStoreSearchFlags
enum | CdIccStoreSearchKind
| CdIccStore

## Description

## Functions

### cd_icc_store_new ()

    CdIccStore *
    cd_icc_store_new (void);

Creates a new CdIccStore object.

#### Returns

a new CdIccStore object.

Since: 1.0.2

### cd_icc_store_search_location ()

    gboolean
    cd_icc_store_search_location (CdIccStore *store,
                                  const gchar *location,
                                  CdIccStoreSearchFlags search_flags,
                                  GCancellable *cancellable,
                                  GError **error);

Adds a location to be watched for ICC profiles

#### Parameters

store | a CdIccStore instance. |
location | a fully qualified path |
search_flags | CdIccStoreSearchFlags, e.g. `CD_ICC_STORE_SEARCH_FLAGS_CREATE_LOCATION` |
cancellable | A GCancellable or `NULL` |
error | A GError or `NULL` |

#### Returns

`TRUE` for success

Since: 1.0.2

### cd_icc_store_search_kind ()

    gboolean
    cd_icc_store_search_kind (CdIccStore *store,
                              CdIccStoreSearchKind search_kind,
                              CdIccStoreSearchFlags search_flags,
                              GCancellable *cancellable,
                              GError **error);

Adds a location to be watched for ICC profiles

#### Parameters

store | a CdIccStore instance. |
search_kind | a CdIccStoreSearchKind, e.g. `CD_ICC_STORE_SEARCH_KIND_USER` |
search_flags | a CdIccStoreSearchFlags, e.g. `CD_ICC_STORE_SEARCH_FLAGS_CREATE_LOCATION` |
cancellable | A GCancellable or `NULL` |
error | A GError or `NULL` |

#### Returns

`TRUE` for success

Since: 1.0.2

### cd_icc_store_set_load_flags ()

    void
    cd_icc_store_set_load_flags (CdIccStore *store,
                                 CdIccLoadFlags load_flags);

Sets the load flags to use when loading newly added profiles

#### Parameters

store | a CdIccStore instance. |
load_flags | CdIccLoadFlags, e.g. `CD_ICC_LOAD_FLAGS_TRANSLATIONS` |

Since: 1.0.2

### cd_icc_store_get_load_flags ()

    CdIccLoadFlags
    cd_icc_store_get_load_flags (CdIccStore *store);

Gets the load flags to use when loading newly added profiles

#### Parameters

store | a CdIccStore instance. |

#### Returns

the load flags to use

Since: 1.0.2

### cd_icc_store_set_cache ()

    void
    cd_icc_store_set_cache (CdIccStore *store,
                            GResource *cache);

Sets an optional cache to use when reading profiles. This is probably only useful to the colord daemon. This function can only be called once.

#### Parameters

store | a CdIccStore instance. |
cache | a GResource |

Since: 1.0.2

### cd_icc_store_get_all ()

    GPtrArray *
    cd_icc_store_get_all (CdIccStore *store);

Gets the list of CdIcc objects in the store

#### Parameters

store | a CdIccStore instance. |

#### Returns

ICC profile objects.

[transfer container][element-type CdIcc]

Since: 1.0.2

### cd_icc_store_find_by_filename ()

    CdIcc *
    cd_icc_store_find_by_filename (CdIccStore *store,
                                   const gchar *filename);

Finds a ICC object in the store by filename.

#### Parameters

store | a CdIccStore instance. |
filename | a fully qualified filename |

#### Returns

an ICC profile object or `NULL`.

[transfer full]

Since: 1.0.2

### cd_icc_store_find_by_checksum ()

    CdIcc *
    cd_icc_store_find_by_checksum (CdIccStore *store,
                                   const gchar *checksum);

Finds a ICC object in the store by checksum.

#### Parameters

store | a CdIccStore instance. |
checksum | a checksum value |

#### Returns

an ICC profile object or `NULL`.

[transfer full]

Since: 1.0.2

## Types and Values

### CD_TYPE_ICC_STORE

    #define CD_TYPE_ICC_STORE (cd_icc_store_get_type ())

### struct CdIccStoreClass

    struct CdIccStoreClass {
    	GObjectClass parent_class;
    	void		(* added)		(CdIcc		*icc);
    	void		(* removed)		(CdIcc		*icc);
    };

### enum CdIccStoreSearchFlags

Flags used when adding scan locations.

#### Members

CD_ICC_STORE_SEARCH_FLAGS_NONE | No flags set. |
CD_ICC_STORE_SEARCH_FLAGS_CREATE_LOCATION | Create the location if it does not exist |

Since: 1.1.1

### enum CdIccStoreSearchKind

The kind of profiles locations to search.

#### Members

CD_ICC_STORE_SEARCH_KIND_SYSTEM | Per-system locations |
CD_ICC_STORE_SEARCH_KIND_MACHINE | Per-machine locations |
CD_ICC_STORE_SEARCH_KIND_USER | Per-user locations |

Since: 1.1.1

### CdIccStore

    typedef struct _CdIccStore CdIccStore;