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_XMarkableStream_idl__
24#define __com_sun_star_io_XMarkableStream_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_io_IOException_idl__
31#include <com/sun/star/io/IOException.idl>
32#endif
33
34#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
35#include <com/sun/star/lang/IllegalArgumentException.idl>
36#endif
37
38
39//=============================================================================
40
41module com {  module sun {  module star {  module io {
42
43//=============================================================================
44
45// DocMerge from xml: interface com::sun::star::io::XMarkableStream
46/** makes it possible to set and remove seekable marks to a stream.
47 */
48published interface XMarkableStream: com::sun::star::uno::XInterface
49{
50	//-------------------------------------------------------------------------
51
52	// DocMerge from xml: method com::sun::star::io::XMarkableStream::createMark
53	/** creates a mark of the current postion and returns an identifier to it.
54	 */
55	long createMark()
56			raises( com::sun::star::io::IOException );
57
58	//-------------------------------------------------------------------------
59
60	// DocMerge from xml: method com::sun::star::io::XMarkableStream::deleteMark
61	/** deletes the mark that you previously created with
62		<member>XMarkableStream::createMark</member>.
63
64		<p>It is an error to delete a mark if other marks after this
65		exist.  In this case, for reasons of robustness, the
66		implementation must delete this mark and all others after
67		this mark.  </p>
68	 */
69	void deleteMark( [in] long Mark )
70			raises( com::sun::star::io::IOException,
71					com::sun::star::lang::IllegalArgumentException );
72
73	//-------------------------------------------------------------------------
74
75	// DocMerge from xml: method com::sun::star::io::XMarkableStream::jumpToMark
76	/** jumps to a previously created mark.
77	 */
78	void jumpToMark( [in] long nMark )
79			raises( com::sun::star::io::IOException,
80					com::sun::star::lang::IllegalArgumentException );
81
82	//-------------------------------------------------------------------------
83
84	/** jumps to the furthest position of the stream.
85		<p> In the inputstream case, a subsequent read call returns
86		data, that was never read or skipped over before. In the
87		outputstream case, a subsequent write call will add
88		new data at the end of the stream without overwriting existing data.
89	 */
90	void jumpToFurthest()
91			raises( com::sun::star::io::IOException );
92
93	//-------------------------------------------------------------------------
94
95	// DocMerge from idl: method com::sun::star::io::XMarkableStream::offsetToMark
96	/** @returns
97			the offset from the current stream position to the
98			mark ("current position" - "mark position").
99
100		@param nMark
101			identifies the mark which is used as a base
102			to calculate the offset of the current position.
103
104		@throws IllegalArgumentException
105			if the mark does not exist or is deleted.
106
107		@throws IOException
108			if an I/O error has occurred.
109	 */
110	long offsetToMark( [in] long nMark )
111			raises( com::sun::star::io::IOException,
112					com::sun::star::lang::IllegalArgumentException );
113
114};
115
116//=============================================================================
117
118}; }; }; };
119
120/*=============================================================================
121
122=============================================================================*/
123#endif
124