• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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 CLIENT_TRANS_PROXY_CHANNEL_H
17 #define CLIENT_TRANS_PROXY_CHANNEL_H
18 
19 #include "client_trans_file_listener.h"
20 #include "client_trans_session_callback.h"
21 #include "softbus_def.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 int32_t ClinetTransProxyInit(const IClientSessionCallBack *cb);
28 
29 void ClientTransProxyDeinit(void);
30 
31 int32_t ClientTransProxyOnChannelOpened(const char *sessionName, const ChannelInfo *channel);
32 
33 int32_t ClientTransProxyOnChannelClosed(int32_t channelId);
34 
35 int32_t ClientTransProxyOnChannelOpenFailed(int32_t channelId, int32_t errCode);
36 
37 int32_t ClientTransProxyOnDataReceived(int32_t channelId,
38     const void *data, uint32_t len, SessionPktType type);
39 
40 void ClientTransProxyCloseChannel(int32_t channelId);
41 
42 int32_t TransProxyChannelSendBytes(int32_t channelId, const void *data, uint32_t len);
43 
44 int32_t TransProxyChannelSendMessage(int32_t channelId, const void *data, uint32_t len);
45 
46 int32_t TransProxyChannelSendFile(int32_t channelId, const char *sFileList[], const char *dFileList[],
47     uint32_t fileCnt);
48 
49 int32_t ProcessFileFrameData(int32_t sessionId, int32_t channelId, const char *data, uint32_t len, int32_t type);
50 
51 #ifdef __cplusplus
52 }
53 #endif
54 #endif