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