• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 REQUEST_PARCEL_HELPER_H
17 #define REQUEST_PARCEL_HELPER_H
18 #include "js_common.h"
19 #include "message_parcel.h"
20 #include "visibility.h"
21 namespace OHOS {
22 namespace Request {
23 class ParcelHelper {
24 public:
25     REQUEST_API static void UnMarshal(MessageParcel &data, TaskInfo &info);
26     REQUEST_API static void UnMarshalConfig(MessageParcel &data, Config &config);
27 
28 private:
29     static void UnMarshalBase(MessageParcel &data, TaskInfo &info);
30     static bool UnMarshalFormItem(MessageParcel &data, TaskInfo &info);
31     static bool UnMarshalFileSpec(MessageParcel &data, TaskInfo &info);
32     static void UnMarshalProgress(MessageParcel &data, TaskInfo &info);
33     static bool UnMarshalMapProgressExtras(MessageParcel &data, TaskInfo &info);
34     static bool UnMarshalMapExtras(MessageParcel &data, TaskInfo &info);
35     static bool UnMarshalTaskState(MessageParcel &data, TaskInfo &info);
36     static bool UnMarshalConfigHeaders(MessageParcel &data, Config &config);
37     static bool UnMarshalConfigExtras(MessageParcel &data, Config &config);
38     static bool UnMarshalConfigFormItem(MessageParcel &data, Config &config);
39     static bool UnMarshalConfigFileSpec(MessageParcel &data, Config &config);
40     static bool UnMarshalConfigBodyFileName(MessageParcel &data, Config &config);
41 };
42 } // namespace Request
43 } // namespace OHOS
44 #endif //REQUEST_PARCEL_HELPER_H
45