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 INPUT_CHECK_PARAM_H
17 #define INPUT_CHECK_PARAM_H
18 
19 #include <iremote_broker.h>
20 
21 #include "idistributed_hardware_source.h"
22 
23 namespace OHOS {
24 namespace DistributedHardware {
25 namespace DistributedInput {
26 class DInputCheckParam {
27 public:
28     static DInputCheckParam &GetInstance(void);
29     bool CheckParam(const std::string &deviceId, sptr<IRemoteBroker> callback);
30     bool CheckParam(const std::string &deviceId, const uint32_t &inputTypes, sptr<IRemoteBroker> callback);
31     bool CheckParam(const std::string &srcId, const std::string &sinkId, const uint32_t &inputTypes,
32         sptr<IRemoteBroker> callback);
33     bool CheckParam(const std::string &srcId, const std::string &sinkId, sptr<IRemoteBroker> callback);
34     bool CheckParam(const std::string &sinkId, const std::vector<std::string> &dhIds,
35         sptr<IRemoteBroker> callback);
36     bool CheckParam(const std::string &srcId, const std::string &sinkId, const std::vector<std::string> &dhIds,
37         sptr<IRemoteBroker> callback);
38     bool CheckRegisterParam(const std::string &devId, const std::string &dhId,
39         const std::string &parameters, const std::shared_ptr<RegisterCallback> &callback);
40     bool CheckUnregisterParam(const std::string &devId, const std::string &dhId,
41         const std::shared_ptr<UnregisterCallback> &callback);
42 
43 private:
44     DInputCheckParam() = default;
45     ~DInputCheckParam() = default;
46 };
47 
48 } // namespace DistributedInput
49 } // namespace DistributedHardware
50 } // namespace OHOS
51 
52 #endif // INPUT_CHECK_PARAM_H