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 SESSION_MOCK_H
17#define SESSION_MOCK_H
18
19#include <cstdint>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25int CreateSessionServerInner(const char *pkgName, const char *sessionName);
26int RemoveSessionServerInner(const char *pkgName, const char *sessionName);
27int OpenSessionInner(const char *mySessionName, const char *peerSessionName, const char *peerNetworkId,
28    const char *groupId, int flag);
29void CloseSessionInner(int sessionId);
30int32_t GrantPermissionInner(int uid, int pid, const char *busName);
31int32_t RemovePermissionInner(const char *busName);
32int32_t SendBytesInner(int32_t sessionId, const void *data, uint32_t len);
33int32_t GetPeerUidInner(int32_t sessionId, int *data);
34int32_t GetPeerPidInner(int32_t sessionId, int *data);
35int32_t IsServerSideInner(int32_t sessionId, int *data);
36int32_t GetMySessionNameInner(int32_t sessionId, char *data, uint16_t len);
37int32_t GetPeerSessionNameInner(int32_t sessionId, char *data, uint16_t len);
38int32_t GetPeerDeviceIdInner(int32_t sessionId, char *data, uint16_t len);
39int32_t GetPkgNameInner(int32_t sessionId, char *data, uint16_t len);
40#ifdef __cplusplus
41}
42#endif
43#endif // SESSION_MOCK_H