cd-profile

cd-profile — Client object for accessing information about colord profiles

Synopsis

#define             CD_PROFILE_ERROR
#define             CD_PROFILE_TYPE_ERROR
enum                CdProfileError;
void                (*_cd_profile_reserved1)            (void);
void                (*_cd_profile_reserved2)            (void);
void                (*_cd_profile_reserved3)            (void);
void                (*_cd_profile_reserved4)            (void);
void                (*_cd_profile_reserved5)            (void);
void                (*_cd_profile_reserved6)            (void);
void                (*_cd_profile_reserved7)            (void);
void                (*_cd_profile_reserved8)            (void);
void                cd_profile_connect                  (CdProfile *profile,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            cd_profile_connect_finish           (CdProfile *profile,
                                                         GAsyncResult *res,
                                                         GError **error);
gboolean            cd_profile_equal                    (CdProfile *profile1,
                                                         CdProfile *profile2);
GQuark              cd_profile_error_quark              (void);
gint64              cd_profile_get_age                  (CdProfile *profile);
CdColorspace        cd_profile_get_colorspace           (CdProfile *profile);
gboolean            cd_profile_get_connected            (CdProfile *profile);
gint64              cd_profile_get_created              (CdProfile *profile);
const gchar *       cd_profile_get_filename             (CdProfile *profile);
const gchar *       cd_profile_get_format               (CdProfile *profile);
gboolean            cd_profile_get_has_vcgt             (CdProfile *profile);
const gchar *       cd_profile_get_id                   (CdProfile *profile);
gboolean            cd_profile_get_is_system_wide       (CdProfile *profile);
CdProfileKind       cd_profile_get_kind                 (CdProfile *profile);
GHashTable *        cd_profile_get_metadata             (CdProfile *profile);
const gchar *       cd_profile_get_metadata_item        (CdProfile *profile,
                                                         const gchar *key);
const gchar *       cd_profile_get_object_path          (CdProfile *profile);
guint               cd_profile_get_owner                (CdProfile *profile);
const gchar *       cd_profile_get_qualifier            (CdProfile *profile);
CdObjectScope       cd_profile_get_scope                (CdProfile *profile);
const gchar *       cd_profile_get_title                (CdProfile *profile);
gboolean            cd_profile_has_access               (CdProfile *profile);
void                cd_profile_install_system_wide      (CdProfile *profile,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            cd_profile_install_system_wide_finish
                                                        (CdProfile *profile,
                                                         GAsyncResult *res,
                                                         GError **error);
CdProfile *         cd_profile_new                      (void);
CdProfile *         cd_profile_new_with_object_path     (const gchar *object_path);
void                cd_profile_set_object_path          (CdProfile *profile,
                                                         const gchar *object_path);
void                cd_profile_set_property             (CdProfile *profile,
                                                         const gchar *key,
                                                         const gchar *value,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            cd_profile_set_property_finish      (CdProfile *profile,
                                                         GAsyncResult *res,
                                                         GError **error);
gchar *             cd_profile_to_string                (CdProfile *profile);
void                (*changed)                          (CdClient *client);

Description

A helper GObject to use for accessing colord profiles, and to be notified when it is changed.

See also: CdClient

Details

CD_PROFILE_ERROR

#define CD_PROFILE_ERROR (cd_profile_error_quark ())


CD_PROFILE_TYPE_ERROR

#define CD_PROFILE_TYPE_ERROR (cd_profile_error_get_type ())


enum CdProfileError

typedef enum {
	CD_PROFILE_ERROR_FAILED,
	CD_PROFILE_ERROR_LAST
} CdProfileError;

Errors that can be thrown

CD_PROFILE_ERROR_FAILED

the transaction failed for an unknown reason

CD_PROFILE_ERROR_LAST


_cd_profile_reserved1 ()

void                (*_cd_profile_reserved1)            (void);


_cd_profile_reserved2 ()

void                (*_cd_profile_reserved2)            (void);


_cd_profile_reserved3 ()

void                (*_cd_profile_reserved3)            (void);


_cd_profile_reserved4 ()

void                (*_cd_profile_reserved4)            (void);


_cd_profile_reserved5 ()

void                (*_cd_profile_reserved5)            (void);


_cd_profile_reserved6 ()

void                (*_cd_profile_reserved6)            (void);


_cd_profile_reserved7 ()

void                (*_cd_profile_reserved7)            (void);


_cd_profile_reserved8 ()

void                (*_cd_profile_reserved8)            (void);


cd_profile_connect ()

void                cd_profile_connect                  (CdProfile *profile,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Connects to the object and fills up initial properties.

profile :

a CdProfile instance.

cancellable :

a GCancellable, or NULL

callback :

the function to run on completion

user_data :

the data to pass to callback

Since 0.1.8


cd_profile_connect_finish ()

gboolean            cd_profile_connect_finish           (CdProfile *profile,
                                                         GAsyncResult *res,
                                                         GError **error);

Gets the result from the asynchronous function.

profile :

a CdProfile instance.

res :

the GAsyncResult

error :

A GError or NULL

Returns :

success

Since 0.1.8


cd_profile_equal ()

gboolean            cd_profile_equal                    (CdProfile *profile1,
                                                         CdProfile *profile2);

Tests two profiles for equality.

profile1 :

one CdProfile instance.

profile2 :

another CdProfile instance.

Returns :

TRUE if the profiles are the same device

Since 0.1.8


cd_profile_error_quark ()

GQuark              cd_profile_error_quark              (void);

Returns :

An error quark.

Since 0.1.0


cd_profile_get_age ()

gint64              cd_profile_get_age                  (CdProfile *profile);

Gets the profile age in seconds relative to the current time.

profile :

a CdProfile instance.

Returns :

A UNIX time, or 0 if the profile has no creation date

Since 0.1.8


cd_profile_get_colorspace ()

CdColorspace        cd_profile_get_colorspace           (CdProfile *profile);

Gets the profile colorspace.

profile :

a CdProfile instance.

Returns :

A CdColorspace, e.g. CD_COLORSPACE_RGB

Since 0.1.2


cd_profile_get_connected ()

gboolean            cd_profile_get_connected            (CdProfile *profile);

Gets if the profile has been connected.

profile :

a CdProfile instance.

Returns :

TRUE if properties are valid

Since 0.1.9


cd_profile_get_created ()

gint64              cd_profile_get_created              (CdProfile *profile);

Gets the profile created date and time.

profile :

a CdProfile instance.

Returns :

A UNIX time, or 0 if the profile has no creation date

Since 0.1.8


cd_profile_get_filename ()

const gchar *       cd_profile_get_filename             (CdProfile *profile);

Gets the profile filename.

profile :

a CdProfile instance.

Returns :

A string, or NULL for invalid

Since 0.1.0


cd_profile_get_format ()

const gchar *       cd_profile_get_format               (CdProfile *profile);

Gets the profile format.

profile :

a CdProfile instance.

Returns :

A string, or NULL for invalid

Since 0.1.4


cd_profile_get_has_vcgt ()

gboolean            cd_profile_get_has_vcgt             (CdProfile *profile);

Returns if the profile has a VCGT table.

profile :

a CdProfile instance.

Returns :

TRUE if VCGT is valid.

Since 0.1.2


cd_profile_get_id ()

const gchar *       cd_profile_get_id                   (CdProfile *profile);

Gets the profile ID.

profile :

a CdProfile instance.

Returns :

A string, or NULL for invalid

Since 0.1.0


cd_profile_get_is_system_wide ()

gboolean            cd_profile_get_is_system_wide       (CdProfile *profile);

Returns if the profile is installed system wide and available for all users.

profile :

a CdProfile instance.

Returns :

TRUE if system wide.

Since 0.1.2


cd_profile_get_kind ()

CdProfileKind       cd_profile_get_kind                 (CdProfile *profile);

Gets the profile kind.

profile :

a CdProfile instance.

Returns :

A CdProfileKind, e.g. CD_PROFILE_KIND_DISPLAY_DEVICE

Since 0.1.1


cd_profile_get_metadata ()

GHashTable *        cd_profile_get_metadata             (CdProfile *profile);

Returns the profile metadata.

profile :

a CdProfile instance.

Returns :

a GHashTable. [transfer full]

Since 0.1.2


cd_profile_get_metadata_item ()

const gchar *       cd_profile_get_metadata_item        (CdProfile *profile,
                                                         const gchar *key);

Returns the profile metadata for a specific key.

profile :

a CdProfile instance.

key :

a key for the metadata dictionary

Returns :

the metadata value, or NULL if not set.

Since 0.1.5


cd_profile_get_object_path ()

const gchar *       cd_profile_get_object_path          (CdProfile *profile);

Gets the object path for the profile.

profile :

a CdProfile instance.

Returns :

the object path, or NULL

Since 0.1.0


cd_profile_get_owner ()

guint               cd_profile_get_owner                (CdProfile *profile);

Gets the profile owner.

profile :

a CdProfile instance.

Returns :

The UID of the user that created the device

Since 0.1.13


cd_profile_get_qualifier ()

const gchar *       cd_profile_get_qualifier            (CdProfile *profile);

Gets the profile qualifier.

profile :

a CdProfile instance.

Returns :

A string, or NULL for invalid

Since 0.1.0


cd_profile_get_scope ()

CdObjectScope       cd_profile_get_scope                (CdProfile *profile);

Gets the profile scope.

profile :

a CdProfile instance.

Returns :

A CdObjectScope, e.g. CD_OBJECT_SCOPE_UNKNOWN

Since 0.1.10


cd_profile_get_title ()

const gchar *       cd_profile_get_title                (CdProfile *profile);

Gets the profile title.

profile :

a CdProfile instance.

Returns :

A string, or NULL for invalid

Since 0.1.0


cd_profile_has_access ()

gboolean            cd_profile_has_access               (CdProfile *profile);

Gets if the current user has access permissions to the profile.

profile :

a CdProfile instance.

Returns :

A string, or NULL for invalid

Since 0.1.13


cd_profile_install_system_wide ()

void                cd_profile_install_system_wide      (CdProfile *profile,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Sets the profile system wide.

profile :

a CdProfile instance.

cancellable :

a GCancellable, or NULL

callback :

the function to run on completion

user_data :

the data to pass to callback

Since 0.1.8


cd_profile_install_system_wide_finish ()

gboolean            cd_profile_install_system_wide_finish
                                                        (CdProfile *profile,
                                                         GAsyncResult *res,
                                                         GError **error);

Gets the result from the asynchronous function.

profile :

a CdProfile instance.

res :

the GAsyncResult

error :

A GError or NULL

Returns :

success

Since 0.1.8


cd_profile_new ()

CdProfile *         cd_profile_new                      (void);

Creates a new CdProfile object.

Returns :

a new CdProfile object.

Since 0.1.0


cd_profile_new_with_object_path ()

CdProfile *         cd_profile_new_with_object_path     (const gchar *object_path);

Creates a new CdProfile object with a known object path.

object_path :

The colord object path.

Returns :

a new profile object.

Since 0.1.8


cd_profile_set_object_path ()

void                cd_profile_set_object_path          (CdProfile *profile,
                                                         const gchar *object_path);

Sets the object path of the profile.

profile :

a CdProfile instance.

object_path :

The colord object path.

Since 0.1.8


cd_profile_set_property ()

void                cd_profile_set_property             (CdProfile *profile,
                                                         const gchar *key,
                                                         const gchar *value,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Deletes a color device.

profile :

a CdProfile instance.

key :

a key name

value :

a key value

cancellable :

a GCancellable, or NULL

callback :

the function to run on completion

user_data :

the data to pass to callback

Since 0.1.8


cd_profile_set_property_finish ()

gboolean            cd_profile_set_property_finish      (CdProfile *profile,
                                                         GAsyncResult *res,
                                                         GError **error);

Gets the result from the asynchronous function.

profile :

a CdProfile instance.

res :

the GAsyncResult

error :

A GError or NULL

Returns :

success

Since 0.1.8


cd_profile_to_string ()

gchar *             cd_profile_to_string                (CdProfile *profile);

Converts the profile to a string description.

profile :

a CdProfile instance.

Returns :

text representation of CdProfile

Since 0.1.0


changed ()

void                (*changed)                          (CdClient *client);