• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef INPUT_HOST_CALLBACK_PROXY_H
16 #define INPUT_HOST_CALLBACK_PROXY_H
17 
18 #include <hdf_log.h>
19 #include <iremote_proxy.h>
20 #include "iinput_host_callbck.h"
21 
22 namespace OHOS {
23 namespace Input {
24 class InputCallbackProxy : public IRemoteProxy<InputReportEventCb> {
25 public:
InputCallbackProxy(const sptr<IRemoteObject> & impl)26     explicit InputCallbackProxy(const sptr<IRemoteObject> &impl) : IRemoteProxy<InputReportEventCb>(impl) {}
27     virtual ~InputCallbackProxy() = default;
28     virtual void ReportEventPkgCallback(const EventPackage *pkgs, uint32_t count, uint32_t devIndex);
29 
30 private:
31     static constexpr int32_t CMD_INPUT_CALLBACK_REMOTE_REPROT_EVENT_PROXY = 100;
32     static inline BrokerDelegator<InputCallbackProxy> delegator_;
33 };
34 
35 class InputHotCallbackProxy : public IRemoteProxy<InputReportHostCb> {
36 public:
InputHotCallbackProxy(const sptr<IRemoteObject> & impl)37     explicit InputHotCallbackProxy(const sptr<IRemoteObject> &impl) : IRemoteProxy<InputReportHostCb>(impl) {}
38     virtual ~InputHotCallbackProxy() = default;
39     virtual void ReportHotPlugEventCallback(const HotPlugEvent *event);
40 
41 private:
42     static constexpr int32_t CMD_INPUT_CALLBACK_REMOTE_REPROT_HOT_PLUG_EVENT_PROXY = 101;
43     static inline BrokerDelegator<InputHotCallbackProxy> delegator_;
44 };
45 }  // namespace Input
46 }  // namespace OHOS
47 
48 #endif // INPUT_HOST_CALLBACK_PROXY_H
49