13781343738de4abddf56982325a77bd70a98cd26Alexander Larsson/* GIO - GLib Input, Output and Streaming Library 2f2a2d6c9ac2d98b565005d446fde01aac47f7d88Michael Natterer * 33781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * Copyright (C) 2006-2007 Red Hat, Inc. 43781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * 53781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * This library is free software; you can redistribute it and/or 63781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * modify it under the terms of the GNU Lesser General Public 73781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * License as published by the Free Software Foundation; either 83781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * version 2 of the License, or (at your option) any later version. 93781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * 103781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * This library is distributed in the hope that it will be useful, 113781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * but WITHOUT ANY WARRANTY; without even the implied warranty of 123781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 133781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * Lesser General Public License for more details. 143781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * 153781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * You should have received a copy of the GNU Lesser General 163781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * Public License along with this library; if not, write to the 173781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * Free Software Foundation, Inc., 59 Temple Place, Suite 330, 183781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * Boston, MA 02111-1307, USA. 193781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * 203781343738de4abddf56982325a77bd70a98cd26Alexander Larsson * Author: Alexander Larsson <alexl@redhat.com> 213781343738de4abddf56982325a77bd70a98cd26Alexander Larsson */ 223781343738de4abddf56982325a77bd70a98cd26Alexander Larsson 23ced29277267476bbe4ba5e35f79a8d6a130cb989Alexander Larsson#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) 24ced29277267476bbe4ba5e35f79a8d6a130cb989Alexander Larsson#error "Only <gio/gio.h> can be included directly." 25ced29277267476bbe4ba5e35f79a8d6a130cb989Alexander Larsson#endif 26ced29277267476bbe4ba5e35f79a8d6a130cb989Alexander Larsson 273781343738de4abddf56982325a77bd70a98cd26Alexander Larsson#ifndef __G_DATA_OUTPUT_STREAM_H__ 283781343738de4abddf56982325a77bd70a98cd26Alexander Larsson#define __G_DATA_OUTPUT_STREAM_H__ 293781343738de4abddf56982325a77bd70a98cd26Alexander Larsson 303781343738de4abddf56982325a77bd70a98cd26Alexander Larsson#include <gio/gfilteroutputstream.h> 313781343738de4abddf56982325a77bd70a98cd26Alexander Larsson 323781343738de4abddf56982325a77bd70a98cd26Alexander LarssonG_BEGIN_DECLS 333781343738de4abddf56982325a77bd70a98cd26Alexander Larsson 343781343738de4abddf56982325a77bd70a98cd26Alexander Larsson#define G_TYPE_DATA_OUTPUT_STREAM (g_data_output_stream_get_type ()) 353781343738de4abddf56982325a77bd70a98cd26Alexander Larsson#define G_DATA_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DATA_OUTPUT_STREAM, GDataOutputStream)) 363781343738de4abddf56982325a77bd70a98cd26Alexander Larsson#define G_DATA_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DATA_OUTPUT_STREAM, GDataOutputStreamClass)) 373781343738de4abddf56982325a77bd70a98cd26Alexander Larsson#define G_IS_DATA_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DATA_OUTPUT_STREAM)) 383781343738de4abddf56982325a77bd70a98cd26Alexander Larsson#define G_IS_DATA_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DATA_OUTPUT_STREAM)) 393781343738de4abddf56982325a77bd70a98cd26Alexander Larsson#define G_DATA_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DATA_OUTPUT_STREAM, GDataOutputStreamClass)) 403781343738de4abddf56982325a77bd70a98cd26Alexander Larsson 415247f12f3649726471080440de0d37b78c1cec33Andrew Walton/** 425247f12f3649726471080440de0d37b78c1cec33Andrew Walton * GDataOutputStream: 43ab7ff4c6a04a9c29e4f1e8cb3fd1f39610c58c37Alexander Larsson * @parent_instance: a #GBufferedOutputStream. 445247f12f3649726471080440de0d37b78c1cec33Andrew Walton * 45f2a2d6c9ac2d98b565005d446fde01aac47f7d88Michael Natterer * An implementation of #GBufferedOutputStream that allows for high-level 465247f12f3649726471080440de0d37b78c1cec33Andrew Walton * data manipulation of arbitrary data (including binary operations). 475247f12f3649726471080440de0d37b78c1cec33Andrew Walton **/ 483781343738de4abddf56982325a77bd70a98cd26Alexander Larssontypedef struct _GDataOutputStream GDataOutputStream; 493781343738de4abddf56982325a77bd70a98cd26Alexander Larssontypedef struct _GDataOutputStreamClass GDataOutputStreamClass; 503781343738de4abddf56982325a77bd70a98cd26Alexander Larssontypedef struct _GDataOutputStreamPrivate GDataOutputStreamPrivate; 513781343738de4abddf56982325a77bd70a98cd26Alexander Larsson 523781343738de4abddf56982325a77bd70a98cd26Alexander Larssonstruct _GDataOutputStream 533781343738de4abddf56982325a77bd70a98cd26Alexander Larsson{ 54ab7ff4c6a04a9c29e4f1e8cb3fd1f39610c58c37Alexander Larsson GFilterOutputStream parent_instance; 553781343738de4abddf56982325a77bd70a98cd26Alexander Larsson 563781343738de4abddf56982325a77bd70a98cd26Alexander Larsson /*< private >*/ 573781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GDataOutputStreamPrivate *priv; 583781343738de4abddf56982325a77bd70a98cd26Alexander Larsson}; 593781343738de4abddf56982325a77bd70a98cd26Alexander Larsson 603781343738de4abddf56982325a77bd70a98cd26Alexander Larssonstruct _GDataOutputStreamClass 613781343738de4abddf56982325a77bd70a98cd26Alexander Larsson{ 62f2a2d6c9ac2d98b565005d446fde01aac47f7d88Michael Natterer GFilterOutputStreamClass parent_class; 63f2a2d6c9ac2d98b565005d446fde01aac47f7d88Michael Natterer 645247f12f3649726471080440de0d37b78c1cec33Andrew Walton /*< private >*/ 653781343738de4abddf56982325a77bd70a98cd26Alexander Larsson /* Padding for future expansion */ 663781343738de4abddf56982325a77bd70a98cd26Alexander Larsson void (*_g_reserved1) (void); 673781343738de4abddf56982325a77bd70a98cd26Alexander Larsson void (*_g_reserved2) (void); 683781343738de4abddf56982325a77bd70a98cd26Alexander Larsson void (*_g_reserved3) (void); 693781343738de4abddf56982325a77bd70a98cd26Alexander Larsson void (*_g_reserved4) (void); 703781343738de4abddf56982325a77bd70a98cd26Alexander Larsson void (*_g_reserved5) (void); 713781343738de4abddf56982325a77bd70a98cd26Alexander Larsson}; 723781343738de4abddf56982325a77bd70a98cd26Alexander Larsson 733781343738de4abddf56982325a77bd70a98cd26Alexander Larsson 74f2a2d6c9ac2d98b565005d446fde01aac47f7d88Michael NattererGType g_data_output_stream_get_type (void) G_GNUC_CONST; 75f2a2d6c9ac2d98b565005d446fde01aac47f7d88Michael NattererGDataOutputStream * g_data_output_stream_new (GOutputStream *base_stream); 763781343738de4abddf56982325a77bd70a98cd26Alexander Larsson 77442e8df1b833e3311a214ae1bf02337b0c831544Matthias Clasenvoid g_data_output_stream_set_byte_order (GDataOutputStream *stream, 783781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GDataStreamByteOrder order); 793781343738de4abddf56982325a77bd70a98cd26Alexander LarssonGDataStreamByteOrder g_data_output_stream_get_byte_order (GDataOutputStream *stream); 803781343738de4abddf56982325a77bd70a98cd26Alexander Larsson 81442e8df1b833e3311a214ae1bf02337b0c831544Matthias Clasengboolean g_data_output_stream_put_byte (GDataOutputStream *stream, 823781343738de4abddf56982325a77bd70a98cd26Alexander Larsson guchar data, 833781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GCancellable *cancellable, 843781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GError **error); 853781343738de4abddf56982325a77bd70a98cd26Alexander Larssongboolean g_data_output_stream_put_int16 (GDataOutputStream *stream, 863781343738de4abddf56982325a77bd70a98cd26Alexander Larsson gint16 data, 873781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GCancellable *cancellable, 883781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GError **error); 893781343738de4abddf56982325a77bd70a98cd26Alexander Larssongboolean g_data_output_stream_put_uint16 (GDataOutputStream *stream, 903781343738de4abddf56982325a77bd70a98cd26Alexander Larsson guint16 data, 913781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GCancellable *cancellable, 923781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GError **error); 933781343738de4abddf56982325a77bd70a98cd26Alexander Larssongboolean g_data_output_stream_put_int32 (GDataOutputStream *stream, 943781343738de4abddf56982325a77bd70a98cd26Alexander Larsson gint32 data, 953781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GCancellable *cancellable, 963781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GError **error); 973781343738de4abddf56982325a77bd70a98cd26Alexander Larssongboolean g_data_output_stream_put_uint32 (GDataOutputStream *stream, 983781343738de4abddf56982325a77bd70a98cd26Alexander Larsson guint32 data, 993781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GCancellable *cancellable, 1003781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GError **error); 1013781343738de4abddf56982325a77bd70a98cd26Alexander Larssongboolean g_data_output_stream_put_int64 (GDataOutputStream *stream, 1023781343738de4abddf56982325a77bd70a98cd26Alexander Larsson gint64 data, 1033781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GCancellable *cancellable, 1043781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GError **error); 1053781343738de4abddf56982325a77bd70a98cd26Alexander Larssongboolean g_data_output_stream_put_uint64 (GDataOutputStream *stream, 1063781343738de4abddf56982325a77bd70a98cd26Alexander Larsson guint64 data, 1073781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GCancellable *cancellable, 1083781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GError **error); 1093781343738de4abddf56982325a77bd70a98cd26Alexander Larssongboolean g_data_output_stream_put_string (GDataOutputStream *stream, 1103781343738de4abddf56982325a77bd70a98cd26Alexander Larsson const char *str, 1113781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GCancellable *cancellable, 1123781343738de4abddf56982325a77bd70a98cd26Alexander Larsson GError **error); 1133781343738de4abddf56982325a77bd70a98cd26Alexander Larsson 1143781343738de4abddf56982325a77bd70a98cd26Alexander LarssonG_END_DECLS 1153781343738de4abddf56982325a77bd70a98cd26Alexander Larsson 1163781343738de4abddf56982325a77bd70a98cd26Alexander Larsson#endif /* __G_DATA_OUTPUT_STREAM_H__ */ 117