1 /* 2 * Copyright (c) 2021-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 TRANS_SERVER_PROXY_H 17 #define TRANS_SERVER_PROXY_H 18 19 #include "stdint.h" 20 #include "softbus_common.h" 21 #include "softbus_trans_def.h" 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 int32_t TransServerProxyInit(void); 28 void TransServerProxyDeInit(void); 29 int32_t ServerIpcCreateSessionServer(const char *pkgName, const char *sessionName); 30 int32_t ServerIpcRemoveSessionServer(const char *pkgName, const char *sessionName); 31 int32_t ServerIpcOpenSession(const SessionParam *param, TransInfo *info); 32 int32_t ServerIpcOpenAuthSession(const char *sessionName, const ConnectionAddr *addrInfo); 33 int32_t ServerIpcNotifyAuthSuccess(int32_t channelId, int32_t channelType); 34 int32_t ServerIpcCloseChannel(const char *sessionName, int32_t channelId, int32_t channelType); 35 int32_t ServerIpcCloseChannelWithStatistics(int32_t channelId, int32_t channelType, uint64_t laneId, 36 const void *dataInfo, uint32_t len); 37 int32_t ServerIpcSendMessage(int32_t channelId, int32_t channelType, const void *data, uint32_t len, int32_t msgType); 38 int32_t ServerIpcQosReport(int32_t channelId, int32_t chanType, int32_t appType, int32_t quality); 39 int32_t ServerIpcGrantPermission(int uid, int pid, const char *sessionName); 40 int32_t ServerIpcRemovePermission(const char *sessionName); 41 int32_t ServerIpcReleaseResources(int32_t channelId); 42 int32_t ServerIpcStreamStats(int32_t channelId, int32_t channelType, const StreamSendStats *data); 43 int32_t ServerIpcRippleStats(int32_t channelId, int32_t channelType, const TrafficStats *data); 44 int32_t ServerIpcEvaluateQos(const char *peerNetworkId, TransDataType dataType, const QosTV *qos, uint32_t qosCount); 45 #ifdef __cplusplus 46 } 47 #endif 48 #endif 49