[svn r520] Gets and sets functions to the parameters.
1.1 --- a/gmyth/src/gmyth_file.c Mon Apr 09 16:22:37 2007 +0100
1.2 +++ b/gmyth/src/gmyth_file.c Mon Apr 09 23:33:35 2007 +0100
1.3 @@ -66,6 +66,14 @@
1.4 gint file_id;
1.5 };
1.6
1.7 +enum {
1.8 + PROP_GMYTH_FILE_FILENAME,
1.9 + PROP_GMYTH_FILE_OFFSET,
1.10 + PROP_GMYTH_FILE_FILESIZE,
1.11 + PROP_GMYTH_FILE_BACKEND_INFO,
1.12 + PROP_GMYTH_FILE_FILEID
1.13 +};
1.14 +
1.15 static void gmyth_file_class_init (GMythFileClass *klass);
1.16 static void gmyth_file_init (GMythFile *object);
1.17 static void gmyth_file_dispose (GObject *object);
1.18 @@ -84,8 +92,39 @@
1.19
1.20 gobject_class->dispose = gmyth_file_dispose;
1.21 gobject_class->finalize = gmyth_file_finalize;
1.22 +
1.23 + gobject_class->set_property = gmyth_file_set_property;
1.24 + gobject_class->get_property = gmyth_file_get_property;
1.25 +
1.26 + g_object_class_install_property
1.27 + (gobject_class, PROP_GMYTH_FILE_FILENAME,
1.28 + g_param_spec_string ("filename", "Filename",
1.29 + "The file name.",
1.30 + "", G_PARAM_READWRITE));
1.31 +
1.32 + g_object_class_install_property
1.33 + (gobject_class, PROP_GMYTH_FILE_OFFSET,
1.34 + g_param_spec_int64 ("file-offset", "file-offset",
1.35 + "The offset (position) of this file", 0, G_MAXINT64, 0, G_PARAM_READWRITE));
1.36 +
1.37 + g_object_class_install_property
1.38 + (gobject_class, PROP_GMYTH_FILE_FILESIZE,
1.39 + g_param_spec_uint64 ("file-size", "file-size",
1.40 + "The file size in bytes",
1.41 + 0, G_MAXUINT64, 0, G_PARAM_READWRITE));
1.42 +
1.43 + g_object_class_install_property
1.44 + (gobject_class, PROP_GMYTH_FILE_BACKEND_INFO,
1.45 + g_param_spec_object ("backend-info", "backend-info",
1.46 + "The Backend Information about the remote server",
1.47 + GMYTH_FILE_TYPE, G_PARAM_READWRITE));
1.48 +
1.49 + g_object_class_install_property
1.50 + (gobject_class, PROP_GMYTH_FILE_FILEID,
1.51 + g_param_spec_int ("file-id", "file-id",
1.52 + "The file ID", 0, G_MAXINT, 0, G_PARAM_READWRITE));
1.53
1.54 - g_type_class_add_private (gobject_class, sizeof (GMythFilePrivate));
1.55 + g_type_class_add_private (gobject_class, sizeof (GMythFilePrivate));
1.56
1.57 }
1.58