Release version 1.1.2
[platform/core/api/component-manager.git] / mock / mock_aul_comp_context.h
1 /*
2  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #ifndef UNIT_TESTS_MOCK_MOCK_AUL_COMP_CONTEXT_H__
18 #define UNIT_TESTS_MOCK_MOCK_AUL_COMP_CONTEXT_H__
19
20 #include <stdbool.h>
21 #include <unistd.h>
22 #include <sys/types.h>
23
24 #include "mock.h"
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 typedef void *aul_comp_context_h;
31
32 typedef bool (*aul_comp_context_cb)(aul_comp_context_h handle, void *user_data);
33
34 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_foreach_comp_context, aul_comp_context_cb, void *);
35
36 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_get_app_id, aul_comp_context_h, const char **);
37
38 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_get_instance_id, aul_comp_context_h, const char **);
39
40 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_get_comp_id, aul_comp_context_h, const char **);
41
42 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_get_type, aul_comp_context_h, const char **);
43
44 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_get_pid, aul_comp_context_h, pid_t *);
45
46 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_get_status, aul_comp_context_h, int *);
47
48 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_is_sub_comp, aul_comp_context_h, bool *);
49
50 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_create, const char *, aul_comp_context_h *);
51
52 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_usr_create, const char *, uid_t, aul_comp_context_h *);
53
54 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_destroy, aul_comp_context_h);
55
56 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_clone, aul_comp_context_h, aul_comp_context_h *);
57
58 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_is_running, aul_comp_context_h, bool *);
59
60 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_resume, aul_comp_context_h);
61
62 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_pause, aul_comp_context_h);
63
64 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_terminate_bg_comp, aul_comp_context_h);
65
66 DECLARE_FAKE_VALUE_FUNC(int, aul_comp_context_terminate, aul_comp_context_h);
67
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif // UNIT_TESTS_MOCK_MOCK_AUL_COMP_CONTEXT_H__