Beispiel #1
0
static void
gsf_output_memory_class_init (GObjectClass *gobject_class)
{
	GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class);
	
	gobject_class->finalize = gsf_output_memory_finalize;
	output_class->Close     = gsf_output_memory_close;
	output_class->Seek      = gsf_output_memory_seek;
	output_class->Write     = gsf_output_memory_write;
	output_class->Vprintf   = gsf_output_memory_vprintf;

	parent_class = GSF_OUTPUT_CLASS (g_type_class_peek_parent (gobject_class));
}
static void
gsf_outfile_open_pkg_class_init (GObjectClass *gobject_class)
{
	GsfOutputClass  *output_class  = GSF_OUTPUT_CLASS (gobject_class);
	GsfOutfileClass *outfile_class = GSF_OUTFILE_CLASS (gobject_class);

	gobject_class->finalize		= gsf_outfile_open_pkg_finalize;
	gobject_class->get_property     = gsf_outfile_open_pkg_get_property;
	gobject_class->set_property     = gsf_outfile_open_pkg_set_property;

	output_class->Write		= gsf_outfile_open_pkg_write;
	output_class->Seek		= gsf_outfile_open_pkg_seek;
	output_class->Close		= gsf_outfile_open_pkg_close;
	outfile_class->new_child	= gsf_outfile_open_pkg_new_child;

	parent_class = g_type_class_peek_parent (gobject_class);

	g_object_class_install_property (gobject_class, PROP_SINK,
		 g_param_spec_object ("sink", "Sink", "The GsfOutput that stores the Open Package content.",
			GSF_OUTFILE_TYPE, GSF_PARAM_STATIC | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (gobject_class, PROP_CONTENT_TYPE,
		 g_param_spec_string ("content-type", "ContentType", "The ContentType stored in the root [Content_Types].xml file.",
			"", GSF_PARAM_STATIC | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (gobject_class, PROP_IS_DIR,
		 g_param_spec_boolean ("is-dir", "IsDir", "Can the outfile have children.",
			FALSE, GSF_PARAM_STATIC | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}
Beispiel #3
0
static void
gsf_output_bzip_class_init (GObjectClass *gobject_class)
{
	GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class);

	gobject_class->finalize = gsf_output_bzip_finalize;
	output_class->Write	= gsf_output_bzip_write;
	output_class->Seek	= gsf_output_bzip_seek;
	output_class->Close	= gsf_output_bzip_close;

	parent_class = g_type_class_peek_parent (gobject_class);
}
Beispiel #4
0
static void
gsf_outfile_zip_class_init (GObjectClass *gobject_class)
{
	GsfOutputClass  *output_class  = GSF_OUTPUT_CLASS (gobject_class);
	GsfOutfileClass *outfile_class = GSF_OUTFILE_CLASS (gobject_class);

	gobject_class->constructor      = gsf_outfile_zip_constructor;
	gobject_class->finalize		= gsf_outfile_zip_finalize;
	gobject_class->get_property     = gsf_outfile_zip_get_property;
	gobject_class->set_property     = gsf_outfile_zip_set_property;

	output_class->Write		= gsf_outfile_zip_write;
	output_class->Seek		= gsf_outfile_zip_seek;
	output_class->Close		= gsf_outfile_zip_close;
	outfile_class->new_child	= gsf_outfile_zip_new_child;

	parent_class = g_type_class_peek_parent (gobject_class);

	g_object_class_install_property
		(gobject_class,
		 PROP_SINK,
		 g_param_spec_object ("sink", "Sink",
				      "Where the archive is written.",
				      GSF_OUTPUT_TYPE,
				      GSF_PARAM_STATIC |
				      G_PARAM_READWRITE |
				      G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property
		(gobject_class,
		 PROP_ENTRY_NAME,
		 g_param_spec_string ("entry-name", "Entry Name",
				      "The filename of this member in the archive without path.",
				      NULL,
				      GSF_PARAM_STATIC |
				      G_PARAM_READWRITE |
				      G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property
		(gobject_class,
		 PROP_COMPRESSION_LEVEL,
		 g_param_spec_int ("compression-level",
				   "Compression Level",
				   "The level of compression used, zero meaning none.",
				   0, 10,
				   GSF_ZIP_DEFLATED,
				   GSF_PARAM_STATIC |
				   G_PARAM_READWRITE |
				   G_PARAM_CONSTRUCT_ONLY));
}
Beispiel #5
0
static void
gsf_output_class_init (GObjectClass *gobject_class)
{
	GsfOutputClass  *output_class  = GSF_OUTPUT_CLASS (gobject_class);

	gobject_class->dispose      = gsf_output_dispose;
	gobject_class->set_property = gsf_output_set_property;
	gobject_class->get_property = gsf_output_get_property;
	output_class->Vprintf       = gsf_output_real_vprintf;

	parent_class = g_type_class_peek_parent (gobject_class);

	g_object_class_install_property (gobject_class,
					 PROP_NAME,
					 g_param_spec_string ("name", "Name",
							      "The Output's Name",
							      NULL,
							      GSF_PARAM_STATIC |
							      G_PARAM_READABLE));
	g_object_class_install_property (gobject_class,
					 PROP_SIZE,
					 g_param_spec_int64 ("size", "Size",
							     "The Output's Size",
							     0, G_MAXINT64, 0,
							     GSF_PARAM_STATIC |
							     G_PARAM_READABLE));
	g_object_class_install_property (gobject_class,
					 PROP_POS,
					 g_param_spec_int64 ("position", "Position",
							     "The Output's Current Position",
							     0, G_MAXINT64, 0,
							     GSF_PARAM_STATIC |
							     G_PARAM_READABLE));
	g_object_class_install_property (gobject_class,
					 PROP_CLOSED,
					 g_param_spec_boolean ("is-closed", "Is Closed",
							       "Whether the Output is Closed",
							       FALSE,
							       GSF_PARAM_STATIC |
							       G_PARAM_READABLE));
}
Beispiel #6
0
static void
gsf_output_csv_class_init (GObjectClass *gobject_class)
{
	GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class);

	gobject_class->finalize     = gsf_output_csv_finalize;
	gobject_class->set_property = gsf_output_csv_set_property;
	gobject_class->get_property = gsf_output_csv_get_property;
	output_class->Write	    = gsf_output_csv_write;
	output_class->Seek	    = gsf_output_csv_seek;
	output_class->Close	    = gsf_output_csv_close;

	g_object_class_install_property
		(gobject_class,
		 PROP_SINK,
		 g_param_spec_object ("sink",
				      _("Sink"),
				      _("Where the formatted output is written"),
				      GSF_OUTPUT_TYPE,
				      GSF_PARAM_STATIC |
				      G_PARAM_READWRITE));

	g_object_class_install_property
		(gobject_class,
		 PROP_QUOTE,
		 g_param_spec_string ("quote",
				      _("Quote"),
				      _("The string used for quoting fields"),
				      "\"",
				      GSF_PARAM_STATIC |
				      G_PARAM_CONSTRUCT |
				      G_PARAM_READWRITE));

	g_object_class_install_property
		(gobject_class,
		 PROP_QUOTING_MODE,
		 g_param_spec_enum ("quoting-mode",
				    _("Quoting Mode"),
				    _("When to quote fields"),
				    GSF_OUTPUT_CSV_QUOTING_MODE_TYPE,
				    GSF_OUTPUT_CSV_QUOTING_MODE_NEVER,
				    GSF_PARAM_STATIC |
				    G_PARAM_CONSTRUCT |
				    G_PARAM_READWRITE));

	g_object_class_install_property
		(gobject_class,
		 PROP_QUOTING_TRIGGERS,
		 g_param_spec_string ("quoting-triggers",
				      _("Quoting Triggers"),
				      _("Characters that cause field quoting"),
				      NULL,
				      GSF_PARAM_STATIC |
				      G_PARAM_READWRITE));

	g_object_class_install_property
		(gobject_class,
		 PROP_QUOTING_ON_WHITESPACE,
		 g_param_spec_boolean ("quoting-on-whitespace",
				       _("Quoting On Whitespace"),
				       _("Does initial or terminal whitespace force quoting?"),
				       TRUE,
				       GSF_PARAM_STATIC |
				       G_PARAM_READWRITE));

	g_object_class_install_property
		(gobject_class,
		 PROP_SEPARATOR,
		 g_param_spec_string ("separator",
				      _("Separator"),
				      _("The field separator"),
				      ",",
				      GSF_PARAM_STATIC |
				      G_PARAM_CONSTRUCT |
				      G_PARAM_READWRITE));

	g_object_class_install_property
		(gobject_class,
		 PROP_EOL,
		 g_param_spec_string ("eol",
				      _("end-of-line"),
				      _("The end-of-line marker"),
				      "\n",
				      GSF_PARAM_STATIC |
				      G_PARAM_CONSTRUCT |
				      G_PARAM_READWRITE));

	parent_class = g_type_class_peek_parent (gobject_class);
}
Beispiel #7
0
static void
gsf_output_class_init (GObjectClass *gobject_class)
{
	GsfOutputClass  *output_class  = GSF_OUTPUT_CLASS (gobject_class);

	gobject_class->dispose      = gsf_output_dispose;
	gobject_class->set_property = gsf_output_set_property;
	gobject_class->get_property = gsf_output_get_property;
	output_class->Vprintf       = gsf_output_real_vprintf;

	parent_class = g_type_class_peek_parent (gobject_class);

	g_object_class_install_property
		(gobject_class,
		 PROP_NAME,
		 g_param_spec_string ("name",
				      _("Name"),
				      _("The output's name"),
				      NULL,
				      GSF_PARAM_STATIC |
				      G_PARAM_READWRITE));

	/**
	 * GsfOutput:size:
	 *
	 * The current file size.
	 */
	g_object_class_install_property
		(gobject_class,
		 PROP_SIZE,
		 g_param_spec_int64 ("size",
				     _("Size"),
				     _("The output's size"),
				     0, G_MAXINT64, 0,
				     GSF_PARAM_STATIC |
				     G_PARAM_READABLE));

	/**
	 * GsfOutput:is-closed:
	 *
	 * %TRUE if the output has been closed.
	 */
	g_object_class_install_property
		(gobject_class,
		 PROP_CLOSED,
		 g_param_spec_boolean ("is-closed",
				       _("Is Closed"),
				       _("Whether the output is closed"),
				       FALSE,
				       GSF_PARAM_STATIC |
				       G_PARAM_READABLE));

	/**
	 * GsfOutput:position:
	 *
	 * The current position in the output.
	 */
	g_object_class_install_property
		(gobject_class,
		 PROP_POS,
		 g_param_spec_int64 ("position",
				     _("Position"),
				     _("The output's current position"),
				     0, G_MAXINT64, 0,
				     GSF_PARAM_STATIC |
				     G_PARAM_READABLE));

	/**
	 * GsfOutput:modtime:
	 *
	 * The time the output was last updated.  This must be set on object
	 * construction and represents the timestamp to put on the resulting
	 * file or #GsfOutfile member.  Not all derived classes will actually
	 * do anything with this property.
	 */
	g_object_class_install_property
		(gobject_class,
		 PROP_MODTIME,
		 g_param_spec_boxed
		 ("modtime",
		  _("Modification time"),
		  _("An optional GDateTime representing the time the output was last changed"),
		  G_TYPE_DATE_TIME,
		  GSF_PARAM_STATIC |
		  G_PARAM_CONSTRUCT_ONLY |
		  G_PARAM_READWRITE));

	/**
	 * GsfOutput:container:
	 *
	 * The container, optionally %NULL, in which this output lives.
	 */
	g_object_class_install_property
		(gobject_class, PROP_CONTAINER,
		 g_param_spec_object ("container",
				      _("Container"),
				      _("The parent GsfOutfile"),
				      GSF_OUTFILE_TYPE,
				      GSF_PARAM_STATIC |
				      G_PARAM_READWRITE));
}