2 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include "mock/rpc_port_mock.hh"
18 #include "mock/mock_hook.hh"
19 #include "mock/test_fixture.hh"
21 RpcPortMock::~RpcPortMock() = default;
23 extern "C" int rpc_port_proxy_connect_sync(rpc_port_proxy_h h,
24 const char *appid, const char *port_name) {
25 return MOCK_HOOK_P3(RpcPortMock, rpc_port_proxy_connect_sync,
29 extern "C" int rpc_port_read(rpc_port_h h, void *buf, unsigned int size) {
30 return MOCK_HOOK_P3(RpcPortMock, rpc_port_read,
34 extern "C" int rpc_port_write(rpc_port_h h, const void *buf, unsigned int size) {
35 return MOCK_HOOK_P3(RpcPortMock, rpc_port_write,
39 extern "C" int rpc_port_proxy_add_connected_event_cb(rpc_port_proxy_h h,
40 rpc_port_proxy_connected_event_cb cb, void *user_data) {
41 return MOCK_HOOK_P3(RpcPortMock, rpc_port_proxy_add_connected_event_cb,
45 extern "C" int rpc_port_parcel_create_from_port(rpc_port_parcel_h* h,
47 return MOCK_HOOK_P2(RpcPortMock, rpc_port_parcel_create_from_port,
51 extern "C" int rpc_port_parcel_send(rpc_port_parcel_h h, rpc_port_h port) {
52 return MOCK_HOOK_P2(RpcPortMock, rpc_port_parcel_send,