xref: /aoo41x/main/udkapi/com/sun/star/io/XSeekable.idl (revision 408a4873)
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_XSeekable_idl__
24#define __com_sun_star_io_XSeekable_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#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
34#include <com/sun/star/lang/IllegalArgumentException.idl>
35#endif
36
37//=============================================================================
38
39module com {  module sun {  module star {  module io {
40
41//=============================================================================
42
43// DocMerge from xml: interface com::sun::star::io::XSeekable
44/** makes it possible to seek to a certain position within a stream.
45
46	<p>This interface should be supported, if it is possible to access the
47	data at the new position quickly.
48	You should not support this interface, if you have a continuous
49	stream, for example, a video stream.
50 */
51published interface XSeekable: com::sun::star::uno::XInterface
52{
53
54	// DocMerge from xml: method com::sun::star::io::XSeekable::seek
55	/** changes the seek pointer to a new location relative to the beginning of the stream.
56
57
58		<p> This method changes the seek pointer so subsequent reads and writes can take place at a different
59		location in the stream object. It is an error to seek before the beginning of the stream or after the
60		end of the stream. </p>
61
62        @throws com::sun::star::lang::IllegalArgumentException in case location is negative or greater than <member>XSeekable::getLength</member>.
63	 */
64	void seek( [in] hyper location )
65		raises( com::sun::star::lang::IllegalArgumentException, com::sun::star::io::IOException );
66
67
68	// DocMerge from xml: method com::sun::star::io::XSeekable::getPosition
69	/** returns the current offset of the stream.
70       @returns
71			 the current offset in this stream.
72	 */
73	hyper getPosition()
74		raises( com::sun::star::io::IOException );
75
76
77	// DocMerge from xml: method com::sun::star::io::XSeekable::getLength
78	/** returns the length of the stream.
79       @returns
80			the length of the storage medium on which the stream works.
81	 */
82	hyper getLength()
83		raises( com::sun::star::io::IOException );
84};
85
86//=============================================================================
87
88}; }; }; };
89#endif
90