1 /* 2 * Copyright (c) 2021-2024 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 TRANS_UDP_CHANNEL_MANAGER_STRUCT_H 17 #define TRANS_UDP_CHANNEL_MANAGER_STRUCT_H 18 19 #include <stdint.h> 20 #include "softbus_app_info.h" 21 #include "softbus_common.h" 22 #include "trans_uk_manager.h" 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 typedef enum { 29 UDP_CHANNEL_STATUS_INIT = 0, 30 UDP_CHANNEL_STATUS_OPEN_AUTH, 31 UDP_CHANNEL_STATUS_NEGING, 32 UDP_CHANNEL_STATUS_DONE 33 } UdpChannelStatus; 34 35 typedef struct { 36 bool isMeta; 37 bool isReply; 38 uint8_t tos; 39 UdpChannelStatus status; 40 uint32_t requestId; 41 int32_t errCode; 42 uint32_t timeOut; 43 int64_t seq; 44 ListNode node; 45 AuthHandle authHandle; 46 UkIdInfo ukIdInfo; 47 AppInfo info; 48 } UdpChannelInfo; 49 50 typedef struct { 51 ListNode node; 52 int64_t channelId; 53 int pid; 54 char pkgName[PKG_NAME_SIZE_MAX]; 55 } UdpChannelNotifyInfo; 56 57 #ifdef __cplusplus 58 } 59 #endif 60 61 #endif // !TRANS_UDP_CHANNEL_MANAGER_STRUCT_H 62