1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_io_ObjectInputStream_idl__
28#define __com_sun_star_io_ObjectInputStream_idl__
29
30#ifndef __com_sun_star_io_XObjectInputStream_idl__
31#include <com/sun/star/io/XObjectInputStream.idl>
32#endif
33
34#ifndef __com_sun_star_io_XActiveDataSink_idl__
35#include <com/sun/star/io/XActiveDataSink.idl>
36#endif
37
38#ifndef __com_sun_star_io_XConnectable_idl__
39#include <com/sun/star/io/XConnectable.idl>
40#endif
41
42#ifndef __com_sun_star_io_XMarkableStream_idl__
43#include <com/sun/star/io/XMarkableStream.idl>
44#endif
45
46
47//=============================================================================
48
49 module com {  module sun {  module star {  module io {
50
51//=============================================================================
52
53// DocMerge from xml: service com::sun::star::io::ObjectInputStream
54/** is a stream which allows reading the data of persistent objects.
55
56	<p>Implementations of this service must fulfill the specifications of the
57	<type>DataInputStream</type> service. It must be chained to an
58	<type>XMarkableStream</type>. Therefore, it provides the
59	<type>XMarkableStream</type> interface, and delegates the calls to the
60	chained object.  </p>
61	<p>The written objects are held until this instance is destroyed.
62	The references to the objects are read as four-byte integers.
63	Data format reads:</p>
64
65	<pre>
66	short   InfoLength
67	long    ObjectReference  // 0 indicates no object
68	UTF     ServiceName      // length of 0 indicates this is only a reference
69	long    ObjectLength     // 0 if it is a reference or no object, otherwise the len of the object data
70	Object  ObjectData       // the data of the object
71	...                      // skipping additional data
72	</pre>
73
74	@guarantees
75	<ul>
76		<li>-thread safe</li>
77		<li>-allow buffer size is 2 ^ 31 -1</li>
78		<li>-maximum object reference identifier must be the number of objects. </li>
79		<li>-object reference identifier 0 indicates no object</li>
80		<li>-skip addition data</li>
81		<li>-set the stream position behind the object data</li>
82	</ul>
83 */
84published service ObjectInputStream
85{
86    /** allows to read the data from the stream.
87     */
88	interface com::sun::star::io::XObjectInputStream;
89
90	/** allows to set the underlying inputstream */
91	interface com::sun::star::io::XActiveDataSink;
92
93	/** allows to navigate via a chain of streams */
94	interface com::sun::star::io::XConnectable;
95
96	/** allows to set marks within the stream. The implementation
97     may forward calls to this interface to a chained markablestream. */
98	interface com::sun::star::io::XMarkableStream;
99
100};
101
102//=============================================================================
103
104}; }; }; };
105
106/*=============================================================================
107
108=============================================================================*/
109#endif
110