2 * Copyright (c) 2020 - 2021 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 "unit_tests/mock/aul_mock.h"
19 #include "unit_tests/mock/mock_hook.h"
20 #include "unit_tests/mock/test_fixture.h"
22 extern "C" int aul_app_get_appid_bypid(int pid, char* appid, int len) {
23 return MOCK_HOOK_P3(AulMock, aul_app_get_appid_bypid, pid, appid, len);
26 extern "C" int aul_app_get_pkgid_bypid(int pid, char* pkgid, int len) {
27 return MOCK_HOOK_P3(AulMock, aul_app_get_pkgid_bypid, pid, pkgid, len);
30 extern "C" int aul_widget_send_status_to_service(const char* class_id,
31 const char *instance_id, const char *sender_pkgid, int status) {
32 return MOCK_HOOK_P4(AulMock, aul_widget_send_status_to_service,
33 class_id, instance_id, sender_pkgid, status);
36 extern "C" int aul_widget_send_status_to_viewer(const char* class_id,
37 const char *instance_id, const char *viewer_endpoint,
38 int status, int err, bundle *extra) {
39 return MOCK_HOOK_P6(AulMock, aul_widget_send_status_to_viewer,
40 class_id, instance_id, viewer_endpoint, status, err, extra);
43 extern "C" int aul_notify_exit(void) {
44 return MOCK_HOOK_P0(AulMock, aul_notify_exit);
47 extern "C" int aul_widget_write_log(const char* tag, const char* format, ...) {
51 extern "C" int aul_widget_instance_del(const char* widget_id,
52 const char* instance_id) {
56 extern "C" int aul_status_update(int status) {