• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 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 #ifndef OHOS_FORM_FWK_FORM_INFO_FILTER_H
16 #define OHOS_FORM_FWK_FORM_INFO_FILTER_H
17 
18 #include "parcel.h"
19 
20 namespace OHOS {
21 namespace AppExecFwk {
22 /**
23  * @brief This struct is mainly used by function getFormsInfo as a filter to retrieve only formInfos
24  * that has desired attributes, e.g. the formInfo is belong to a module with the same moduleName as specifed
25  * in FormInfoFilter.
26  */
27 struct FormInfoFilter final : public Parcelable {
28     // list of parameters
29     std::string moduleName = "";
30 
31     /**
32      * @brief Serialize the list of parameters for IPC.
33      *
34      * @param parcel The container into which the serialized parameters write.
35      * @return true when serialization is successful, false otherwise.
36      */
37     bool Marshalling(Parcel &parcel) const override;
38 
39     /**
40      * @brief Deserialize the list of parameters from IPC
41      *
42      * @param parcel The container from which the serialized parameters read.
43      * @return true when deserialization is successful, false otherwise.
44      */
45     static FormInfoFilter *Unmarshalling(Parcel &parcel);
46 };
47 } // AppExecFwk
48 } // OHOS
49 #endif