1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- 2 * 3 * Copyright (C) 2010 Richard Hughes <richard@hughsie.com> 4 * 5 * Licensed under the GNU General Public License Version 2 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 */ 21 22 #ifndef __CD_PROFILE_H 23 #define __CD_PROFILE_H 24 25 #include <glib-object.h> 26 27 #include "cd-common.h" 28 29 G_BEGIN_DECLS 30 31 #define CD_PROFILE_ERROR cd_profile_error_quark() 32 33 #define CD_TYPE_PROFILE (cd_profile_get_type ()) 34 G_DECLARE_DERIVABLE_TYPE (CdProfile, cd_profile, CD, PROFILE, GObject) 35 36 struct _CdProfileClass 37 { 38 GObjectClass parent_class; 39 void (* invalidate) (CdProfile *profile); 40 }; 41 42 CdProfile *cd_profile_new (void); 43 GQuark cd_profile_error_quark (void); 44 45 /* accessors */ 46 const gchar *cd_profile_get_id (CdProfile *profile); 47 void cd_profile_set_id (CdProfile *profile, 48 const gchar *id); 49 CdObjectScope cd_profile_get_scope (CdProfile *profile); 50 void cd_profile_set_scope (CdProfile *profile, 51 CdObjectScope object_scope); 52 guint cd_profile_get_owner (CdProfile *profile); 53 void cd_profile_set_owner (CdProfile *profile, 54 guint owner); 55 const gchar *cd_profile_get_filename (CdProfile *profile); 56 void cd_profile_set_is_system_wide (CdProfile *profile, 57 gboolean is_system_wide); 58 gboolean cd_profile_get_is_system_wide (CdProfile *profile); 59 gboolean cd_profile_load_from_icc (CdProfile *profile, 60 CdIcc *icc, 61 GError **error) 62 G_GNUC_WARN_UNUSED_RESULT; 63 gboolean cd_profile_load_from_fd (CdProfile *profile, 64 gint fd, 65 GError **error) 66 G_GNUC_WARN_UNUSED_RESULT; 67 gboolean cd_profile_load_from_filename (CdProfile *profile, 68 const gchar *filename, 69 GError **error) 70 G_GNUC_WARN_UNUSED_RESULT; 71 gboolean cd_profile_register_object (CdProfile *profile, 72 GDBusConnection *connection, 73 GDBusInterfaceInfo *info, 74 GError **error) 75 G_GNUC_WARN_UNUSED_RESULT; 76 const gchar *cd_profile_get_qualifier (CdProfile *profile); 77 void cd_profile_set_qualifier (CdProfile *profile, 78 const gchar *qualifier); 79 void cd_profile_set_format (CdProfile *profile, 80 const gchar *format); 81 const gchar *cd_profile_get_checksum (CdProfile *profile); 82 const gchar *cd_profile_get_title (CdProfile *profile); 83 const gchar *cd_profile_get_object_path (CdProfile *profile); 84 GHashTable *cd_profile_get_metadata (CdProfile *profile); 85 const gchar *cd_profile_get_metadata_item (CdProfile *profile, 86 const gchar *key); 87 CdProfileKind cd_profile_get_kind (CdProfile *profile); 88 guint cd_profile_get_score (CdProfile *profile); 89 CdColorspace cd_profile_get_colorspace (CdProfile *profile); 90 gboolean cd_profile_get_has_vcgt (CdProfile *profile); 91 void cd_profile_watch_sender (CdProfile *profile, 92 const gchar *sender); 93 gboolean cd_profile_set_property_internal (CdProfile *profile, 94 const gchar *property, 95 const gchar *value, 96 guint sender_uid, 97 GError **error); 98 const gchar **cd_profile_get_warnings (CdProfile *profile); 99 100 G_END_DECLS 101 102 #endif /* __CD_PROFILE_H */ 103 104