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 AUTH_MANAGER_STRUCT_H 17 #define AUTH_MANAGER_STRUCT_H 18 19 #include <stdint.h> 20 #include <stdbool.h> 21 22 #include "auth_interface_struct.h" 23 #include "auth_session_key_struct.h" 24 #include "bus_center_info_key_struct.h" 25 #include "lnn_lane_interface_struct.h" 26 #include "softbus_common.h" 27 28 #ifdef __cplusplus 29 #if __cplusplus 30 extern "C" { 31 #endif 32 #endif 33 34 typedef struct { 35 int64_t authId; 36 bool isServer; 37 /* connInfo */ 38 uint64_t connId[AUTH_LINK_TYPE_MAX]; 39 AuthConnInfo connInfo[AUTH_LINK_TYPE_MAX]; 40 uint64_t lastActiveTime; 41 /* sessionKeyInfo */ 42 int64_t lastAuthSeq[AUTH_LINK_TYPE_MAX]; 43 uint64_t lastVerifyTime; 44 SessionKeyList sessionKeyList; 45 /* deviceInfo */ 46 char p2pMac[MAC_LEN]; 47 char udid[UDID_BUF_LEN]; 48 char uuid[UUID_BUF_LEN]; 49 SoftBusVersion version; 50 /* authState */ 51 bool hasAuthPassed[AUTH_LINK_TYPE_MAX]; 52 ListNode node; 53 } AuthManager; 54 55 typedef struct { 56 int32_t messageType; 57 ModeCycle cycle; 58 } DeviceMessageParse; 59 60 #ifdef __cplusplus 61 #if __cplusplus 62 } 63 #endif 64 #endif 65 #endif /* AUTH_MANAGER_STRUCT_H */