• 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 BR_TRANS_MANAGER_H
17 #define BR_TRANS_MANAGER_H
18 #include "br_connection_manager.h"
19 #include "cJSON.h"
20 #include "wrapper_br_interface.h"
21 
22 #ifdef __cplusplus
23 #if __cplusplus
24 extern "C" {
25 #endif
26 #endif
27 
28 #define KEY_METHOD "KEY_METHOD"
29 #define KEY_DELTA "KEY_DELTA"
30 #define KEY_REFERENCE_NUM "KEY_REFERENCE_NUM"
31 #define KEY_WINDOWS "KEY_WINDOWS"
32 #define KEY_ACK_SEQ_NUM "KEY_ACK_SEQ_NUM"
33 
34 int32_t BrTransReadOneFrame(uint32_t connectionId, const SppSocketDriver *sppDriver, int32_t clientId, char **outBuf);
35 int32_t BrTransSend(BrConnectionInfo *brConnInfo, const SppSocketDriver *sppDriver,
36     int32_t brSendPeerLen, const char *data, uint32_t len);
37 
38 char *BrPackRequestOrResponse(int32_t requestOrResponse, int32_t delta, uint64_t count, int32_t *outLen);
39 #ifdef __cplusplus
40 #if __cplusplus
41 }
42 #endif /* __cplusplus */
43 #endif /* __cplusplus */
44 #endif /* BR_TRANS_MANAGER_H */
45