ftpinpstr.hxx (6df1ea1f) | ftpinpstr.hxx (72cd26dd) |
---|---|
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 --- 19 unchanged lines hidden (view full) --- 28 *************************************************************************/ 29 30#ifndef _FTP_FTPINPSTR_HXX_ 31#define _FTP_FTPINPSTR_HXX_ 32 33 34#include <rtl/ustring.hxx> 35#include <osl/mutex.hxx> | 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 --- 19 unchanged lines hidden (view full) --- 28 *************************************************************************/ 29 30#ifndef _FTP_FTPINPSTR_HXX_ 31#define _FTP_FTPINPSTR_HXX_ 32 33 34#include <rtl/ustring.hxx> 35#include <osl/mutex.hxx> |
36#include <cppuhelper/weak.hxx> 37#include <cppuhelper/queryinterface.hxx> | 36#include <osl/file.h> |
38#include <com/sun/star/io/XInputStream.hpp> 39#include <com/sun/star/io/XSeekable.hpp> | 37#include <com/sun/star/io/XInputStream.hpp> 38#include <com/sun/star/io/XSeekable.hpp> |
40#include <stdio.h> | 39#include <cppuhelper/implbase2.hxx> 40#include <cppuhelper/basemutex.hxx> |
41 42 43namespace ftp { 44 45 46 /** Implements a seekable InputStream 47 * working on a buffer. 48 */ 49 50 51 namespace css = com::sun::star; 52 | 41 42 43namespace ftp { 44 45 46 /** Implements a seekable InputStream 47 * working on a buffer. 48 */ 49 50 51 namespace css = com::sun::star; 52 |
53 | 53 typedef ::cppu::WeakImplHelper2< 54 com::sun::star::io::XInputStream, 55 com::sun::star::io::XSeekable > FTPInputStream_Base; 56 |
54 class FTPInputStream | 57 class FTPInputStream |
55 : public cppu::OWeakObject, 56 public com::sun::star::io::XInputStream, 57 public com::sun::star::io::XSeekable | 58 : protected cppu::BaseMutex, 59 public FTPInputStream_Base |
58 { 59 public: 60 61 /** Defines the storage kind found 62 * on which the inputstream acts. 63 */ 64 | 60 { 61 public: 62 63 /** Defines the storage kind found 64 * on which the inputstream acts. 65 */ 66 |
65 FTPInputStream(FILE* tmpfl = 0); | 67 FTPInputStream(oslFileHandle tmpfl = 0); |
66 67 ~FTPInputStream(); 68 | 68 69 ~FTPInputStream(); 70 |
69 virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& rType) 70 throw(css::uno::RuntimeException); 71 72 virtual void SAL_CALL acquire(void) throw(); 73 74 virtual void SAL_CALL release(void) throw(); 75 | |
76 virtual sal_Int32 SAL_CALL 77 readBytes(css::uno::Sequence< sal_Int8 >& aData, 78 sal_Int32 nBytesToRead) 79 throw( css::io::NotConnectedException, 80 css::io::BufferSizeExceededException, 81 css::io::IOException, 82 css::uno::RuntimeException); 83 --- 46 unchanged lines hidden (view full) --- 130 throw(css::io::IOException, 131 css::uno::RuntimeException); 132 133 // additional 134 135// void append(const void* pBuffer,size_t size,size_t nmemb); 136 137 private: | 71 virtual sal_Int32 SAL_CALL 72 readBytes(css::uno::Sequence< sal_Int8 >& aData, 73 sal_Int32 nBytesToRead) 74 throw( css::io::NotConnectedException, 75 css::io::BufferSizeExceededException, 76 css::io::IOException, 77 css::uno::RuntimeException); 78 --- 46 unchanged lines hidden (view full) --- 125 throw(css::io::IOException, 126 css::uno::RuntimeException); 127 128 // additional 129 130// void append(const void* pBuffer,size_t size,size_t nmemb); 131 132 private: |
138 139 osl::Mutex m_aMutex; 140 FILE* m_tmpfl; 141 sal_Int64 m_nLength; | 133 oslFileHandle m_tmpfl; 134 sal_uInt64 m_nLength; |
142 }; 143 144 145} 146 147#endif | 135 }; 136 137 138} 139 140#endif |