CdIccStore

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

Synopsis

#define             CD_TYPE_ICC_STORE
struct              CdIccStoreClass;
enum                CdIccStoreSearchFlags;
enum                CdIccStoreSearchKind;
CdIccStore *        cd_icc_store_new                    (void);
gboolean            cd_icc_store_search_location        (CdIccStore *store,
                                                         const gchar *location,
                                                         CdIccStoreSearchFlags search_flags,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            cd_icc_store_search_kind            (CdIccStore *store,
                                                         CdIccStoreSearchKind search_kind,
                                                         CdIccStoreSearchFlags search_flags,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                cd_icc_store_set_load_flags         (CdIccStore *store,
                                                         CdIccLoadFlags load_flags);
CdIccLoadFlags      cd_icc_store_get_load_flags         (CdIccStore *store);
void                cd_icc_store_set_cache              (CdIccStore *store,
                                                         GResource *cache);
GPtrArray *         cd_icc_store_get_all                (CdIccStore *store);
CdIcc *             cd_icc_store_find_by_filename       (CdIccStore *store,
                                                         const gchar *filename);
CdIcc *             cd_icc_store_find_by_checksum       (CdIccStore *store,
                                                         const gchar *checksum);

Description

Details

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

typedef enum {
	CD_ICC_STORE_SEARCH_FLAGS_NONE			= 0, /* Since: 1.0.2 */
	CD_ICC_STORE_SEARCH_FLAGS_CREATE_LOCATION = 1, /* Since: 1.0.2 */
} CdIccStoreSearchFlags;

Flags used when adding scan locations.

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

typedef enum {
	CD_ICC_STORE_SEARCH_KIND_SYSTEM,		/* Since: 1.0.2 */
	CD_ICC_STORE_SEARCH_KIND_MACHINE,		/* Since: 1.0.2 */
	CD_ICC_STORE_SEARCH_KIND_USER,			/* Since: 1.0.2 */
} CdIccStoreSearchKind;

The kind of profiles locations to search.

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


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

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

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

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

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.

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

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.

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.

store :

a CdIccStore instance.

checksum :

a checksum value

Returns :

an ICC profile object or NULL. [transfer full]

Since 1.0.2