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