API参考
载入中...
搜索中...
未找到
rec_buf.h
1/*
2 * This file is part of the openHiTLS project.
3 *
4 * openHiTLS is licensed under the Mulan PSL v2.
5 * You can use this software according to the terms and conditions of the Mulan PSL v2.
6 * You may obtain a copy of Mulan PSL v2 at:
7 *
8 * http://license.coscl.org.cn/MulanPSL2
9 *
10 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
11 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
12 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
13 * See the Mulan PSL v2 for more details.
14 */
15
16#ifndef REC_BUF_H
17#define REC_BUF_H
18
19#include <stdint.h>
20#include "bsl_list.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26
27typedef struct {
28 uint8_t *buf;
29 uint32_t bufSize;
30
31 uint32_t start;
32 uint32_t end;
33 uint32_t singleRecStart;
34 uint32_t singleRecEnd;
35 bool isHoldBuffer;
36} RecBuf;
37
38typedef struct BslList RecBufList;
46RecBuf *RecBufNew(uint32_t bufSize);
47
53void RecBufFree(RecBuf *buf);
54
60void RecBufClean(RecBuf *buf);
61
62RecBufList *RecBufListNew(void);
63
64void RecBufListFree(RecBufList *bufList);
65
66int32_t RecBufListDereference(RecBufList *bufList);
67
68bool RecBufListEmpty(RecBufList *bufList);
69
70int32_t RecBufListGetBuffer(RecBufList *bufList, uint8_t *buf, uint32_t bufLen, uint32_t *getLen, bool isPeek);
71
72int32_t RecBufListAddBuffer(RecBufList *bufList, RecBuf *buf);
73
74int32_t RecBufResize(RecBuf *recBuf, uint32_t size);
75
76#ifdef __cplusplus
77}
78#endif
79
80#endif
定义 bsl_list.h:49
定义 rec_buf.h:27