1 /*
2  * Copyright (C) 2023 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 COMPATIBLE_SUB_SESSION_DEFINES_H
17 #define COMPATIBLE_SUB_SESSION_DEFINES_H
18 
19 #include "common_defs.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 typedef enum {
26     STATUS_INITIAL = 1,
27     STATUS_PROCESSING
28 } SubSessionStatusValue;
29 
30 typedef struct {
31     int type;
32     char *appId;
33     int32_t curTaskId;
34     SubSessionStatusValue status;
35     const DeviceAuthCallback *callback;
36 } CompatibleBaseSubSession;
37 
38 typedef enum {
39     TYPE_CLIENT_BIND_SUB_SESSION = 1,
40     TYPE_SERVER_BIND_SUB_SESSION,
41     TYPE_CLIENT_AUTH_SUB_SESSION,
42     TYPE_SERVER_AUTH_SUB_SESSION
43 } SubSessionTypeValue;
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif
50