+
+ /**
+ * GUnixOutputStream:fd:
+ *
+ * The file descriptor that the stream writes to.
+ *
+ * Since: 2.20
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_FD,
+ g_param_spec_int ("fd",
+ _("File descriptor"),
+ _("The file descriptor to write to"),
+ G_MININT, G_MAXINT, -1,
+ G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+
+ /**
+ * GUnixOutputStream:close-fd:
+ *
+ * Whether to close the file descriptor when the stream is closed.
+ *
+ * Since: 2.20
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_CLOSE_FD,
+ g_param_spec_boolean ("close-fd",
+ _("Close file descriptor"),
+ _("Whether to close the file descriptor when the stream is closed"),
+ TRUE,
+ G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+}
+
+static void
+g_unix_output_stream_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GUnixOutputStream *unix_stream;
+
+ unix_stream = G_UNIX_OUTPUT_STREAM (object);
+
+ switch (prop_id)
+ {
+ case PROP_FD:
+ unix_stream->priv->fd = g_value_get_int (value);
+ break;
+ case PROP_CLOSE_FD:
+ unix_stream->priv->close_fd = g_value_get_boolean (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+g_unix_output_stream_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GUnixOutputStream *unix_stream;
+
+ unix_stream = G_UNIX_OUTPUT_STREAM (object);
+
+ switch (prop_id)
+ {
+ case PROP_FD:
+ g_value_set_int (value, unix_stream->priv->fd);
+ break;
+ case PROP_CLOSE_FD:
+ g_value_set_boolean (value, unix_stream->priv->close_fd);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }