2 * Copyright (c) 2019 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 #ifndef UNIT_TESTS_MOCK_MOCK_AUL_COMP_CONTEXT_H__
18 #define UNIT_TESTS_MOCK_MOCK_AUL_COMP_CONTEXT_H__
22 #include <sys/types.h>
30 typedef void *aul_comp_context_h;
32 typedef bool (*aul_comp_context_cb)(aul_comp_context_h handle, void *user_data);
34 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_foreach_comp_context, aul_comp_context_cb, void *);
36 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_get_app_id, aul_comp_context_h, const char **);
38 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_get_instance_id, aul_comp_context_h, const char **);
40 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_get_comp_id, aul_comp_context_h, const char **);
42 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_get_type, aul_comp_context_h, const char **);
44 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_get_pid, aul_comp_context_h, pid_t *);
46 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_get_status, aul_comp_context_h, int *);
48 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_is_sub_comp, aul_comp_context_h, bool *);
50 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_create, const char *, aul_comp_context_h *);
52 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_usr_create, const char *, uid_t, aul_comp_context_h *);
54 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_destroy, aul_comp_context_h);
56 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_clone, aul_comp_context_h, aul_comp_context_h *);
58 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_is_running, aul_comp_context_h, bool *);
60 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_resume, aul_comp_context_h);
62 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_pause, aul_comp_context_h);
64 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_terminate_bg_comp, aul_comp_context_h);
66 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_terminate, aul_comp_context_h);
72 #endif // UNIT_TESTS_MOCK_MOCK_AUL_COMP_CONTEXT_H__