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