build fix
[LibreOffice.git] / include / comphelper / streamsection.hxx
blob4a53c85a9f8f906d5521eae8cf553fe0545fbabe
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_COMPHELPER_STREAMSECTION_HXX
21 #define INCLUDED_COMPHELPER_STREAMSECTION_HXX
23 #include <com/sun/star/io/XMarkableStream.hpp>
24 #include <com/sun/star/io/XDataInputStream.hpp>
25 #include <com/sun/star/io/XDataOutputStream.hpp>
26 #include <comphelper/comphelperdllapi.h>
28 namespace comphelper
31 /** implements handling for compatibly reading/writing data from/into an input/output stream.
32 data written in a block secured by this class should be readable by older versions which
33 use the same mechanism.
35 @author Frank Schoenheit
36 @since 00/26/05
39 class COMPHELPER_DLLPUBLIC OStreamSection
41 css::uno::Reference< css::io::XMarkableStream > m_xMarkStream;
42 css::uno::Reference< css::io::XDataInputStream > m_xInStream;
43 css::uno::Reference< css::io::XDataOutputStream > m_xOutStream;
45 sal_Int32 m_nBlockStart;
46 sal_Int32 m_nBlockLen;
48 public:
49 /** starts reading of a "skippable" section of data within the given input stream<BR>
50 @param _rxInput the stream to read from. Must support the
51 css::io::XMarkableStream interface
53 OStreamSection(const css::uno::Reference< css::io::XDataInputStream >& _rxInput);
55 /** starts writing of a "skippable" section of data into the given output stream
56 @param _rxOutput the stream the stream to write to. Must support the
57 css::io::XMarkableStream interface
59 OStreamSection(const css::uno::Reference< css::io::XDataOutputStream >& _rxOutput);
61 /** dtor. <BR>If constructed for writing, the section "opened" by this object will be "closed".<BR>
62 If constructed for reading, any remaining bytes 'til the end of the section will be skipped.
64 ~OStreamSection();
67 } // namespace comphelper
69 #endif // INCLUDED_COMPHELPER_STREAMSECTION_HXX
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */