1 /*
2  * Copyright (c) 2021-2022 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 OHOS_FORM_FWK_FORM_RECORD_H
17 #define OHOS_FORM_FWK_FORM_RECORD_H
18 
19 #include <vector>
20 #include "form_constants.h"
21 #include "form_info_base.h"
22 #include "form_instance.h"
23 #include "form_provider_info.h"
24 #include "application_info.h"
25 
26 namespace OHOS {
27 namespace AppExecFwk {
28 /**
29  * @class FormRecord
30  * Form data.
31  */
32 class FormRecord {
33 public:
34     int64_t formId = 0;
35     bool isInited = false;
36     bool needFreeInstall = false;
37     bool versionUpgrade = false;
38     bool needRefresh = false;
39     bool needAddForm = false;
40     bool isCountTimerRefresh = false;
41     std::string packageName = "";
42     std::string bundleName = "";
43     std::string moduleName = "";
44     std::string abilityName = "";
45     std::string formName = "";
46     int32_t specification;
47     bool isEnableUpdate = false;
48     bool isVisible = false;
49     int64_t updateDuration = 0;
50     int updateAtHour = -1;
51     int updateAtMin = -1;
52     FormProviderInfo formProviderInfo;
53     std::vector<std::string> hapSourceDirs;
54     std::map<std::string, std::string> modulePkgNameMap;
55     std::string jsFormCodePath = "";
56     bool formTempFlag = false;
57     std::vector<int> formUserUids;
58     bool formVisibleNotify = false;
59     int formVisibleNotifyState = 0;
60     int32_t userId = 0;
61     int32_t providerUserId = Constants::DEFAULT_PROVIDER_USER_ID;
62     std::string formSrc = "";
63     FormWindow formWindow;
64     uint32_t versionCode = 0;
65     std::string versionName = "";
66     uint32_t compatibleVersion = 0;
67     FormType type = FormType::JS;
68     FormType uiSyntax = FormType::JS;
69     bool isDynamic = true;
70     bool transparencyEnabled = false;
71     bool isTimerRefresh = false;
72     bool isDataProxy = false;
73     bool isSystemApp = false;
74     int32_t uid = 0;
75     std::string description = "";
76     int32_t privacyLevel = 0;
77     bool isNeedNotify = true;
78     RecycleStatus recycleStatus = RecycleStatus::NON_RECYCLABLE;
79     Constants::FormLocation formLocation;
80     bool isThemeForm = false;
81     BundleType formBundleType = BundleType::APP;
82     bool enableForm = true;
83     bool isRefreshDuringDisableForm = false;
84     bool isUpdateDuringDisableForm = false;
85     Constants::RenderingMode renderingMode = Constants::RenderingMode::FULL_COLOR;
86 };
87 }  // namespace AppExecFwk
88 }  // namespace OHOS
89 
90 #endif // OHOS_FORM_FWK_FORM_RECORD_H
91