• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-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 MULTIMODAL_INPUT_CONNECT_PROXY_H
17 #define MULTIMODAL_INPUT_CONNECT_PROXY_H
18 
19 #include "iremote_object.h"
20 #include "iremote_proxy.h"
21 #include "nocopyable.h"
22 #include "system_ability.h"
23 
24 #include "i_multimodal_input_connect.h"
25 
26 namespace OHOS {
27 namespace MMI {
28 class MultimodalInputConnectProxy final : public IRemoteProxy<IMultimodalInputConnect> {
29 public:
30     explicit MultimodalInputConnectProxy(const sptr<IRemoteObject> &impl);
31     DISALLOW_COPY_AND_MOVE(MultimodalInputConnectProxy);
32     virtual ~MultimodalInputConnectProxy() override;
33     virtual int32_t AllocSocketFd(const std::string &programName, const int32_t moduleType,
34         int32_t &socketFd, int32_t &tokenType) override;
35     virtual int32_t AddInputEventFilter(sptr<IEventFilter> filter) override;
36     virtual int32_t SetPointerVisible(bool visible) override;
37     virtual int32_t IsPointerVisible(bool &visible) override;
38     virtual int32_t SetPointerSpeed(int32_t speed) override;
39     virtual int32_t GetPointerSpeed(int32_t &speed) override;
40     virtual int32_t SetPointerStyle(int32_t windowId, int32_t pointerStyle) override;
41     virtual int32_t GetPointerStyle(int32_t windowId, int32_t &pointerStyle) override;
42     virtual int32_t SupportKeys(int32_t userData, int32_t deviceId, std::vector<int32_t> &keys) override;
43     virtual int32_t GetDeviceIds(int32_t userData) override;
44     virtual int32_t GetDevice(int32_t userData, int32_t deviceId) override;
45     virtual int32_t RegisterDevListener() override;
46     virtual int32_t UnregisterDevListener() override;
47     virtual int32_t GetKeyboardType(int32_t userData, int32_t deviceId) override;
48     virtual int32_t AddInputHandler(InputHandlerType handlerType, HandleEventType eventType) override;
49     virtual int32_t RemoveInputHandler(InputHandlerType handlerType, HandleEventType eventType) override;
50     virtual int32_t MarkEventConsumed(int32_t eventId) override;
51     virtual int32_t MoveMouseEvent(int32_t offsetX, int32_t offsetY) override;
52     virtual int32_t InjectKeyEvent(const std::shared_ptr<KeyEvent> keyEvent) override;
53     virtual int32_t SubscribeKeyEvent(int32_t subscribeId, const std::shared_ptr<KeyOption> option) override;
54     virtual int32_t UnsubscribeKeyEvent(int32_t subscribeId) override;
55     virtual int32_t InjectPointerEvent(const std::shared_ptr<PointerEvent> pointerEvent) override;
56     virtual int32_t SetAnrObserver() override;
57     virtual int32_t RegisterCooperateListener() override;
58     virtual int32_t UnregisterCooperateListener() override;
59     virtual int32_t EnableInputDeviceCooperate(int32_t userData, bool enabled) override;
60     virtual int32_t StartInputDeviceCooperate(int32_t userData, const std::string &sinkDeviceId,
61         int32_t srcInputDeviceId) override;
62     virtual int32_t StopDeviceCooperate(int32_t userData) override;
63     virtual int32_t GetInputDeviceCooperateState(int32_t userData, const std::string &deviceId) override;
64     virtual int32_t SetInputDevice(const std::string& dhid, const std::string& screenId) override;
65     virtual int32_t GetFunctionKeyState(int32_t funcKey, bool &state) override;
66     virtual int32_t SetFunctionKeyState(int32_t funcKey, bool enable) override;
67 
68 private:
69     static inline BrokerDelegator<MultimodalInputConnectProxy> delegator_;
70 };
71 } // namespace MMI
72 } // namespace OHOS
73 #endif // MULTIMODAL_INPUT_CONNECT_PROXY_H
74