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_HDI_INPUT_V1_0_IINPUTCALLBACK_H
17#define OHOS_HDI_INPUT_V1_0_IINPUTCALLBACK_H
18
19#include <stdint.h>
20#include <vector>
21#include <hdf_base.h>
22#include <hdi_base.h>
23#include "input/v1_0/input_types.h"
24
25namespace OHOS {
26namespace HDI {
27namespace Input {
28namespace V1_0 {
29using namespace OHOS;
30using namespace OHOS::HDI;
31
32class IInputCallback : public HdiBase {
33public:
34    DECLARE_HDI_DESCRIPTOR(u"ohos.hdi.input.v1_0.IInputCallback");
35
36    virtual ~IInputCallback() = default;
37
38    virtual int32_t EventPkgCallback(const std::vector<OHOS::HDI::Input::V1_0::EventPackage>& pkgs,
39         uint32_t devIndex) = 0;
40
41    virtual int32_t HotPlugCallback(const OHOS::HDI::Input::V1_0::HotPlugEvent& event) = 0;
42
43    virtual int32_t GetVersion(uint32_t& majorVer, uint32_t& minorVer)
44    {
45        majorVer = 1;
46        minorVer = 0;
47        return HDF_SUCCESS;
48    }
49
50    virtual bool IsProxy()
51    {
52        return false;
53    }
54
55    virtual const std::u16string GetDesc()
56    {
57        return metaDescriptor_;
58    }
59};
60} // V1_0
61} // Input
62} // HDI
63} // OHOS
64
65#endif // OHOS_HDI_INPUT_V1_0_IINPUTCALLBACK_H
66
67