Rewrite legacy code to C++ for checking privilege
[platform/core/appfw/event-system.git] / tests / mock / security_manager_mock.cc
1 /*
2  * Copyright (c) 2022 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 #include "security_manager_mock.h"
18 #include "mock_hook.h"
19 #include "test_fixture.h"
20
21 extern "C" int security_manager_app_has_privilege(const char* arg0,
22     const char* arg1, uid_t arg2, int* arg3) {
23   return MOCK_HOOK_P4(SecurityManagerMock, security_manager_app_has_privilege,
24       arg0, arg1, arg2, arg3);
25 }