1*408a4873SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*408a4873SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*408a4873SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*408a4873SAndrew Rist * distributed with this work for additional information
6*408a4873SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*408a4873SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*408a4873SAndrew Rist * "License"); you may not use this file except in compliance
9*408a4873SAndrew Rist * with the License.  You may obtain a copy of the License at
10*408a4873SAndrew Rist *
11*408a4873SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*408a4873SAndrew Rist *
13*408a4873SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*408a4873SAndrew Rist * software distributed under the License is distributed on an
15*408a4873SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*408a4873SAndrew Rist * KIND, either express or implied.  See the License for the
17*408a4873SAndrew Rist * specific language governing permissions and limitations
18*408a4873SAndrew Rist * under the License.
19*408a4873SAndrew Rist *
20*408a4873SAndrew Rist *************************************************************/
21*408a4873SAndrew Rist
22*408a4873SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_io_ObjectInputStream_idl__
24cdf0e10cSrcweir#define __com_sun_star_io_ObjectInputStream_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_io_XObjectInputStream_idl__
27cdf0e10cSrcweir#include <com/sun/star/io/XObjectInputStream.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_io_XActiveDataSink_idl__
31cdf0e10cSrcweir#include <com/sun/star/io/XActiveDataSink.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_io_XConnectable_idl__
35cdf0e10cSrcweir#include <com/sun/star/io/XConnectable.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir#ifndef __com_sun_star_io_XMarkableStream_idl__
39cdf0e10cSrcweir#include <com/sun/star/io/XMarkableStream.idl>
40cdf0e10cSrcweir#endif
41cdf0e10cSrcweir
42cdf0e10cSrcweir
43cdf0e10cSrcweir//=============================================================================
44cdf0e10cSrcweir
45cdf0e10cSrcweir module com {  module sun {  module star {  module io {
46cdf0e10cSrcweir
47cdf0e10cSrcweir//=============================================================================
48cdf0e10cSrcweir
49cdf0e10cSrcweir// DocMerge from xml: service com::sun::star::io::ObjectInputStream
50cdf0e10cSrcweir/** is a stream which allows reading the data of persistent objects.
51cdf0e10cSrcweir
52cdf0e10cSrcweir	<p>Implementations of this service must fulfill the specifications of the
53cdf0e10cSrcweir	<type>DataInputStream</type> service. It must be chained to an
54cdf0e10cSrcweir	<type>XMarkableStream</type>. Therefore, it provides the
55cdf0e10cSrcweir	<type>XMarkableStream</type> interface, and delegates the calls to the
56cdf0e10cSrcweir	chained object.  </p>
57cdf0e10cSrcweir	<p>The written objects are held until this instance is destroyed.
58cdf0e10cSrcweir	The references to the objects are read as four-byte integers.
59cdf0e10cSrcweir	Data format reads:</p>
60cdf0e10cSrcweir
61cdf0e10cSrcweir	<pre>
62cdf0e10cSrcweir	short   InfoLength
63cdf0e10cSrcweir	long    ObjectReference  // 0 indicates no object
64cdf0e10cSrcweir	UTF     ServiceName      // length of 0 indicates this is only a reference
65cdf0e10cSrcweir	long    ObjectLength     // 0 if it is a reference or no object, otherwise the len of the object data
66cdf0e10cSrcweir	Object  ObjectData       // the data of the object
67cdf0e10cSrcweir	...                      // skipping additional data
68cdf0e10cSrcweir	</pre>
69cdf0e10cSrcweir
70cdf0e10cSrcweir	@guarantees
71cdf0e10cSrcweir	<ul>
72cdf0e10cSrcweir		<li>-thread safe</li>
73cdf0e10cSrcweir		<li>-allow buffer size is 2 ^ 31 -1</li>
74cdf0e10cSrcweir		<li>-maximum object reference identifier must be the number of objects. </li>
75cdf0e10cSrcweir		<li>-object reference identifier 0 indicates no object</li>
76cdf0e10cSrcweir		<li>-skip addition data</li>
77cdf0e10cSrcweir		<li>-set the stream position behind the object data</li>
78cdf0e10cSrcweir	</ul>
79cdf0e10cSrcweir */
80cdf0e10cSrcweirpublished service ObjectInputStream
81cdf0e10cSrcweir{
82cdf0e10cSrcweir    /** allows to read the data from the stream.
83cdf0e10cSrcweir     */
84cdf0e10cSrcweir	interface com::sun::star::io::XObjectInputStream;
85cdf0e10cSrcweir
86cdf0e10cSrcweir	/** allows to set the underlying inputstream */
87cdf0e10cSrcweir	interface com::sun::star::io::XActiveDataSink;
88cdf0e10cSrcweir
89cdf0e10cSrcweir	/** allows to navigate via a chain of streams */
90cdf0e10cSrcweir	interface com::sun::star::io::XConnectable;
91cdf0e10cSrcweir
92cdf0e10cSrcweir	/** allows to set marks within the stream. The implementation
93cdf0e10cSrcweir     may forward calls to this interface to a chained markablestream. */
94cdf0e10cSrcweir	interface com::sun::star::io::XMarkableStream;
95cdf0e10cSrcweir
96cdf0e10cSrcweir};
97cdf0e10cSrcweir
98cdf0e10cSrcweir//=============================================================================
99cdf0e10cSrcweir
100cdf0e10cSrcweir}; }; }; };
101cdf0e10cSrcweir
102cdf0e10cSrcweir/*=============================================================================
103cdf0e10cSrcweir
104cdf0e10cSrcweir=============================================================================*/
105cdf0e10cSrcweir#endif
106