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
16#ifndef OHOS_HIVIEWDFX_QUERY_ARGUMENT_H
17#define OHOS_HIVIEWDFX_QUERY_ARGUMENT_H
18
19#include "parcel.h"
20
21namespace OHOS {
22namespace HiviewDFX {
23class QueryArgument : public Parcelable {
24public:
25    QueryArgument() {}
26    QueryArgument(int64_t beginTime, int64_t endTime, int32_t maxEvents = 0,
27        int64_t fromSeq = -1, int64_t toSeq = -1)
28        : beginTime(beginTime), endTime(endTime), maxEvents(maxEvents), fromSeq(fromSeq), toSeq(toSeq) {}
29    ~QueryArgument() {}
30
31    bool Marshalling(Parcel& parcel) const override;
32    static QueryArgument* Unmarshalling(Parcel& parcel);
33
34    int64_t beginTime = -1;
35    int64_t endTime = -1;
36    int32_t maxEvents = 0;
37    int64_t fromSeq = -1;
38    int64_t toSeq = -1;
39};
40} // namespace HiviewDFX
41} // namespace OHOS
42
43#endif // OHOS_HIVIEWDFX_QUERY_ARGUMENT_H