1686862fbSopenharmony_ci/*
2686862fbSopenharmony_ci * Copyright (c) 2021 Huawei Device Co., Ltd.
3686862fbSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4686862fbSopenharmony_ci * you may not use this file except in compliance with the License.
5686862fbSopenharmony_ci * You may obtain a copy of the License at
6686862fbSopenharmony_ci *
7686862fbSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8686862fbSopenharmony_ci *
9686862fbSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10686862fbSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11686862fbSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12686862fbSopenharmony_ci * See the License for the specific language governing permissions and
13686862fbSopenharmony_ci * limitations under the License.
14686862fbSopenharmony_ci */
15686862fbSopenharmony_ci
16686862fbSopenharmony_ci#ifndef OHOS_DISTRIBUTED_MISSION_INFO_H
17686862fbSopenharmony_ci#define OHOS_DISTRIBUTED_MISSION_INFO_H
18686862fbSopenharmony_ci
19686862fbSopenharmony_ci#include <string>
20686862fbSopenharmony_ci
21686862fbSopenharmony_ci#include "parcel.h"
22686862fbSopenharmony_ci
23686862fbSopenharmony_ci#include "application_info.h"
24686862fbSopenharmony_ci#include "element_name.h"
25686862fbSopenharmony_ci#include "want.h"
26686862fbSopenharmony_ci
27686862fbSopenharmony_cinamespace OHOS {
28686862fbSopenharmony_cinamespace DistributedSchedule {
29686862fbSopenharmony_cistruct DstbMissionInfo : public Parcelable {
30686862fbSopenharmony_ci    int32_t id = -1;
31686862fbSopenharmony_ci    int32_t runingState = -1;
32686862fbSopenharmony_ci    int32_t userId = 0;
33686862fbSopenharmony_ci    int32_t missionStackId = -1;
34686862fbSopenharmony_ci    std::vector<int32_t> combinedMissionIds;
35686862fbSopenharmony_ci    int32_t windowMode = 0;
36686862fbSopenharmony_ci    int32_t boundsLeft = 0;
37686862fbSopenharmony_ci    int32_t boundsTop = 0;
38686862fbSopenharmony_ci    int32_t boundsRight = 0;
39686862fbSopenharmony_ci    int32_t boundsBottom = 0;
40686862fbSopenharmony_ci    std::shared_ptr<AAFwk::Want> baseWant;
41686862fbSopenharmony_ci    std::shared_ptr<AppExecFwk::ElementName> topAbility;
42686862fbSopenharmony_ci    std::shared_ptr<AppExecFwk::ElementName> baseAbility;
43686862fbSopenharmony_ci    std::shared_ptr<AppExecFwk::ElementName> reservedAbility;
44686862fbSopenharmony_ci    int64_t lastMissionActiveTime = 0;
45686862fbSopenharmony_ci    int32_t displayId = 0;
46686862fbSopenharmony_ci    std::string label;
47686862fbSopenharmony_ci    int32_t size = 0;
48686862fbSopenharmony_ci    std::string iconPath;
49686862fbSopenharmony_ci    int32_t continuable = 0;
50686862fbSopenharmony_ci    int32_t windowType = 0;
51686862fbSopenharmony_ci    bool lockedState = false;
52686862fbSopenharmony_ci    int32_t missionType = INT_MAX;
53686862fbSopenharmony_ci    int32_t windowTypeMode = 0;
54686862fbSopenharmony_ci
55686862fbSopenharmony_ci    bool ReadFromParcel(Parcel& parcel);
56686862fbSopenharmony_ci    virtual bool Marshalling(Parcel& parcel) const override;
57686862fbSopenharmony_ci    static DstbMissionInfo* Unmarshalling(Parcel& parcel);
58686862fbSopenharmony_ci    std::string ToString() const;
59686862fbSopenharmony_ci
60686862fbSopenharmony_ci    static bool ReadDstbMissionInfosFromParcel(Parcel& parcel, std::vector<DstbMissionInfo>& missionInfos);
61686862fbSopenharmony_ci    static bool WriteDstbMissionInfosToParcel(Parcel& parcel, const std::vector<DstbMissionInfo>& missionInfos);
62686862fbSopenharmony_ci};
63686862fbSopenharmony_ci} // namespace DistributedSchedule
64686862fbSopenharmony_ci} // namespace OHOS
65686862fbSopenharmony_ci#endif // OHOS_DISTRIBUTED_MISSION_INFO_H
66