# HG changeset patch # User rosfran # Date 1176158015 -3600 # Node ID 18f08fa8e2164b4d3166475af4379ff5d157e95a # Parent b5352888e3c255115d5a8b0133637735daa08ed8 [svn r520] Gets and sets functions to the parameters. diff -r b5352888e3c2 -r 18f08fa8e216 gmyth/src/gmyth_file.c --- a/gmyth/src/gmyth_file.c Mon Apr 09 16:22:37 2007 +0100 +++ b/gmyth/src/gmyth_file.c Mon Apr 09 23:33:35 2007 +0100 @@ -66,6 +66,14 @@ gint file_id; }; +enum { + PROP_GMYTH_FILE_FILENAME, + PROP_GMYTH_FILE_OFFSET, + PROP_GMYTH_FILE_FILESIZE, + PROP_GMYTH_FILE_BACKEND_INFO, + PROP_GMYTH_FILE_FILEID +}; + static void gmyth_file_class_init (GMythFileClass *klass); static void gmyth_file_init (GMythFile *object); static void gmyth_file_dispose (GObject *object); @@ -84,8 +92,39 @@ gobject_class->dispose = gmyth_file_dispose; gobject_class->finalize = gmyth_file_finalize; + + gobject_class->set_property = gmyth_file_set_property; + gobject_class->get_property = gmyth_file_get_property; + + g_object_class_install_property + (gobject_class, PROP_GMYTH_FILE_FILENAME, + g_param_spec_string ("filename", "Filename", + "The file name.", + "", G_PARAM_READWRITE)); + + g_object_class_install_property + (gobject_class, PROP_GMYTH_FILE_OFFSET, + g_param_spec_int64 ("file-offset", "file-offset", + "The offset (position) of this file", 0, G_MAXINT64, 0, G_PARAM_READWRITE)); + + g_object_class_install_property + (gobject_class, PROP_GMYTH_FILE_FILESIZE, + g_param_spec_uint64 ("file-size", "file-size", + "The file size in bytes", + 0, G_MAXUINT64, 0, G_PARAM_READWRITE)); + + g_object_class_install_property + (gobject_class, PROP_GMYTH_FILE_BACKEND_INFO, + g_param_spec_object ("backend-info", "backend-info", + "The Backend Information about the remote server", + GMYTH_FILE_TYPE, G_PARAM_READWRITE)); + + g_object_class_install_property + (gobject_class, PROP_GMYTH_FILE_FILEID, + g_param_spec_int ("file-id", "file-id", + "The file ID", 0, G_MAXINT, 0, G_PARAM_READWRITE)); - g_type_class_add_private (gobject_class, sizeof (GMythFilePrivate)); + g_type_class_add_private (gobject_class, sizeof (GMythFilePrivate)); }