1bae44755Sopenharmony_ci/*
2bae44755Sopenharmony_ci * Copyright (C) 2022 Huawei Device Co., Ltd.
3bae44755Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4bae44755Sopenharmony_ci * you may not use this file except in compliance with the License.
5bae44755Sopenharmony_ci * You may obtain a copy of the License at
6bae44755Sopenharmony_ci *
7bae44755Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8bae44755Sopenharmony_ci *
9bae44755Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10bae44755Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11bae44755Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12bae44755Sopenharmony_ci * See the License for the specific language governing permissions and
13bae44755Sopenharmony_ci * limitations under the License.
14bae44755Sopenharmony_ci */
15bae44755Sopenharmony_ci
16bae44755Sopenharmony_ci#ifndef SYSCAP_TOOL_H
17bae44755Sopenharmony_ci#define SYSCAP_TOOL_H
18bae44755Sopenharmony_ci
19bae44755Sopenharmony_ci#include <stdint.h>
20bae44755Sopenharmony_ci
21bae44755Sopenharmony_ci#define TYPE_FILE (0U)
22bae44755Sopenharmony_ci#define TYPE_STRING (1U)
23bae44755Sopenharmony_ci
24bae44755Sopenharmony_ci#ifdef __cplusplus
25bae44755Sopenharmony_ci#if __cplusplus
26bae44755Sopenharmony_ciextern "C" {
27bae44755Sopenharmony_ci#endif /* __cplusplus */
28bae44755Sopenharmony_ci#endif /* __cplusplus */
29bae44755Sopenharmony_ci
30bae44755Sopenharmony_ci/* in: inputFile, out: outputPath/<product>.sc */
31bae44755Sopenharmony_ciint32_t PCIDEncode(char *inputFile, char *outputPath);
32bae44755Sopenharmony_ci/* in: inputFile, file name format: <product>.sc, out: outputPath/<product>.json */
33bae44755Sopenharmony_ciint32_t PCIDDecode(char *inputFile, char *outputPath);
34bae44755Sopenharmony_ci/* in: inputFile, out: outputPath/rpcid.sc */
35bae44755Sopenharmony_ciint32_t RPCIDEncode(char *inputFile, char *outputPath);
36bae44755Sopenharmony_ci/* in: inputFile, out: outputPath/rpcid.json */
37bae44755Sopenharmony_ciint32_t RPCIDDecode(char *inputFile, char *outputPath);
38bae44755Sopenharmony_ci/* in: inputFile, out: outputPath/rpcid.json */
39bae44755Sopenharmony_ciint32_t EncodeRpcidscToString(char *inputFile, char *outDirPath);
40bae44755Sopenharmony_ci/* in: pcidFile, rpcidFile */
41bae44755Sopenharmony_ciint32_t ComparePcidWithRpcidString(char *pcidFile, char *rpcidFile, uint32_t type);
42bae44755Sopenharmony_ciint32_t SeparateSyscapFromString(const char *inputString, uint32_t *osArray, uint32_t osArraySize,
43bae44755Sopenharmony_ci                                 char **priSyscap, uint32_t *priSyscapLen);
44bae44755Sopenharmony_ci
45bae44755Sopenharmony_ci#ifdef __cplusplus
46bae44755Sopenharmony_ci#if __cplusplus
47bae44755Sopenharmony_ci}
48bae44755Sopenharmony_ci#endif /* __cplusplus */
49bae44755Sopenharmony_ci#endif /* __cplusplus */
50bae44755Sopenharmony_ci
51bae44755Sopenharmony_ci#endif /* SYSCAP_TOOL_H */