1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_io_XMarkableStream_idl__
28#define __com_sun_star_io_XMarkableStream_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33
34#ifndef __com_sun_star_io_IOException_idl__
35#include <com/sun/star/io/IOException.idl>
36#endif
37
38#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
39#include <com/sun/star/lang/IllegalArgumentException.idl>
40#endif
41
42
43//=============================================================================
44
45module com {  module sun {  module star {  module io {
46
47//=============================================================================
48
49// DocMerge from xml: interface com::sun::star::io::XMarkableStream
50/** makes it possible to set and remove seekable marks to a stream.
51 */
52published interface XMarkableStream: com::sun::star::uno::XInterface
53{
54	//-------------------------------------------------------------------------
55
56	// DocMerge from xml: method com::sun::star::io::XMarkableStream::createMark
57	/** creates a mark of the current postion and returns an identifier to it.
58	 */
59	long createMark()
60			raises( com::sun::star::io::IOException );
61
62	//-------------------------------------------------------------------------
63
64	// DocMerge from xml: method com::sun::star::io::XMarkableStream::deleteMark
65	/** deletes the mark that you previously created with
66		<member>XMarkableStream::createMark</member>.
67
68		<p>It is an error to delete a mark if other marks after this
69		exist.  In this case, for reasons of robustness, the
70		implementation must delete this mark and all others after
71		this mark.  </p>
72	 */
73	void deleteMark( [in] long Mark )
74			raises( com::sun::star::io::IOException,
75					com::sun::star::lang::IllegalArgumentException );
76
77	//-------------------------------------------------------------------------
78
79	// DocMerge from xml: method com::sun::star::io::XMarkableStream::jumpToMark
80	/** jumps to a previously created mark.
81	 */
82	void jumpToMark( [in] long nMark )
83			raises( com::sun::star::io::IOException,
84					com::sun::star::lang::IllegalArgumentException );
85
86	//-------------------------------------------------------------------------
87
88	/** jumps to the furthest position of the stream.
89		<p> In the inputstream case, a subsequent read call returns
90		data, that was never read or skipped over before. In the
91		outputstream case, a subsequent write call will add
92		new data at the end of the stream without overwriting existing data.
93	 */
94	void jumpToFurthest()
95			raises( com::sun::star::io::IOException );
96
97	//-------------------------------------------------------------------------
98
99	// DocMerge from idl: method com::sun::star::io::XMarkableStream::offsetToMark
100	/** @returns
101			the offset from the current stream position to the
102			mark ("current position" - "mark position").
103
104		@param nMark
105			identifies the mark which is used as a base
106			to calculate the offset of the current position.
107
108		@throws IllegalArgumentException
109			if the mark does not exist or is deleted.
110
111		@throws IOException
112			if an I/O error has occurred.
113	 */
114	long offsetToMark( [in] long nMark )
115			raises( com::sun::star::io::IOException,
116					com::sun::star::lang::IllegalArgumentException );
117
118};
119
120//=============================================================================
121
122}; }; }; };
123
124/*=============================================================================
125
126=============================================================================*/
127#endif
128