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 #ifndef MOCK_PKGMGR_INFO_MOCK_H_
18 #define MOCK_PKGMGR_INFO_MOCK_H_
20 #include <pkgmgr-info.h>
21 #include <package-manager.h>
22 #include <gmock/gmock.h>
24 #include "module_mock.h"
26 class PkgmgrInfoMock : public virtual ModuleMock {
28 virtual ~PkgmgrInfoMock() {}
30 MOCK_METHOD1(pkgmgr_client_free, int (pkgmgr_client*));
31 MOCK_METHOD2(pkgmgrinfo_appinfo_get_appid, int (pkgmgrinfo_appinfo_h,
33 MOCK_METHOD1(pkgmgrinfo_pkginfo_destroy_pkginfo,
34 int (pkgmgrinfo_pkginfo_h));
35 MOCK_METHOD4(pkgmgrinfo_pkginfo_compare_usr_app_cert_info, int (const char*,
36 const char*, uid_t, pkgmgrinfo_cert_compare_result_type_e*));
37 MOCK_METHOD3(pkgmgrinfo_appinfo_foreach_appcontrol, int (
38 pkgmgrinfo_appinfo_h , pkgmgrinfo_app_control_list_cb, void*));
39 MOCK_METHOD2(pkgmgrinfo_pkginfo_get_version, int (pkgmgrinfo_pkginfo_h,
41 MOCK_METHOD5(pkgmgrinfo_appinfo_get_usr_list, int (pkgmgrinfo_pkginfo_h,
42 pkgmgrinfo_app_component, pkgmgrinfo_app_list_cb, void*, uid_t));
43 MOCK_METHOD3(pkgmgrinfo_pkginfo_get_usr_pkginfo,
44 int (const char *, uid_t, pkgmgrinfo_pkginfo_h*));
45 MOCK_METHOD1(pkgmgr_client_new, pkgmgr_client* (pkgmgr_client_type));
46 MOCK_METHOD2(pkgmgrinfo_appinfo_get_pkgid,
47 int (pkgmgrinfo_pkginfo_h, char **));
48 MOCK_METHOD3(pkgmgr_client_listen_status, int (pkgmgr_client*,
49 pkgmgr_handler, void*));
50 MOCK_METHOD1(pkgmgrinfo_appinfo_destroy_appinfo,
51 int (pkgmgrinfo_appinfo_h));
52 MOCK_METHOD3(pkgmgrinfo_appinfo_get_usr_appinfo,
53 int (const char *, uid_t, pkgmgrinfo_appinfo_h*));
56 #endif // MOCK_PKMGR_INFO_MOCK_H_