• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "softbus_common.h"
20 #include "softbus_trans_def.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 int32_t TransServerProxyInit(void);
27 void TransServerProxyDeInit(void);
28 void TransServerProxyClear(void);
29 int32_t ServerIpcCreateSessionServer(const char *pkgName, const char *sessionName, uint64_t timestamp);
30 int32_t ServerIpcRemoveSessionServer(const char *pkgName, const char *sessionName, uint64_t timestamp);
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 int32_t ServerIpcProcessInnerEvent(int32_t eventType, uint8_t *buf, uint32_t len);
46 int32_t ServerIpcPrivilegeCloseChannel(uint64_t tokenId, int32_t pid, const char *peerNetworkId);
47 int32_t ServerIpcOpenBrProxy(const char *brMac, const char *uuid);
48 int32_t ServerIpcCloseBrProxy(int32_t channelId);
49 int32_t ServerIpcSendBrProxyData(int32_t channelId, char* data, uint32_t dataLen);
50 int32_t ServerIpcSetListenerState(int32_t channelId, int32_t type, bool CbEnabled);
51 int32_t ServerIpcIsProxyChannelEnabled(int32_t uid, bool *isEnable);
52 int32_t ServerIpcRegisterPushHook();
53 #ifdef __cplusplus
54 }
55 #endif
56 #endif
57