1/*
2 * Copyright (C) 2022 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
16#ifndef SYSCAP_TOOL_H
17#define SYSCAP_TOOL_H
18
19#include <stdint.h>
20
21#define TYPE_FILE (0U)
22#define TYPE_STRING (1U)
23
24#ifdef __cplusplus
25#if __cplusplus
26extern "C" {
27#endif /* __cplusplus */
28#endif /* __cplusplus */
29
30/* in: inputFile, out: outputPath/<product>.sc */
31int32_t PCIDEncode(char *inputFile, char *outputPath);
32/* in: inputFile, file name format: <product>.sc, out: outputPath/<product>.json */
33int32_t PCIDDecode(char *inputFile, char *outputPath);
34/* in: inputFile, out: outputPath/rpcid.sc */
35int32_t RPCIDEncode(char *inputFile, char *outputPath);
36/* in: inputFile, out: outputPath/rpcid.json */
37int32_t RPCIDDecode(char *inputFile, char *outputPath);
38/* in: inputFile, out: outputPath/rpcid.json */
39int32_t EncodeRpcidscToString(char *inputFile, char *outDirPath);
40/* in: pcidFile, rpcidFile */
41int32_t ComparePcidWithRpcidString(char *pcidFile, char *rpcidFile, uint32_t type);
42int32_t SeparateSyscapFromString(const char *inputString, uint32_t *osArray, uint32_t osArraySize,
43                                 char **priSyscap, uint32_t *priSyscapLen);
44
45#ifdef __cplusplus
46#if __cplusplus
47}
48#endif /* __cplusplus */
49#endif /* __cplusplus */
50
51#endif /* SYSCAP_TOOL_H */