Debian Codegraph @

modules/lsp-runtime-lib/include/lsp-plug.in/resource/OutProxyStream.h

raw
1 /*
2 * Copyright (C) 2021 Linux Studio Plugins Project <https://lsp-plug.in/>
3 * (C) 2021 Vladimir Sadovnikov <[email protected]>
4 *
5 * This file is part of lsp-runtime-lib
6 * Created on: 20 мар. 2021 г.
7 *
8 * lsp-runtime-lib is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * any later version.
12 *
13 * lsp-runtime-lib is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with lsp-runtime-lib. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22 #ifndef LSP_PLUG_IN_RESOURCE_OUTPROXYSTREAM_H_
23 #define LSP_PLUG_IN_RESOURCE_OUTPROXYSTREAM_H_
24
25 #include <lsp-plug.in/runtime/version.h>
26 #include <lsp-plug.in/io/IOutStream.h>
27
28 namespace lsp
29 {
30 namespace resource
31 {
32 class OutProxyStream: public io::IOutStream
33 {
34 private:
35 OutProxyStream & operator = (const OutProxyStream &);
36 OutProxyStream(const OutProxyStream &);
37
38 protected:
39 io::IOutStream *pOS;
40 wssize_t nPosition;
41 size_t nWrapFlags;
42
43 public:
44 explicit OutProxyStream();
45 virtual ~OutProxyStream();
46
47 protected:
48 status_t do_close();
49
50 public:
51 status_t wrap(io::IOutStream *os, size_t flags);
52
53 public:
54 virtual wssize_t position();
55
56 virtual ssize_t write(const void *buf, size_t count);
57
58 virtual wssize_t seek(wsize_t position);
59
60 virtual status_t flush();
61
62 virtual status_t close();
63 };
64 }
65 }
66
67 #endif /* LSP_PLUG_IN_RESOURCE_OUTPROXYSTREAM_H_ */