Debian Codegraph @

frmts/mrsid/mrsidstream.h

raw symbols SCIP
1 /******************************************************************************
2 *
3 * Project: Multi-resolution Seamless Image Database (MrSID)
4 * Purpose: Input/output stream wrapper for usage with LizardTech's
5 * MrSID SDK, implementation of the wrapper class methods.
6 * Author: Andrey Kiselev, [email protected]
7 *
8 ******************************************************************************
9 * Copyright (c) 2008, Andrey Kiselev <[email protected]>
10 * Copyright (c) 2008-2010, Even Rouault <even dot rouault at spatialys.com>
11 *
12 * SPDX-License-Identifier: MIT
13 ****************************************************************************/
14
15 #ifndef MRSIDSTREAM_H_INCLUDED
16 #define MRSIDSTREAM_H_INCLUDED
17
18 #include "mrsidstream_headers_include.h"
19
20 #include "cpl_vsi_virtual.h"
21
22 using namespace LizardTech;
23
24 class LTIVSIStream : public LTIOStreamInf
25 {
26 public:
27 LTIVSIStream();
28 LT_STATUS initialize(const char *, const char *);
29 LT_STATUS initialize(LTIVSIStream *ltiVSIStream);
30 ~LTIVSIStream();
31
32 bool isEOF() override;
33 bool isOpen() override;
34
35 LT_STATUS open() override;
36 LT_STATUS close() override;
37
38 lt_uint32 read(lt_uint8 *, lt_uint32) override;
39 lt_uint32 write(const lt_uint8 *, lt_uint32) override;
40
41 LT_STATUS seek(lt_int64, LTIOSeekDir) override;
42 lt_int64 tell() override;
43
44 LTIOStreamInf *duplicate() override;
45
46 LT_STATUS getLastError() const override;
47
48 const char *getID() const override;
49
50 private:
51 VSIVirtualHandle *poFileHandle;
52 int nError;
53 int *pnRefCount;
54 int bIsOpen;
55 };
56
57 #endif /* MRSIDSTREAM_H_INCLUDED */