1 /*
2 * Copyright (c) 2025 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 #include "proxy_manager.h"
16
17 #include "softbus_error_code.h"
18
GenerateRequestId(void)19 static uint32_t GenerateRequestId(void)
20 {
21 return 0;
22 }
23
OpenProxyChannel(ProxyChannelParam * param,const OpenProxyChannelCallback * callback)24 static int32_t OpenProxyChannel(ProxyChannelParam *param, const OpenProxyChannelCallback *callback)
25 {
26 (void)param;
27 (void)callback;
28 return SOFTBUS_CONN_PROXY_NOT_SUPPORT_ERR;
29 }
30
RegisterProxyChannelListener(ProxyConnectListener * listener)31 static int32_t RegisterProxyChannelListener(ProxyConnectListener *listener)
32 {
33 (void)listener;
34 return SOFTBUS_CONN_PROXY_NOT_SUPPORT_ERR;
35 }
36
GetProxyChannelByChannelId(uint32_t channelId)37 static struct ProxyConnection *GetProxyChannelByChannelId(uint32_t channelId)
38 {
39 (void)channelId;
40 return NULL;
41 }
42
43 static ProxyChannelManager g_proxyChannelManager = {
44 .generateRequestId = GenerateRequestId,
45 .openProxyChannel = OpenProxyChannel,
46 .registerProxyChannelListener = RegisterProxyChannelListener,
47
48 .getConnectionById = GetProxyChannelByChannelId,
49 .proxyChannelRequestInfo = NULL,
50 .proxyConnectionList = NULL,
51 };
52
GetProxyChannelManager(void)53 ProxyChannelManager *GetProxyChannelManager(void)
54 {
55 return &g_proxyChannelManager;
56 }
57
ProxyChannelManagerInit(void)58 int32_t ProxyChannelManagerInit(void)
59 {
60 return SOFTBUS_OK;
61 }