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_ObjectOutputStream_idl__
24#define __com_sun_star_io_ObjectOutputStream_idl__
25
26#ifndef __com_sun_star_io_XObjectOutputStream_idl__
27#include <com/sun/star/io/XObjectOutputStream.idl>
28#endif
29
30#ifndef __com_sun_star_io_XActiveDataSource_idl__
31#include <com/sun/star/io/XActiveDataSource.idl>
32#endif
33
34#ifndef __com_sun_star_io_XConnectable_idl__
35#include <com/sun/star/io/XConnectable.idl>
36#endif
37
38
39//=============================================================================
40
41module com {  module sun {  module star {  module io {
42
43//=============================================================================
44
45// DocMerge from xml: service com::sun::star::io::ObjectOutputStream
46/** is a stream which allows writing the data of persistent objects.
47
48	<p>Implementations of this service must fulfill the specifications of the
49	<type>DataOutputStream</type> service; furthermore, the stream needs to be chained to a
50	<type>XMarkableStream</type>. Therefore, it also provides the <type>XMarkableStream</type>
51	interface, but it delegates the calls to the chained object.
52	The written objects are held until this instance is destroyed.
53	The references to the objects are written as four-byte integers
54	and begin at 1. Data format is written: </p>
55	<pre>
56	short   InfoLength
57	long    ObjectReference // 0 indicates no object
58	UTF     ServiceName     // length of 0 indicates this is only a reference
59	long    ObjectLength    // 0 if it is a reference or no object, otherwise the len of the object data
60	Object  ObjectData      // the data of the object
61	</pre>
62
63	@guarantees
64	<ul>
65		<li>-thread safe </li>
66		<li>-allow buffer size is 2 ^ 31 -1 </li>
67		<li>-maximum object reference identifier is the number of objects.  </li>
68		<li>-object reference identifier 0 indicates no object </li>
69	</ul>
70 */
71published service ObjectOutputStream
72{
73    /** allows to write the data to the stream.
74     */
75	interface com::sun::star::io::XObjectOutputStream;
76
77	/** allows to set the underlying outputstream */
78	interface com::sun::star::io::XActiveDataSource;
79
80	/** allows to navigate via a chain of streams */
81	interface com::sun::star::io::XConnectable;
82
83};
84
85//=============================================================================
86
87}; }; }; };
88
89/*=============================================================================
90
91=============================================================================*/
92#endif
93