xref: /developtools/hdc/hdc_rust/src/cffi/base.h (revision cc290419)
1/*
2 * Copyright (C) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#ifndef RUST_HDC_BASE
16#define RUST_HDC_BASE
17
18#include <cstdio>
19#include <securec.h>
20#include <vector>
21#include <string>
22
23namespace Hdc {
24using namespace std;
25
26constexpr uint16_t MAX_SIZE_IOBUF = 61440;
27constexpr uint16_t BUF_SIZE_MEDIUM = 512;
28constexpr uint16_t BUF_SIZE_DEFAULT = 1024;
29constexpr uint16_t BUF_SIZE_DEFAULT4 = BUF_SIZE_DEFAULT * 4;
30
31inline int GetMaxBufSize()
32{
33    return MAX_SIZE_IOBUF;
34}
35
36}
37#endif