11401458bSopenharmony_ci/* 21401458bSopenharmony_ci * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 31401458bSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 41401458bSopenharmony_ci * you may not use this file except in compliance with the License. 51401458bSopenharmony_ci * You may obtain a copy of the License at 61401458bSopenharmony_ci * 71401458bSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 81401458bSopenharmony_ci * 91401458bSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 101401458bSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 111401458bSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 121401458bSopenharmony_ci * See the License for the specific language governing permissions and 131401458bSopenharmony_ci * limitations under the License. 141401458bSopenharmony_ci */ 151401458bSopenharmony_ci 161401458bSopenharmony_ci#ifndef OHOS_HIVIEWDFX_ISYS_EVENT_SERVICE_H 171401458bSopenharmony_ci#define OHOS_HIVIEWDFX_ISYS_EVENT_SERVICE_H 181401458bSopenharmony_ci 191401458bSopenharmony_ci#include <vector> 201401458bSopenharmony_ci 211401458bSopenharmony_ci#include "iquery_sys_event_callback.h" 221401458bSopenharmony_ci#include "iremote_broker.h" 231401458bSopenharmony_ci#include "isys_event_callback.h" 241401458bSopenharmony_ci#include "query_argument.h" 251401458bSopenharmony_ci#include "sys_event_query_rule.h" 261401458bSopenharmony_ci#include "sys_event_rule.h" 271401458bSopenharmony_ci 281401458bSopenharmony_cinamespace OHOS { 291401458bSopenharmony_cinamespace HiviewDFX { 301401458bSopenharmony_ciclass ISysEventService : public IRemoteBroker { 311401458bSopenharmony_cipublic: 321401458bSopenharmony_ci virtual int32_t AddListener(const std::vector<SysEventRule>& rules, 331401458bSopenharmony_ci const sptr<ISysEventCallback>& callback) = 0; 341401458bSopenharmony_ci virtual int32_t RemoveListener(const sptr<ISysEventCallback>& callback) = 0; 351401458bSopenharmony_ci virtual int32_t Query(const QueryArgument& queryArgument, const std::vector<SysEventQueryRule>& rules, 361401458bSopenharmony_ci const sptr<IQuerySysEventCallback>& callback) = 0; 371401458bSopenharmony_ci virtual int32_t SetDebugMode(const sptr<ISysEventCallback>& callback, bool mode) = 0; 381401458bSopenharmony_ci virtual int64_t AddSubscriber(const std::vector<SysEventQueryRule> &rules) = 0; 391401458bSopenharmony_ci virtual int32_t RemoveSubscriber() = 0; 401401458bSopenharmony_ci virtual int64_t Export(const QueryArgument &queryArgument, const std::vector<SysEventQueryRule> &rules) = 0; 411401458bSopenharmony_ci 421401458bSopenharmony_ci enum { 431401458bSopenharmony_ci ADD_SYS_EVENT_LISTENER = 0, 441401458bSopenharmony_ci REMOVE_SYS_EVENT_LISTENER, 451401458bSopenharmony_ci QUERY_SYS_EVENT, 461401458bSopenharmony_ci SET_DEBUG_MODE, 471401458bSopenharmony_ci ADD_SYS_EVENT_SUBSCRIBER, 481401458bSopenharmony_ci REMOVE_SYS_EVENT_SUBSCRIBER, 491401458bSopenharmony_ci EXPORT_SYS_EVENT 501401458bSopenharmony_ci }; 511401458bSopenharmony_ci 521401458bSopenharmony_cipublic: 531401458bSopenharmony_ci DECLARE_INTERFACE_DESCRIPTOR(u"ohos.hiviewdfx.ISysEventService"); 541401458bSopenharmony_ci}; 551401458bSopenharmony_ci} // namespace HiviewDFX 561401458bSopenharmony_ci} // namespace OHOS 571401458bSopenharmony_ci 581401458bSopenharmony_ci#endif // OHOS_HIVIEWDFX_ISYS_EVENT_SERVICE_H 59