• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef DEVATTEST_MSG_DEF_H
16 #define DEVATTEST_MSG_DEF_H
17 
18 #include <stdint.h>
19 
20 #ifdef __cplusplus
21 #if __cplusplus
22 extern "C" {
23 #endif
24 #endif
25 
26 #define DEVATTEST_FAIL                            (-1)
27 
28 #define DEVATTEST_SUCCESS                         0
29 
30 #define DEVATTEST_ERR_JS_IS_NOT_SYSTEM_APP        202
31 #define DEVATTEST_ERR_JS_PARAMETER_ERROR          401
32 #define DEVATTEST_ERR_JS_SYSTEM_SERVICE_EXCEPTION 20000001
33 
34 #define ATTEST_RESULT_INIT (-1)
35 
36 typedef struct {
37     int32_t authResult;
38     int32_t softwareResult;
39     int32_t softwareResultDetail[5];
40     int32_t ticketLength;
41     char* ticket;
42 } AttestResultInfo;
43 
44 #ifdef __cplusplus
45 #if __cplusplus
46 }
47 #endif
48 #endif
49 
50 #endif