Debian Codegraph @

runtime/zstdw.h

raw
1 /* The zstdw object. It encapsulates the zstd functionality. The primary
2 * purpose of this wrapper class is to enable rsyslogd core to be build without
3 * zstd libraries.
4 *
5 * Copyright 2022 Adiscon GmbH.
6 *
7 * This file is part of the rsyslog runtime library.
8 *
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 * -or-
15 * see COPYING.ASL20 in the source distribution
16 *
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
22 */
23 #ifndef INCLUDED_ZSTDW_H
24 #define INCLUDED_ZSTDW_H
25
26 /* interfaces */
27 BEGINinterface(zstdw) /* name must also be changed in ENDinterface macro! */
28 rsRetVal (*doStrmWrite)(strm_t *pThis, uchar *const pBuf, const size_t lenBuf, const int bFlush,
29 rsRetVal (*strmPhysWrite)(strm_t *pThis, uchar *pBuf, size_t lenBuf));
30 rsRetVal (*doCompressFinish)(strm_t *pThis, rsRetVal (*Destruct)(strm_t *pThis, uchar *pBuf, size_t lenBuf));
31 rsRetVal (*Destruct)(strm_t *pThis);
32 ENDinterface(zstdw)
33 #define zstdwCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */
34
35
36 /* prototypes */
37 PROTOTYPEObj(zstdw);
38
39 /* the name of our library binary */
40 #define LM_ZSTDW_FILENAME "lmzstdw"
41
42 #endif /* #ifndef INCLUDED_ZSTDW_H */