• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025-2025 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef INTERFACES_INNER_API_BUNDLE_MANAGER_INCLUDE_EDM_BUNDLE_INFO_H
17 #define INTERFACES_INNER_API_BUNDLE_MANAGER_INCLUDE_EDM_BUNDLE_INFO_H
18 
19 #include <string>
20 #include <vector>
21 
22 #include "edm_application_info.h"
23 #include "message_parcel.h"
24 #include "parcel.h"
25 #include "string_ex.h"
26 
27 namespace OHOS {
28 namespace EDM {
29 struct EdmSignatureInfo : public Parcelable {
30     std::string appId;
31     std::string fingerprint;
32     std::string appIdentifier;
33     std::string certificate;
34 
35     bool ReadFromParcel(Parcel &parcel);
36     virtual bool Marshalling(Parcel &parcel) const override;
37     static EdmSignatureInfo *Unmarshalling(Parcel &parcel);
38 };
39 
40 struct EdmBundleInfo : public Parcelable {
41     uint32_t versionCode = 0;
42     uint32_t minCompatibleVersionCode = 0;
43     uint32_t targetVersion = 0;
44 
45     int32_t appIndex = 0;
46 
47     int64_t installTime = 0;
48     int64_t updateTime = 0;
49     int64_t firstInstallTime = 0;
50 
51     std::string name;
52     std::string vendor;
53     std::string versionName;
54 
55     EdmSignatureInfo signatureInfo;
56     EdmApplicationInfo applicationInfo;
57 
58     bool ReadFromParcel(Parcel &parcel);
59     virtual bool Marshalling(Parcel &parcel) const override;
60     static EdmBundleInfo *Unmarshalling(Parcel &parcel);
61 };
62 } // namespace EDM
63 } // namespace OHOS
64 #endif // INTERFACES_INNER_API_BUNDLE_MANAGER_INCLUDE_EDM_BUNDLE_INFO_H
65