Release version 0.24.15
[platform/core/appfw/pkgmgr-info.git] / test / unit_tests / parcel_utils.hh
1 /*
2  * Copyright (c) 2021 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 <string>
18 #include <vector>
19 #include <memory>
20
21 #include "pkgmgrinfo_basic.h"
22 #include "pkgmgrinfo_private.h"
23
24 application_x *GetTestApplication(std::string appid);
25
26 bool IsEqualApplicationsStructure(const std::vector<std::shared_ptr<application_x>>& applicationsA,
27     const std::vector<std::shared_ptr<application_x>>& applicationsB);
28
29 bool IsEqualApplicationsInfo(const std::vector<std::shared_ptr<application_x>>& applicationsA,
30     const std::vector<std::shared_ptr<application_x>>& applicationsB);
31
32 package_x *GetTestPackage(std::string pkgid);
33
34 package_x* GetUpdatedTestPackage(std::string pkgid);
35
36 bool IsEqualPackagesStructure(const std::vector<std::shared_ptr<package_x>>& packagesA,
37     const std::vector<std::shared_ptr<package_x>>&packagesB);
38
39 bool IsEqualPackagesInfo(const std::vector<std::shared_ptr<package_x>>& packagesA,
40     const std::vector<std::shared_ptr<package_x>>& packagesB);
41
42 pkgmgrinfo_filter_x *GetTestFilter();
43
44 bool IsEqualFilter(const pkgmgrinfo_filter_x *filterA,
45     const pkgmgrinfo_filter_x *filterB);
46
47 pkgmgr_certinfo_x *GetTestCertInfo();
48
49 bool IsEqualCertInfo(const pkgmgr_certinfo_x *certA,
50     const pkgmgr_certinfo_x *certB);
51
52 bool IsEqualCertInfoStructure(const pkgmgr_certinfo_x *certA,
53     const pkgmgr_certinfo_x *certB);
54
55 dependency_x *GetTestDepInfo(std::string pkgid);
56
57 bool IsEqualDepInfo(const std::vector<dependency_x *>& depA,
58     const std::vector<dependency_x *>& depB);
59
60 pkgmgr_certinfo_x *GetTestCertificate();