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_EVENT_TRANSMISSION_H
17 #define OHOS_EVENT_TRANSMISSION_H
18 
19 #include <cstdint>
20 #include "accessibility_event_info.h"
21 #include "key_event.h"
22 #include "pointer_event.h"
23 #include "refbase.h"
24 
25 namespace OHOS {
26 namespace Accessibility {
27 class EventTransmission : public RefBase {
28 public:
EventTransmission()29     EventTransmission() {};
~EventTransmission()30     virtual ~EventTransmission() {};
31     virtual bool OnKeyEvent(MMI::KeyEvent &event);
32     virtual bool OnPointerEvent(MMI::PointerEvent &event);
33     virtual void OnMoveMouse(int32_t offsetX, int32_t offsetY);
34     void SetNext(const sptr<EventTransmission> &next);
35     sptr<EventTransmission> GetNext();
36     virtual void DestroyEvents();
37 private:
38     sptr<EventTransmission> next_ = nullptr;
39 };
40 } // namespace Accessibility
41 } // namespace OHOS
42 #endif // OHOS_EVENT_TRANSMISSION_H