• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_provider_info.h"
23 
24 namespace OHOS {
25 namespace AppExecFwk {
26 enum class RecycleStatus {
27     RECYCLABLE,
28     RECYCLED,
29     NON_RECYCLABLE,
30 };
31 /**
32  * @class FormRecord
33  * Form data.
34  */
35 class FormRecord {
36 public:
37     int64_t formId = 0;
38     bool isInited = false;
39     bool needFreeInstall = false;
40     bool versionUpgrade = false;
41     bool needRefresh = false;
42     bool isCountTimerRefresh = false;
43     std::string packageName = "";
44     std::string bundleName = "";
45     std::string moduleName = "";
46     std::string abilityName = "";
47     std::string formName = "";
48     int32_t specification;
49     bool isEnableUpdate = false;
50     bool isVisible = false;
51     int64_t updateDuration = 0;
52     int updateAtHour = -1;
53     int updateAtMin = -1;
54     FormProviderInfo formProviderInfo;
55     std::vector<std::string> hapSourceDirs;
56     std::string jsFormCodePath = "";
57     bool formTempFlag = false;
58     std::vector<int> formUserUids;
59     bool formVisibleNotify = false;
60     int formVisibleNotifyState = 0;
61     int32_t userId = 0;
62     int32_t providerUserId = Constants::DEFAULT_PROVIDER_USER_ID;
63     std::string formSrc = "";
64     FormWindow formWindow;
65     uint32_t versionCode = 0;
66     std::string versionName = "";
67     uint32_t compatibleVersion = 0;
68     FormType type = FormType::JS;
69     FormType uiSyntax = FormType::JS;
70     bool isDynamic = true;
71     bool transparencyEnabled = false;
72     bool isTimerRefresh = false;
73     bool isDataProxy = false;
74     bool isSystemApp = false;
75     int32_t uid = 0;
76     std::string description = "";
77     int32_t privacyLevel = 0;
78     bool isNeedNotify = true;
79     RecycleStatus recycleStatus = RecycleStatus::NON_RECYCLABLE;
80 };
81 }  // namespace AppExecFwk
82 }  // namespace OHOS
83 
84 #endif // OHOS_FORM_FWK_FORM_RECORD_H
85