1f857971dSopenharmony_ci/*
2f857971dSopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd.
3f857971dSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4f857971dSopenharmony_ci * you may not use this file except in compliance with the License.
5f857971dSopenharmony_ci * You may obtain a copy of the License at
6f857971dSopenharmony_ci *
7f857971dSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8f857971dSopenharmony_ci *
9f857971dSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10f857971dSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11f857971dSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12f857971dSopenharmony_ci * See the License for the specific language governing permissions and
13f857971dSopenharmony_ci * limitations under the License.
14f857971dSopenharmony_ci */
15f857971dSopenharmony_ci
16f857971dSopenharmony_ci#ifndef STATIONARY_PARAMS_H
17f857971dSopenharmony_ci#define STATIONARY_PARAMS_H
18f857971dSopenharmony_ci
19f857971dSopenharmony_ci#include "intention_identity.h"
20f857971dSopenharmony_ci#include "stationary_callback.h"
21f857971dSopenharmony_ci
22f857971dSopenharmony_cinamespace OHOS {
23f857971dSopenharmony_cinamespace Msdp {
24f857971dSopenharmony_cinamespace DeviceStatus {
25f857971dSopenharmony_cienum StationaryRequestID : uint32_t {
26f857971dSopenharmony_ci    UNKNOWN_STATIONARY_REQUEST,
27f857971dSopenharmony_ci    SUBSCRIBE_STATIONARY,
28f857971dSopenharmony_ci    UNSUBSCRIBE_STATIONARY,
29f857971dSopenharmony_ci    GET_STATIONARY_DATA,
30f857971dSopenharmony_ci};
31f857971dSopenharmony_ci
32f857971dSopenharmony_cistruct SubscribeStationaryParam final : public ParamBase {
33f857971dSopenharmony_ci    SubscribeStationaryParam() = default;
34f857971dSopenharmony_ci    SubscribeStationaryParam(Type type, ActivityEvent event,
35f857971dSopenharmony_ci        ReportLatencyNs latency, sptr<IRemoteDevStaCallback> callback);
36f857971dSopenharmony_ci
37f857971dSopenharmony_ci    bool Marshalling(MessageParcel &parcel) const override;
38f857971dSopenharmony_ci    bool Unmarshalling(MessageParcel &parcel) override;
39f857971dSopenharmony_ci
40f857971dSopenharmony_ci    Type type_;
41f857971dSopenharmony_ci    ActivityEvent event_;
42f857971dSopenharmony_ci    ReportLatencyNs latency_;
43f857971dSopenharmony_ci    sptr<IRemoteDevStaCallback> callback_;
44f857971dSopenharmony_ci};
45f857971dSopenharmony_ci
46f857971dSopenharmony_ciusing UnsubscribeStationaryParam = SubscribeStationaryParam;
47f857971dSopenharmony_ci
48f857971dSopenharmony_cistruct GetStaionaryDataParam final : public ParamBase {
49f857971dSopenharmony_ci    GetStaionaryDataParam() = default;
50f857971dSopenharmony_ci    explicit GetStaionaryDataParam(Type type);
51f857971dSopenharmony_ci
52f857971dSopenharmony_ci    bool Marshalling(MessageParcel &parcel) const override;
53f857971dSopenharmony_ci    bool Unmarshalling(MessageParcel &parcel) override;
54f857971dSopenharmony_ci
55f857971dSopenharmony_ci    Type type_ { Type::TYPE_INVALID };
56f857971dSopenharmony_ci};
57f857971dSopenharmony_ci
58f857971dSopenharmony_cistruct GetStaionaryDataReply final : public ParamBase {
59f857971dSopenharmony_ci    GetStaionaryDataReply() = default;
60f857971dSopenharmony_ci    explicit GetStaionaryDataReply(Data data);
61f857971dSopenharmony_ci
62f857971dSopenharmony_ci    bool Marshalling(MessageParcel &parcel) const override;
63f857971dSopenharmony_ci    bool Unmarshalling(MessageParcel &parcel) override;
64f857971dSopenharmony_ci
65f857971dSopenharmony_ci    Data data_ {};
66f857971dSopenharmony_ci};
67f857971dSopenharmony_ci} // namespace DeviceStatus
68f857971dSopenharmony_ci} // namespace Msdp
69f857971dSopenharmony_ci} // namespace OHOS
70f857971dSopenharmony_ci#endif // STATIONARY_PARAMS_H
71