1 /* 2 * Copyright (c) 2024 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 SECURITY_COLLECTOR_SECURITY_EVENT_RULE_H 17 #define SECURITY_COLLECTOR_SECURITY_EVENT_RULE_H 18 19 #include <string> 20 21 #include "parcel.h" 22 23 namespace OHOS::Security::SecurityCollector { 24 class SecurityEventRuler : public Parcelable { 25 public: 26 SecurityEventRuler() = default; 27 SecurityEventRuler(int64_t eventId, const std::string &beginTime = "", const std::string &endTime = "", 28 const std::string ¶m = "") 29 : eventId_(eventId), beginTime_(beginTime), endTime_(endTime), param_(param) {}; 30 ~SecurityEventRuler() override = default; 31 GetEventId()32 int64_t GetEventId() const { return eventId_; }; GetBeginTime()33 std::string GetBeginTime() const { return beginTime_; }; GetEndTime()34 std::string GetEndTime() const { return endTime_; }; GetParam()35 std::string GetParam() const { return param_; }; Marshalling(Parcel & parcel)36 bool Marshalling(Parcel& parcel) const override { return true; }; ReadFromParcel(Parcel & parcel)37 bool ReadFromParcel(Parcel &parcel) { return true; }; Unmarshalling(Parcel & parcel)38 static SecurityEventRuler* Unmarshalling(Parcel& parcel) { return {}; }; 39 40 private: 41 int64_t eventId_; 42 std::string beginTime_; 43 std::string endTime_; 44 std::string param_; 45 }; 46 } // namespace OHOS::Security::SecurityCollector 47 48 #endif // SECURITY_COLLECTOR_SECURITY_EVENT_RULE_H 49