Related: tdf#163126 fix failure to restart print job
[LibreOffice.git] / sot / source / sdstor / stgio.hxx
blob7ed5917ac63e0e680cd862eed0c328d3d48ad250
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_SOT_SOURCE_SDSTOR_STGIO_HXX
21 #define INCLUDED_SOT_SOURCE_SDSTOR_STGIO_HXX
23 #include "stgcache.hxx"
24 #include "stgelem.hxx"
26 class StgFATStrm;
27 class StgDataStrm;
28 class StgDirStrm;
30 enum class FatError
32 Ok,
33 WrongLength,
34 UnrefChain,
35 OutOfBounds,
37 InMemoryError,
38 OnFileError,
39 BothError
42 class StgIo : public StgCache {
43 void SetupStreams(); // load all internal streams
44 bool m_bCopied;
45 public:
46 StgIo();
47 ~StgIo();
48 StgHeader m_aHdr; // storage file header
49 StgFATStrm* m_pFAT; // FAT stream
50 StgDirStrm* m_pTOC; // TOC stream
51 StgDataStrm* m_pDataFAT; // small data FAT stream
52 StgDataStrm* m_pDataStrm; // small data stream
53 short GetDataPageSize() const; // get the logical data page size
54 bool Load(); // load a storage file
55 bool Init(); // set up an empty file
56 bool CommitAll(); // commit everything (root commit)
58 FatError ValidateFATs( );
61 #endif
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */