1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ftpinpstr.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 /**************************************************************************
33 **************************************************************************
35 *************************************************************************/
37 #ifndef _FTP_FTPINPSTR_HXX_
38 #define _FTP_FTPINPSTR_HXX_
41 #include <rtl/ustring.hxx>
42 #include <osl/mutex.hxx>
43 #include <cppuhelper/weak.hxx>
44 #include <cppuhelper/queryinterface.hxx>
45 #include <com/sun/star/io/XInputStream.hpp>
46 #include <com/sun/star/io/XSeekable.hpp>
53 /** Implements a seekable InputStream
54 * working on a buffer.
58 namespace css
= com::sun::star
;
62 : public cppu::OWeakObject
,
63 public com::sun::star::io::XInputStream
,
64 public com::sun::star::io::XSeekable
68 /** Defines the storage kind found
69 * on which the inputstream acts.
72 FTPInputStream(FILE* tmpfl
= 0);
76 virtual css::uno::Any SAL_CALL
queryInterface(const css::uno::Type
& rType
)
77 throw(css::uno::RuntimeException
);
79 virtual void SAL_CALL
acquire(void) throw();
81 virtual void SAL_CALL
release(void) throw();
83 virtual sal_Int32 SAL_CALL
84 readBytes(css::uno::Sequence
< sal_Int8
>& aData
,
85 sal_Int32 nBytesToRead
)
86 throw( css::io::NotConnectedException
,
87 css::io::BufferSizeExceededException
,
89 css::uno::RuntimeException
);
91 virtual sal_Int32 SAL_CALL
92 readSomeBytes(css::uno::Sequence
< sal_Int8
>& aData
,
93 sal_Int32 nMaxBytesToRead
)
94 throw( css::io::NotConnectedException
,
95 css::io::BufferSizeExceededException
,
97 css::uno::RuntimeException
);
100 skipBytes(sal_Int32 nBytesToSkip
)
101 throw(css::io::NotConnectedException
,
102 css::io::BufferSizeExceededException
,
103 css::io::IOException
,
104 css::uno::RuntimeException
);
106 virtual sal_Int32 SAL_CALL
108 throw(css::io::NotConnectedException
,
109 css::io::IOException
,
110 css::uno::RuntimeException
);
112 virtual void SAL_CALL
114 throw(css::io::NotConnectedException
,
115 css::io::IOException
,
116 css::uno::RuntimeException
);
122 virtual void SAL_CALL
123 seek(sal_Int64 location
)
124 throw(css::lang::IllegalArgumentException
,
125 css::io::IOException
,
126 css::uno::RuntimeException
);
129 virtual sal_Int64 SAL_CALL
131 throw(css::io::IOException
,
132 css::uno::RuntimeException
);
135 virtual sal_Int64 SAL_CALL
137 throw(css::io::IOException
,
138 css::uno::RuntimeException
);
142 // void append(const void* pBuffer,size_t size,size_t nmemb);