From 184c49f2121e46d92d2d2a04e0fddf90f18a5b67 Mon Sep 17 00:00:00 2001 From: xxxx Date: Tue, 17 May 2022 16:40:25 +0800 Subject: [PATCH] Description: add dinput Match-id-c4186b954aea5487e5d04d2af28d43dce7c496e6 --- .../add_white_list_infos_call_back_proxy.h | 41 +++++ .../add_white_list_infos_call_back_stub.h | 40 +++++ .../del_white_list_infos_call_back_proxy.h | 41 +++++ .../del_white_list_infos_call_back_stub.h | 40 +++++ .../ipc/include/distributed_input_client.h | 150 ++++++++++++++++++ .../include/distributed_input_sink_proxy.h | 49 ++++++ .../ipc/include/distributed_input_sink_stub.h | 41 +++++ .../include/distributed_input_source_proxy.h | 67 ++++++++ .../include/distributed_input_source_stub.h | 48 ++++++ .../include/prepare_d_input_call_back_proxy.h | 41 +++++ .../include/prepare_d_input_call_back_stub.h | 40 +++++ .../register_d_input_call_back_proxy.h | 41 +++++ .../include/register_d_input_call_back_stub.h | 40 +++++ .../include/start_d_input_call_back_proxy.h | 41 +++++ .../include/start_d_input_call_back_stub.h | 40 +++++ .../start_d_input_server_call_back_proxy.h | 41 +++++ .../start_d_input_server_call_back_stub.h | 40 +++++ .../include/stop_d_input_call_back_proxy.h | 41 +++++ .../ipc/include/stop_d_input_call_back_stub.h | 40 +++++ .../unprepare_d_input_call_back_proxy.h | 41 +++++ .../unprepare_d_input_call_back_stub.h | 40 +++++ .../unregister_d_input_call_back_proxy.h | 41 +++++ .../unregister_d_input_call_back_stub.h | 40 +++++ 23 files changed, 1084 insertions(+) create mode 100644 interfaces/ipc/include/add_white_list_infos_call_back_proxy.h create mode 100644 interfaces/ipc/include/add_white_list_infos_call_back_stub.h create mode 100644 interfaces/ipc/include/del_white_list_infos_call_back_proxy.h create mode 100644 interfaces/ipc/include/del_white_list_infos_call_back_stub.h create mode 100644 interfaces/ipc/include/distributed_input_client.h create mode 100644 interfaces/ipc/include/distributed_input_sink_proxy.h create mode 100644 interfaces/ipc/include/distributed_input_sink_stub.h create mode 100644 interfaces/ipc/include/distributed_input_source_proxy.h create mode 100644 interfaces/ipc/include/distributed_input_source_stub.h create mode 100644 interfaces/ipc/include/prepare_d_input_call_back_proxy.h create mode 100644 interfaces/ipc/include/prepare_d_input_call_back_stub.h create mode 100644 interfaces/ipc/include/register_d_input_call_back_proxy.h create mode 100644 interfaces/ipc/include/register_d_input_call_back_stub.h create mode 100644 interfaces/ipc/include/start_d_input_call_back_proxy.h create mode 100644 interfaces/ipc/include/start_d_input_call_back_stub.h create mode 100644 interfaces/ipc/include/start_d_input_server_call_back_proxy.h create mode 100644 interfaces/ipc/include/start_d_input_server_call_back_stub.h create mode 100644 interfaces/ipc/include/stop_d_input_call_back_proxy.h create mode 100644 interfaces/ipc/include/stop_d_input_call_back_stub.h create mode 100644 interfaces/ipc/include/unprepare_d_input_call_back_proxy.h create mode 100644 interfaces/ipc/include/unprepare_d_input_call_back_stub.h create mode 100644 interfaces/ipc/include/unregister_d_input_call_back_proxy.h create mode 100644 interfaces/ipc/include/unregister_d_input_call_back_stub.h diff --git a/interfaces/ipc/include/add_white_list_infos_call_back_proxy.h b/interfaces/ipc/include/add_white_list_infos_call_back_proxy.h new file mode 100644 index 0000000..e6d6725 --- /dev/null +++ b/interfaces/ipc/include/add_white_list_infos_call_back_proxy.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ADD_WHITE_LIST_INFOS_CALL_BACK_PROXY_H +#define ADD_WHITE_LIST_INFOS_CALL_BACK_PROXY_H + +#include +#include "i_add_white_list_infos_call_back.h" +#include "iremote_proxy.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class AddWhiteListInfosCallbackProxy : public IRemoteProxy { +public: + explicit AddWhiteListInfosCallbackProxy(const sptr &object); + + virtual ~AddWhiteListInfosCallbackProxy() override; + + virtual void OnResult(const std::string& deviceId, const std::string& strJson) override; + +private: + static inline BrokerDelegator g_delegator; +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // ADD_WHITE_LIST_INFOS_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/add_white_list_infos_call_back_stub.h b/interfaces/ipc/include/add_white_list_infos_call_back_stub.h new file mode 100644 index 0000000..b50e554 --- /dev/null +++ b/interfaces/ipc/include/add_white_list_infos_call_back_stub.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ADD_WHITE_LIST_INFOS_CALL_BACK_STUB_H +#define ADD_WHITE_LIST_INFOS_CALL_BACK_STUB_H + +#include +#include "i_add_white_list_infos_call_back.h" +#include "iremote_stub.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class AddWhiteListInfosCallbackStub : public IRemoteStub { +public: + AddWhiteListInfosCallbackStub(); + virtual ~AddWhiteListInfosCallbackStub() override; + + int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; + +private: + DISALLOW_COPY_AND_MOVE(AddWhiteListInfosCallbackStub); +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // ADD_WHITE_LIST_INFOS_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/del_white_list_infos_call_back_proxy.h b/interfaces/ipc/include/del_white_list_infos_call_back_proxy.h new file mode 100644 index 0000000..fbbc75d --- /dev/null +++ b/interfaces/ipc/include/del_white_list_infos_call_back_proxy.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef DEL_WHITE_LIST_INFOS_CALL_BACK_PROXY_H +#define DEL_WHITE_LIST_INFOS_CALL_BACK_PROXY_H + +#include +#include "i_del_white_list_infos_call_back.h" +#include "iremote_proxy.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class DelWhiteListInfosCallbackProxy : public IRemoteProxy { +public: + explicit DelWhiteListInfosCallbackProxy(const sptr &object); + + virtual ~DelWhiteListInfosCallbackProxy() override; + + virtual void OnResult(const std::string& deviceId) override; + +private: + static inline BrokerDelegator g_delegator; +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // ADD_WHITE_LIST_INFOS_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/del_white_list_infos_call_back_stub.h b/interfaces/ipc/include/del_white_list_infos_call_back_stub.h new file mode 100644 index 0000000..dd6dc63 --- /dev/null +++ b/interfaces/ipc/include/del_white_list_infos_call_back_stub.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef DEL_WHITE_LIST_INFOS_CALL_BACK_STUB_H +#define DEL_WHITE_LIST_INFOS_CALL_BACK_STUB_H + +#include +#include "i_del_white_list_infos_call_back.h" +#include "iremote_stub.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class DelWhiteListInfosCallbackStub : public IRemoteStub { +public: + DelWhiteListInfosCallbackStub(); + virtual ~DelWhiteListInfosCallbackStub() override; + + int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; + +private: + DISALLOW_COPY_AND_MOVE(DelWhiteListInfosCallbackStub); +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // ADD_WHITE_LIST_INFOS_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/distributed_input_client.h b/interfaces/ipc/include/distributed_input_client.h new file mode 100644 index 0000000..e2c0aaf --- /dev/null +++ b/interfaces/ipc/include/distributed_input_client.h @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef DISTRIBUTED_INPUT_CLIENT_H +#define DISTRIBUTED_INPUT_CLIENT_H + +#include +#include +#include + +#include "i_distributed_source_input.h" +#include "i_distributed_sink_input.h" +#include "register_d_input_call_back_stub.h" +#include "unregister_d_input_call_back_stub.h" +#include "start_d_input_server_call_back_stub.h" +#include "add_white_list_infos_call_back_stub.h" +#include "del_white_list_infos_call_back_stub.h" + +#include "idistributed_hardware_source.h" +#include "idistributed_hardware_sink.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class DistributedInputClient { +public: + static DistributedInputClient &GetInstance(); + + int32_t InitSource(); + + int32_t ReleaseSource(); + + int32_t InitSink(); + + int32_t ReleaseSink(); + + int32_t RegisterDistributedHardware(const std::string& devId, const std::string& dhId, + const std::string& parameters, const std::shared_ptr& callback); + + int32_t UnregisterDistributedHardware(const std::string& devId, const std::string& dhId, + const std::shared_ptr& callback); + + int32_t PrepareRemoteInput(const std::string& deviceId, sptr callback); + + int32_t UnprepareRemoteInput(const std::string& deviceId, sptr callback); + + int32_t StartRemoteInput( + const std::string& deviceId, const uint32_t& inputTypes, sptr callback); + + int32_t StopRemoteInput( + const std::string& deviceId, const uint32_t& inputTypes, sptr callback); + + bool IsNeedFilterOut(const std::string &deviceId, const BusinessEvent &event); + + DInputServerType IsStartDistributedInput(const uint32_t& inputType); + +public: + + class RegisterDInputCb : public OHOS::DistributedHardware::DistributedInput::RegisterDInputCallbackStub { + public: + RegisterDInputCb() = default; + virtual ~RegisterDInputCb() = default; + void OnResult(const std::string& devId, const std::string& dhId, const int32_t& status); + }; + + class UnregisterDInputCb : public OHOS::DistributedHardware::DistributedInput::UnregisterDInputCallbackStub { + public: + UnregisterDInputCb() = default; + virtual ~UnregisterDInputCb() = default; + void OnResult(const std::string& devId, const std::string& dhId, const int32_t& status); + }; + + class StartDInputServerCb : public OHOS::DistributedHardware::DistributedInput::StartDInputServerCallbackStub { + public: + StartDInputServerCb() = default; + virtual ~StartDInputServerCb() = default; + void OnResult(const int32_t& status, const uint32_t& inputTypes); + }; + + class AddWhiteListInfosCb : public OHOS::DistributedHardware::DistributedInput::AddWhiteListInfosCallbackStub { + public: + AddWhiteListInfosCb() = default; + virtual ~AddWhiteListInfosCb() = default; + void OnResult(const std::string &deviceId, const std::string &strJson); + }; + + class DelWhiteListInfosCb : public OHOS::DistributedHardware::DistributedInput::DelWhiteListInfosCallbackStub { + public: + DelWhiteListInfosCb() = default; + virtual ~DelWhiteListInfosCb() = default; + void OnResult(const std::string &deviceId); + }; + +private: + bool GetDInputSourceProxy(); + bool GetDInputSinkProxy(); + bool IsJsonData(std::string strData) const; + void AddWhiteListInfos(const std::string &deviceId, const std::string &strJson) const; + void DelWhiteListInfos(const std::string &deviceId) const; + +private: + std::mutex mutex_; + sptr dInputSourceProxy_ = nullptr; + sptr dInputSinkProxy_ = nullptr; + + bool m_bIsAlreadyInitWhiteList = false; + const std::string localDevId_ = "localNodeDevice"; + + DInputServerType serverType = DInputServerType::NULL_SERVER_TYPE; + uint32_t inputTypes = INPUT_TYPE_NULL; + + sptr callbackRegister = nullptr; + sptr callbackUnregister = nullptr; + sptr sinkTypeCallback = nullptr; + sptr sourceTypeCallback = nullptr; + sptr addWhiteListCallback = nullptr; + sptr delWhiteListCallback = nullptr; + + struct DHardWareFwkRegistInfo { + std::string devId; + std::string dhId; + std::shared_ptr callback = nullptr; + }; + + struct DHardWareFwkUnRegistInfo { + std::string devId; + std::string dhId; + std::shared_ptr callback = nullptr; + }; + + std::vector dHardWareFwkRstInfos; + std::vector dHardWareFwkUnRstInfos; +}; +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // DISTRIBUTED_INPUT_CLIENT_H diff --git a/interfaces/ipc/include/distributed_input_sink_proxy.h b/interfaces/ipc/include/distributed_input_sink_proxy.h new file mode 100644 index 0000000..4294e54 --- /dev/null +++ b/interfaces/ipc/include/distributed_input_sink_proxy.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef DISTRIBUTED_INPUT_SINK_PROXY_H +#define DISTRIBUTED_INPUT_SINK_PROXY_H + +#include +#include "i_distributed_sink_input.h" +#include "iremote_proxy.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class DistributedInputSinkProxy : public IRemoteProxy { +public: + + explicit DistributedInputSinkProxy(const sptr &object); + + virtual ~DistributedInputSinkProxy() override; + + virtual int32_t Init() override; + + virtual int32_t Release() override; + + virtual int32_t IsStartDistributedInput( + const uint32_t& inputType, sptr callback) override; + +private: + bool SendRequest(IDistributedSinkInput::MessageCode code, MessageParcel &data, MessageParcel &reply); + + static inline BrokerDelegator g_delegator; +}; +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // DISTRIBUTED_INPUT_PROXY_H diff --git a/interfaces/ipc/include/distributed_input_sink_stub.h b/interfaces/ipc/include/distributed_input_sink_stub.h new file mode 100644 index 0000000..916087e --- /dev/null +++ b/interfaces/ipc/include/distributed_input_sink_stub.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef DISRIBUTED_INPUT_SINK_STUB_H +#define DISRIBUTED_INPUT_SINK_STUB_H + +#include +#include "i_distributed_sink_input.h" +#include "iremote_stub.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class DistributedInputSinkStub : public IRemoteStub { +public: + DistributedInputSinkStub(); + virtual ~DistributedInputSinkStub() override; + + virtual int32_t OnRemoteRequest( + uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; + +private: + DISALLOW_COPY_AND_MOVE(DistributedInputSinkStub); +}; +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // DISRIBUTED_INPUT_STUB_H \ No newline at end of file diff --git a/interfaces/ipc/include/distributed_input_source_proxy.h b/interfaces/ipc/include/distributed_input_source_proxy.h new file mode 100644 index 0000000..bfc9767 --- /dev/null +++ b/interfaces/ipc/include/distributed_input_source_proxy.h @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef DISTRIBUTED_INPUT_SOURCE_PROXY_H +#define DISTRIBUTED_INPUT_SOURCE_PROXY_H + +#include +#include "i_distributed_source_input.h" +#include "iremote_proxy.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class DistributedInputSourceProxy : public IRemoteProxy { +public: + + explicit DistributedInputSourceProxy(const sptr &object); + + virtual ~DistributedInputSourceProxy() override; + + virtual int32_t Init() override; + + virtual int32_t Release() override; + + virtual int32_t RegisterDistributedHardware(const std::string& devId, const std::string& dhId, + const std::string& parameters, sptr callback) override; + + virtual int32_t UnregisterDistributedHardware(const std::string& devId, const std::string& dhId, + sptr callback) override; + + virtual int32_t PrepareRemoteInput(const std::string& deviceId, + sptr callback, sptr addWhiteListCallback) override; + + virtual int32_t UnprepareRemoteInput(const std::string& deviceId, + sptr callback, sptr delWhiteListCallback) override; + + virtual int32_t StartRemoteInput( + const std::string& deviceId, const uint32_t& inputTypes, sptr callback) override; + + virtual int32_t StopRemoteInput( + const std::string& deviceId, const uint32_t& inputTypes, sptr callback) override; + + virtual int32_t IsStartDistributedInput( + const uint32_t& inputType, sptr callback) override; + +private: + bool SendRequest(const IDistributedSourceInput::MessageCode code, MessageParcel &data, MessageParcel &reply); + + static inline BrokerDelegator g_delegator; +}; +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // DISTRIBUTED_INPUT_PROXY_H diff --git a/interfaces/ipc/include/distributed_input_source_stub.h b/interfaces/ipc/include/distributed_input_source_stub.h new file mode 100644 index 0000000..f0011be --- /dev/null +++ b/interfaces/ipc/include/distributed_input_source_stub.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef DISRIBUTED_INPUT_SOURCE_STUB_H +#define DISRIBUTED_INPUT_SOURCE_STUB_H + +#include +#include "i_distributed_source_input.h" +#include "iremote_stub.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class DistributedInputSourceStub : public IRemoteStub { +public: + DistributedInputSourceStub(); + virtual ~DistributedInputSourceStub() override; + + virtual int32_t OnRemoteRequest( + uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; + +private: + int32_t HandleRegisterDistributedHardware(MessageParcel &data, MessageParcel &reply); + int32_t HandleUnregisterDistributedHardware(MessageParcel &data, MessageParcel &reply); + int32_t HandlePrepareRemoteInput(MessageParcel &data, MessageParcel &reply); + int32_t HandleUnprepareRemoteInput(MessageParcel &data, MessageParcel &reply); + int32_t HandleStartRemoteInput(MessageParcel &data, MessageParcel &reply); + int32_t HandleStopRemoteInput(MessageParcel &data, MessageParcel &reply); + int32_t HandleIsStartDistributedInput(MessageParcel &data, MessageParcel &reply); + DISALLOW_COPY_AND_MOVE(DistributedInputSourceStub); +}; +} // namespace DistributedInput +} // namespace DistributedHardware +} // namespace OHOS + +#endif // DISRIBUTED_INPUT_STUB_H diff --git a/interfaces/ipc/include/prepare_d_input_call_back_proxy.h b/interfaces/ipc/include/prepare_d_input_call_back_proxy.h new file mode 100644 index 0000000..802430d --- /dev/null +++ b/interfaces/ipc/include/prepare_d_input_call_back_proxy.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef PREPARE_D_INPUT_CALL_BACK_PROXY_H +#define PREPARE_D_INPUT_CALL_BACK_PROXY_H + +#include +#include "i_prepare_d_input_call_back.h" +#include "iremote_proxy.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class PrepareDInputCallbackProxy : public IRemoteProxy { +public: + explicit PrepareDInputCallbackProxy(const sptr &object); + + virtual ~PrepareDInputCallbackProxy() override; + + virtual void OnResult(const std::string& deviceId, const int32_t& status) override; + +private: + static inline BrokerDelegator g_delegator; +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // PREPARE_D_INPUT_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/prepare_d_input_call_back_stub.h b/interfaces/ipc/include/prepare_d_input_call_back_stub.h new file mode 100644 index 0000000..a35892b --- /dev/null +++ b/interfaces/ipc/include/prepare_d_input_call_back_stub.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef PREPARE_D_INPUT_CALL_BACK_STUB_H +#define PREPARE_D_INPUT_CALL_BACK_STUB_H + +#include +#include "i_prepare_d_input_call_back.h" +#include "iremote_stub.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class PrepareDInputCallbackStub : public IRemoteStub { +public: + PrepareDInputCallbackStub(); + virtual ~PrepareDInputCallbackStub() override; + + int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; + +private: + DISALLOW_COPY_AND_MOVE(PrepareDInputCallbackStub); +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // PREPARE_D_INPUT_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/register_d_input_call_back_proxy.h b/interfaces/ipc/include/register_d_input_call_back_proxy.h new file mode 100644 index 0000000..d919b48 --- /dev/null +++ b/interfaces/ipc/include/register_d_input_call_back_proxy.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef REGIST_D_INPUT_CALL_BACK_PROXY_H +#define REGIST_D_INPUT_CALL_BACK_PROXY_H + +#include +#include "i_register_d_input_call_back.h" +#include "iremote_proxy.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class RegisterDInputCallbackProxy : public IRemoteProxy { +public: + explicit RegisterDInputCallbackProxy(const sptr &object); + + virtual ~RegisterDInputCallbackProxy() override; + + virtual void OnResult(const std::string& devId, const std::string& dhId, const int32_t& status) override; + +private: + static inline BrokerDelegator g_delegator; +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // REGIST_D_INPUT_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/register_d_input_call_back_stub.h b/interfaces/ipc/include/register_d_input_call_back_stub.h new file mode 100644 index 0000000..d68f570 --- /dev/null +++ b/interfaces/ipc/include/register_d_input_call_back_stub.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef REGIST_D_INPUT_CALL_BACK_STUB_H +#define REGIST_D_INPUT_CALL_BACK_STUB_H + +#include +#include "iremote_stub.h" +#include "i_register_d_input_call_back.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class RegisterDInputCallbackStub : public IRemoteStub { +public: + RegisterDInputCallbackStub(); + virtual ~RegisterDInputCallbackStub() override; + + int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; + +private: + DISALLOW_COPY_AND_MOVE(RegisterDInputCallbackStub); +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // REGIST_D_INPUT_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/start_d_input_call_back_proxy.h b/interfaces/ipc/include/start_d_input_call_back_proxy.h new file mode 100644 index 0000000..a7d34f2 --- /dev/null +++ b/interfaces/ipc/include/start_d_input_call_back_proxy.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef START_D_INPUT_CALL_BACK_PROXY_H +#define START_D_INPUT_CALL_BACK_PROXY_H + +#include +#include "i_start_d_input_call_back.h" +#include "iremote_proxy.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class StartDInputCallbackProxy : public IRemoteProxy { +public: + explicit StartDInputCallbackProxy(const sptr &object); + + virtual ~StartDInputCallbackProxy() override; + + virtual void OnResult(const std::string& devId, const uint32_t& inputTypes, const int32_t& status) override; + +private: + static inline BrokerDelegator g_delegator; +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // START_D_INPUT_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/start_d_input_call_back_stub.h b/interfaces/ipc/include/start_d_input_call_back_stub.h new file mode 100644 index 0000000..38bc044 --- /dev/null +++ b/interfaces/ipc/include/start_d_input_call_back_stub.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef START_D_INPUT_CALL_BACK_STUB_H +#define START_D_INPUT_CALL_BACK_STUB_H + +#include +#include "i_start_d_input_call_back.h" +#include "iremote_stub.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class StartDInputCallbackStub : public IRemoteStub { +public: + StartDInputCallbackStub(); + virtual ~StartDInputCallbackStub() override; + + int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; + +private: + DISALLOW_COPY_AND_MOVE(StartDInputCallbackStub); +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // START_D_INPUT_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/start_d_input_server_call_back_proxy.h b/interfaces/ipc/include/start_d_input_server_call_back_proxy.h new file mode 100644 index 0000000..d4ea040 --- /dev/null +++ b/interfaces/ipc/include/start_d_input_server_call_back_proxy.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef START_D_INPUT_SERVER_CALL_BACK_PROXY_H +#define START_D_INPUT_SERVER_CALL_BACK_PROXY_H + +#include +#include "i_start_d_input_server_call_back.h" +#include "iremote_proxy.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class StartDInputServerCallbackProxy : public IRemoteProxy { +public: + explicit StartDInputServerCallbackProxy(const sptr &object); + + virtual ~StartDInputServerCallbackProxy() override; + + virtual void OnResult(const int32_t& status, const uint32_t& inputTypes) override; + +private: + static inline BrokerDelegator g_delegator; +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // START_D_INPUT_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/start_d_input_server_call_back_stub.h b/interfaces/ipc/include/start_d_input_server_call_back_stub.h new file mode 100644 index 0000000..a528dda --- /dev/null +++ b/interfaces/ipc/include/start_d_input_server_call_back_stub.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef START_D_INPUT_SERVER_CALL_BACK_STUB_H +#define START_D_INPUT_SERVER_CALL_BACK_STUB_H + +#include +#include "iremote_stub.h" +#include "i_start_d_input_server_call_back.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class StartDInputServerCallbackStub : public IRemoteStub { +public: + StartDInputServerCallbackStub(); + virtual ~StartDInputServerCallbackStub() override; + + int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; + +private: + DISALLOW_COPY_AND_MOVE(StartDInputServerCallbackStub); +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // START_D_INPUT_SERVER_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/stop_d_input_call_back_proxy.h b/interfaces/ipc/include/stop_d_input_call_back_proxy.h new file mode 100644 index 0000000..51e59e4 --- /dev/null +++ b/interfaces/ipc/include/stop_d_input_call_back_proxy.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef STOP_D_INPUT_CALL_BACK_PROXY_H +#define STOP_D_INPUT_CALL_BACK_PROXY_H + +#include +#include "i_stop_d_input_call_back.h" +#include "iremote_proxy.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class StopDInputCallbackProxy : public IRemoteProxy { +public: + explicit StopDInputCallbackProxy(const sptr &object); + + virtual ~StopDInputCallbackProxy() override; + + virtual void OnResult(const std::string& devId, const uint32_t& inputTypes, const int32_t& status) override; + +private: + static inline BrokerDelegator g_delegator; +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // STOP_D_INPUT_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/stop_d_input_call_back_stub.h b/interfaces/ipc/include/stop_d_input_call_back_stub.h new file mode 100644 index 0000000..de8ed7f --- /dev/null +++ b/interfaces/ipc/include/stop_d_input_call_back_stub.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef STOP_D_INPUT_CALL_BACK_STUB_H +#define STOP_D_INPUT_CALL_BACK_STUB_H + +#include +#include "i_stop_d_input_call_back.h" +#include "iremote_stub.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class StopDInputCallbackStub : public IRemoteStub { +public: + StopDInputCallbackStub(); + virtual ~StopDInputCallbackStub() override; + + int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; + +private: + DISALLOW_COPY_AND_MOVE(StopDInputCallbackStub); +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // STOP_D_INPUT_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/unprepare_d_input_call_back_proxy.h b/interfaces/ipc/include/unprepare_d_input_call_back_proxy.h new file mode 100644 index 0000000..04e6fe1 --- /dev/null +++ b/interfaces/ipc/include/unprepare_d_input_call_back_proxy.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef UNPREPARE_D_INPUT_CALL_BACK_PROXY_H +#define UNPREPARE_D_INPUT_CALL_BACK_PROXY_H + +#include +#include "i_unprepare_d_input_call_back.h" +#include "iremote_proxy.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class UnprepareDInputCallbackProxy : public IRemoteProxy { +public: + explicit UnprepareDInputCallbackProxy(const sptr &object); + + virtual ~UnprepareDInputCallbackProxy() override; + + virtual void OnResult(const std::string& deviceId, const int32_t& status) override; + +private: + static inline BrokerDelegator g_delegator; +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // UNPREPARE_D_INPUT_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/unprepare_d_input_call_back_stub.h b/interfaces/ipc/include/unprepare_d_input_call_back_stub.h new file mode 100644 index 0000000..68125d9 --- /dev/null +++ b/interfaces/ipc/include/unprepare_d_input_call_back_stub.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef UNPREPARE_D_INPUT_CALL_BACK_STUB_H +#define UNPREPARE_D_INPUT_CALL_BACK_STUB_H + +#include +#include "iremote_stub.h" +#include "i_unprepare_d_input_call_back.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class UnprepareDInputCallbackStub : public IRemoteStub { +public: + UnprepareDInputCallbackStub(); + virtual ~UnprepareDInputCallbackStub() override; + + int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; + +private: + DISALLOW_COPY_AND_MOVE(UnprepareDInputCallbackStub); +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // UNPREPARE_D_INPUT_CALL_BACK_STUB_H diff --git a/interfaces/ipc/include/unregister_d_input_call_back_proxy.h b/interfaces/ipc/include/unregister_d_input_call_back_proxy.h new file mode 100644 index 0000000..e36ae14 --- /dev/null +++ b/interfaces/ipc/include/unregister_d_input_call_back_proxy.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef UNREGIST_D_INPUT_CALL_BACK_PROXY_H +#define UNREGIST_D_INPUT_CALL_BACK_PROXY_H + +#include +#include "i_unregister_d_input_call_back.h" +#include "iremote_proxy.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class UnregisterDInputCallbackProxy : public IRemoteProxy { +public: + explicit UnregisterDInputCallbackProxy(const sptr &object); + + virtual ~UnregisterDInputCallbackProxy() override; + + virtual void OnResult(const std::string& devId, const std::string& dhId, const int32_t& status) override; + +private: + static inline BrokerDelegator g_delegator; +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // UNREGIST_D_INPUT_CALL_BACK_PROXY_H diff --git a/interfaces/ipc/include/unregister_d_input_call_back_stub.h b/interfaces/ipc/include/unregister_d_input_call_back_stub.h new file mode 100644 index 0000000..b9e38ac --- /dev/null +++ b/interfaces/ipc/include/unregister_d_input_call_back_stub.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef UNREGIST_D_INPUT_CALL_BACK_STUB_H +#define UNREGIST_D_INPUT_CALL_BACK_STUB_H + +#include +#include "i_unregister_d_input_call_back.h" +#include "iremote_stub.h" + +namespace OHOS { +namespace DistributedHardware { +namespace DistributedInput { +class UnregisterDInputCallbackStub : public IRemoteStub { +public: + UnregisterDInputCallbackStub(); + virtual ~UnregisterDInputCallbackStub() override; + + int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; + +private: + DISALLOW_COPY_AND_MOVE(UnregisterDInputCallbackStub); +}; +} // namespace DistributedHardware +} // namespace DistributedInput +} // namespace OHOS + +#endif // UNREGIST_D_INPUT_CALL_BACK_STUB_H