• 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 
16 #ifndef OHOS_DISTRIBUTED_INPUT_SOURCE_TRANS_H
17 #define OHOS_DISTRIBUTED_INPUT_SOURCE_TRANS_H
18 
19 #include <string>
20 
21 namespace OHOS {
22 namespace DistributedHardware {
23 namespace DistributedInput {
24 class DInputSourceTransCallback {
25 public:
26     virtual void OnResponseRegisterDistributedHardware(const std::string deviceId, const std::string dhId,
27         bool result) = 0;
28     virtual void OnResponsePrepareRemoteInput(const std::string deviceId, bool result, const std::string &object) = 0;
29     virtual void OnResponseUnprepareRemoteInput(const std::string deviceId, bool result) = 0;
30     virtual void OnResponseStartRemoteInput(const std::string deviceId, const uint32_t inputTypes, bool result) = 0;
31     virtual void OnResponseStopRemoteInput(const std::string deviceId, const uint32_t inputTypes, bool result) = 0;
32     virtual void OnResponseStartRemoteInputDhid(const std::string deviceId, const std::string &dhids, bool result) = 0;
33     virtual void OnResponseStopRemoteInputDhid(const std::string deviceId, const std::string &dhids, bool result) = 0;
34     virtual void OnResponseKeyState(const std::string deviceId, const std::string &dhid, const uint32_t type,
35         const uint32_t code, const uint32_t value) = 0;
36     virtual void OnReceivedEventRemoteInput(const std::string deviceId, const std::string &object) = 0;
37 
38     virtual void OnResponseRelayPrepareRemoteInput(int32_t sessionId, const std::string &deviceId, bool result,
39         const std::string &object) = 0;
40     virtual void OnResponseRelayUnprepareRemoteInput(int32_t sessionId, const std::string &deviceId, bool result) = 0;
41 
42     virtual void OnReceiveRelayPrepareResult(int32_t status, const std::string &srcId, const std::string &sinkId) = 0;
43     virtual void OnReceiveRelayUnprepareResult(int32_t status, const std::string &srcId, const std::string &sinkId) = 0;
44     virtual void OnReceiveRelayStartDhidResult(int32_t status, const std::string &srcId, const std::string &sinkId,
45         const std::string &dhids) = 0;
46     virtual void OnReceiveRelayStopDhidResult(int32_t status, const std::string &srcId, const std::string &sinkId,
47         const std::string &dhids) = 0;
48     virtual void OnReceiveRelayStartTypeResult(int32_t status, const std::string &srcId, const std::string &sinkId,
49         uint32_t inputTypes) = 0;
50     virtual void OnReceiveRelayStopTypeResult(int32_t status, const std::string &srcId, const std::string &sinkId,
51         uint32_t inputTypes) = 0;
52 };
53 } // namespace DistributedInput
54 } // namespace DistributedHardware
55 } // namespace OHOS
56 
57 #endif // OHOS_DISTRIBUTED_INPUT_SOURCE_TRANS_H
58