Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef INCLUDED_SVL_STRMADPT_HXX
21 : #define INCLUDED_SVL_STRMADPT_HXX
22 :
23 : #include <sal/config.h>
24 :
25 : #include <com/sun/star/io/XOutputStream.hpp>
26 : #include <tools/stream.hxx>
27 :
28 :
29 0 : class SvOutputStreamOpenLockBytes: public SvOpenLockBytes
30 : {
31 : com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >
32 : m_xOutputStream;
33 : sal_uInt64 m_nPosition;
34 :
35 : public:
36 : TYPEINFO_OVERRIDE();
37 :
38 : SvOutputStreamOpenLockBytes(
39 : const com::sun::star::uno::Reference<
40 : com::sun::star::io::XOutputStream > &
41 : rTheOutputStream):
42 : m_xOutputStream(rTheOutputStream), m_nPosition(0) {}
43 :
44 : virtual ErrCode ReadAt(sal_uInt64, void *, sal_uLong, sal_Size *) const SAL_OVERRIDE;
45 :
46 : virtual ErrCode WriteAt(sal_uInt64 nPos, const void * pBuffer, sal_uLong nCount,
47 : sal_Size * pWritten) SAL_OVERRIDE;
48 :
49 : virtual ErrCode Flush() const SAL_OVERRIDE;
50 :
51 : virtual ErrCode SetSize(sal_uInt64) SAL_OVERRIDE;
52 :
53 : virtual ErrCode Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const SAL_OVERRIDE;
54 :
55 : virtual ErrCode FillAppend(const void * pBuffer, sal_uLong nCount,
56 : sal_uLong * pWritten) SAL_OVERRIDE;
57 :
58 : virtual sal_uInt64 Tell() const SAL_OVERRIDE;
59 :
60 : virtual sal_uInt64 Seek(sal_uInt64) SAL_OVERRIDE;
61 :
62 : virtual void Terminate() SAL_OVERRIDE;
63 : };
64 :
65 : #endif // INCLUDED_SVL_STRMADPT_HXX
66 :
67 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|