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_CLIENT_PROXY_H 17 #define TRANS_CLIENT_PROXY_H 18 19 #include "session.h" 20 #include "socket.h" 21 #include "softbus_def.h" 22 #include "softbus_trans_def.h" 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 typedef struct { 29 int32_t msgChannelId; 30 int32_t msgChannelType; 31 int32_t msgPid; 32 int32_t msgMessageType; 33 const char *msgPkgName; 34 const char *msgUuid; 35 const char *msgUdid; 36 }ChannelMsg; 37 38 int32_t ClientIpcOnChannelOpened(const char *pkgName, const char *sessionName, const ChannelInfo *channel, int32_t pid); 39 int32_t ClientIpcOnChannelBind(ChannelMsg *data); 40 int32_t ClientIpcOnChannelOpenFailed(ChannelMsg *data, int32_t errCode); 41 int32_t ClientIpcOnChannelLinkDown(ChannelMsg *data, const char *networkId, const char *peerIp, int32_t routeType); 42 int32_t ClientIpcOnChannelClosed(ChannelMsg *data); 43 int32_t ClientIpcOnChannelMsgReceived(ChannelMsg *data, TransReceiveData *receiveData); 44 int32_t ClientIpcOnChannelQosEvent(const char *pkgName, const QosParam *param); 45 int32_t InformPermissionChange(int32_t state, const char *pkgName, int32_t pid); 46 int32_t ClientIpcSetChannelInfo( 47 const char *pkgName, const char *sessionName, int32_t sessionId, const TransInfo *transInfo, int32_t pid); 48 int32_t ClientIpcOnTransLimitChange(const char *pkgName, int32_t pid, int32_t channelId, uint8_t tos); 49 int32_t CheckServiceIsRegistered(const char *pkgName, int32_t pid); 50 int32_t ClientIpcChannelOnQos(ChannelMsg *data, QoSEvent event, const QosTV *qos, uint32_t count); 51 52 #ifdef __cplusplus 53 } 54 #endif 55 #endif