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