1 /* 2 * Copyright (c) 2023 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 FOUNDATION_BUNDLE_FRAMEWORK_AOT_AOT_ARGS 17 #define FOUNDATION_BUNDLE_FRAMEWORK_AOT_AOT_ARGS 18 19 #include "message_parcel.h" 20 21 namespace OHOS { 22 namespace AppExecFwk { 23 struct HspInfo : public Parcelable { 24 std::string bundleName; 25 std::string moduleName; 26 uint32_t versionCode = 0; 27 std::string hapPath; 28 uint32_t offset = 0; 29 uint32_t length = 0; 30 31 std::string ToString() const; 32 bool ReadFromParcel(Parcel &parcel); 33 virtual bool Marshalling(Parcel &parcel) const override; 34 static HspInfo *Unmarshalling(Parcel &parcel); 35 }; 36 37 struct AOTArgs : public Parcelable { 38 std::string bundleName; 39 std::string moduleName; 40 std::string compileMode; 41 std::string hapPath; 42 std::string coreLibPath; 43 std::string outputPath; 44 std::string arkProfilePath; 45 std::string anFileName; 46 uint32_t offset = 0; 47 uint32_t length = 0; 48 std::vector<HspInfo> hspVector; 49 int32_t bundleUid = -1; 50 int32_t bundleGid = -1; 51 std::string appIdentifier; 52 uint32_t isEncryptedBundle = 0; 53 std::string optBCRangeList; 54 uint32_t isScreenOff = 0; 55 uint32_t isEnableBaselinePgo = 0; 56 57 std::string ToString() const; 58 bool ReadFromParcel(Parcel &parcel); 59 virtual bool Marshalling(Parcel &parcel) const override; 60 static AOTArgs *Unmarshalling(Parcel &parcel); 61 }; 62 } // namespace AppExecFwk 63 } // namespace OHOS 64 #endif // FOUNDATION_BUNDLE_FRAMEWORK_AOT_AOT_ARGS 65