Description: add dinput

Match-id-c4186b954aea5487e5d04d2af28d43dce7c496e6
This commit is contained in:
xxxx
2022-05-17 16:40:25 +08:00
parent 0eb8401b0c
commit 184c49f212
23 changed files with 1084 additions and 0 deletions
@@ -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 <string>
#include "i_add_white_list_infos_call_back.h"
#include "iremote_proxy.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class AddWhiteListInfosCallbackProxy : public IRemoteProxy<IAddWhiteListInfosCallback> {
public:
explicit AddWhiteListInfosCallbackProxy(const sptr<IRemoteObject> &object);
virtual ~AddWhiteListInfosCallbackProxy() override;
virtual void OnResult(const std::string& deviceId, const std::string& strJson) override;
private:
static inline BrokerDelegator<AddWhiteListInfosCallbackProxy> g_delegator;
};
} // namespace DistributedHardware
} // namespace DistributedInput
} // namespace OHOS
#endif // ADD_WHITE_LIST_INFOS_CALL_BACK_PROXY_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 <string>
#include "i_add_white_list_infos_call_back.h"
#include "iremote_stub.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class AddWhiteListInfosCallbackStub : public IRemoteStub<IAddWhiteListInfosCallback> {
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
@@ -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 <string>
#include "i_del_white_list_infos_call_back.h"
#include "iremote_proxy.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class DelWhiteListInfosCallbackProxy : public IRemoteProxy<IDelWhiteListInfosCallback> {
public:
explicit DelWhiteListInfosCallbackProxy(const sptr<IRemoteObject> &object);
virtual ~DelWhiteListInfosCallbackProxy() override;
virtual void OnResult(const std::string& deviceId) override;
private:
static inline BrokerDelegator<DelWhiteListInfosCallbackProxy> g_delegator;
};
} // namespace DistributedHardware
} // namespace DistributedInput
} // namespace OHOS
#endif // ADD_WHITE_LIST_INFOS_CALL_BACK_PROXY_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 <string>
#include "i_del_white_list_infos_call_back.h"
#include "iremote_stub.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class DelWhiteListInfosCallbackStub : public IRemoteStub<IDelWhiteListInfosCallback> {
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
@@ -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 <string>
#include <mutex>
#include <iostream>
#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<RegisterCallback>& callback);
int32_t UnregisterDistributedHardware(const std::string& devId, const std::string& dhId,
const std::shared_ptr<UnregisterCallback>& callback);
int32_t PrepareRemoteInput(const std::string& deviceId, sptr<IPrepareDInputCallback> callback);
int32_t UnprepareRemoteInput(const std::string& deviceId, sptr<IUnprepareDInputCallback> callback);
int32_t StartRemoteInput(
const std::string& deviceId, const uint32_t& inputTypes, sptr<IStartDInputCallback> callback);
int32_t StopRemoteInput(
const std::string& deviceId, const uint32_t& inputTypes, sptr<IStopDInputCallback> 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<IDistributedSourceInput> dInputSourceProxy_ = nullptr;
sptr<IDistributedSinkInput> dInputSinkProxy_ = nullptr;
bool m_bIsAlreadyInitWhiteList = false;
const std::string localDevId_ = "localNodeDevice";
DInputServerType serverType = DInputServerType::NULL_SERVER_TYPE;
uint32_t inputTypes = INPUT_TYPE_NULL;
sptr<RegisterDInputCb> callbackRegister = nullptr;
sptr<UnregisterDInputCb> callbackUnregister = nullptr;
sptr<StartDInputServerCb> sinkTypeCallback = nullptr;
sptr<StartDInputServerCb> sourceTypeCallback = nullptr;
sptr<AddWhiteListInfosCb> addWhiteListCallback = nullptr;
sptr<DelWhiteListInfosCb> delWhiteListCallback = nullptr;
struct DHardWareFwkRegistInfo {
std::string devId;
std::string dhId;
std::shared_ptr<RegisterCallback> callback = nullptr;
};
struct DHardWareFwkUnRegistInfo {
std::string devId;
std::string dhId;
std::shared_ptr<UnregisterCallback> callback = nullptr;
};
std::vector<DHardWareFwkRegistInfo> dHardWareFwkRstInfos;
std::vector<DHardWareFwkUnRegistInfo> dHardWareFwkUnRstInfos;
};
} // namespace DistributedInput
} // namespace DistributedHardware
} // namespace OHOS
#endif // DISTRIBUTED_INPUT_CLIENT_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 <iostream>
#include "i_distributed_sink_input.h"
#include "iremote_proxy.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class DistributedInputSinkProxy : public IRemoteProxy<IDistributedSinkInput> {
public:
explicit DistributedInputSinkProxy(const sptr<IRemoteObject> &object);
virtual ~DistributedInputSinkProxy() override;
virtual int32_t Init() override;
virtual int32_t Release() override;
virtual int32_t IsStartDistributedInput(
const uint32_t& inputType, sptr<IStartDInputServerCallback> callback) override;
private:
bool SendRequest(IDistributedSinkInput::MessageCode code, MessageParcel &data, MessageParcel &reply);
static inline BrokerDelegator<DistributedInputSinkProxy> g_delegator;
};
} // namespace DistributedInput
} // namespace DistributedHardware
} // namespace OHOS
#endif // DISTRIBUTED_INPUT_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 DISRIBUTED_INPUT_SINK_STUB_H
#define DISRIBUTED_INPUT_SINK_STUB_H
#include <iostream>
#include "i_distributed_sink_input.h"
#include "iremote_stub.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class DistributedInputSinkStub : public IRemoteStub<IDistributedSinkInput> {
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
@@ -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 <iostream>
#include "i_distributed_source_input.h"
#include "iremote_proxy.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class DistributedInputSourceProxy : public IRemoteProxy<IDistributedSourceInput> {
public:
explicit DistributedInputSourceProxy(const sptr<IRemoteObject> &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<IRegisterDInputCallback> callback) override;
virtual int32_t UnregisterDistributedHardware(const std::string& devId, const std::string& dhId,
sptr<IUnregisterDInputCallback> callback) override;
virtual int32_t PrepareRemoteInput(const std::string& deviceId,
sptr<IPrepareDInputCallback> callback, sptr<IAddWhiteListInfosCallback> addWhiteListCallback) override;
virtual int32_t UnprepareRemoteInput(const std::string& deviceId,
sptr<IUnprepareDInputCallback> callback, sptr<IDelWhiteListInfosCallback> delWhiteListCallback) override;
virtual int32_t StartRemoteInput(
const std::string& deviceId, const uint32_t& inputTypes, sptr<IStartDInputCallback> callback) override;
virtual int32_t StopRemoteInput(
const std::string& deviceId, const uint32_t& inputTypes, sptr<IStopDInputCallback> callback) override;
virtual int32_t IsStartDistributedInput(
const uint32_t& inputType, sptr<IStartDInputServerCallback> callback) override;
private:
bool SendRequest(const IDistributedSourceInput::MessageCode code, MessageParcel &data, MessageParcel &reply);
static inline BrokerDelegator<DistributedInputSourceProxy> g_delegator;
};
} // namespace DistributedInput
} // namespace DistributedHardware
} // namespace OHOS
#endif // DISTRIBUTED_INPUT_PROXY_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 <iostream>
#include "i_distributed_source_input.h"
#include "iremote_stub.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class DistributedInputSourceStub : public IRemoteStub<IDistributedSourceInput> {
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
@@ -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 <string>
#include "i_prepare_d_input_call_back.h"
#include "iremote_proxy.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class PrepareDInputCallbackProxy : public IRemoteProxy<IPrepareDInputCallback> {
public:
explicit PrepareDInputCallbackProxy(const sptr<IRemoteObject> &object);
virtual ~PrepareDInputCallbackProxy() override;
virtual void OnResult(const std::string& deviceId, const int32_t& status) override;
private:
static inline BrokerDelegator<PrepareDInputCallbackProxy> g_delegator;
};
} // namespace DistributedHardware
} // namespace DistributedInput
} // namespace OHOS
#endif // PREPARE_D_INPUT_CALL_BACK_PROXY_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 <string>
#include "i_prepare_d_input_call_back.h"
#include "iremote_stub.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class PrepareDInputCallbackStub : public IRemoteStub<IPrepareDInputCallback> {
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
@@ -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 <string>
#include "i_register_d_input_call_back.h"
#include "iremote_proxy.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class RegisterDInputCallbackProxy : public IRemoteProxy<IRegisterDInputCallback> {
public:
explicit RegisterDInputCallbackProxy(const sptr<IRemoteObject> &object);
virtual ~RegisterDInputCallbackProxy() override;
virtual void OnResult(const std::string& devId, const std::string& dhId, const int32_t& status) override;
private:
static inline BrokerDelegator<RegisterDInputCallbackProxy> g_delegator;
};
} // namespace DistributedHardware
} // namespace DistributedInput
} // namespace OHOS
#endif // REGIST_D_INPUT_CALL_BACK_PROXY_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 <string>
#include "iremote_stub.h"
#include "i_register_d_input_call_back.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class RegisterDInputCallbackStub : public IRemoteStub<IRegisterDInputCallback> {
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
@@ -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 <string>
#include "i_start_d_input_call_back.h"
#include "iremote_proxy.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class StartDInputCallbackProxy : public IRemoteProxy<IStartDInputCallback> {
public:
explicit StartDInputCallbackProxy(const sptr<IRemoteObject> &object);
virtual ~StartDInputCallbackProxy() override;
virtual void OnResult(const std::string& devId, const uint32_t& inputTypes, const int32_t& status) override;
private:
static inline BrokerDelegator<StartDInputCallbackProxy> g_delegator;
};
} // namespace DistributedHardware
} // namespace DistributedInput
} // namespace OHOS
#endif // START_D_INPUT_CALL_BACK_PROXY_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 <string>
#include "i_start_d_input_call_back.h"
#include "iremote_stub.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class StartDInputCallbackStub : public IRemoteStub<IStartDInputCallback> {
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
@@ -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 <string>
#include "i_start_d_input_server_call_back.h"
#include "iremote_proxy.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class StartDInputServerCallbackProxy : public IRemoteProxy<IStartDInputServerCallback> {
public:
explicit StartDInputServerCallbackProxy(const sptr<IRemoteObject> &object);
virtual ~StartDInputServerCallbackProxy() override;
virtual void OnResult(const int32_t& status, const uint32_t& inputTypes) override;
private:
static inline BrokerDelegator<StartDInputServerCallbackProxy> g_delegator;
};
} // namespace DistributedHardware
} // namespace DistributedInput
} // namespace OHOS
#endif // START_D_INPUT_CALL_BACK_PROXY_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 <string>
#include "iremote_stub.h"
#include "i_start_d_input_server_call_back.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class StartDInputServerCallbackStub : public IRemoteStub<IStartDInputServerCallback> {
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
@@ -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 <string>
#include "i_stop_d_input_call_back.h"
#include "iremote_proxy.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class StopDInputCallbackProxy : public IRemoteProxy<IStopDInputCallback> {
public:
explicit StopDInputCallbackProxy(const sptr<IRemoteObject> &object);
virtual ~StopDInputCallbackProxy() override;
virtual void OnResult(const std::string& devId, const uint32_t& inputTypes, const int32_t& status) override;
private:
static inline BrokerDelegator<StopDInputCallbackProxy> g_delegator;
};
} // namespace DistributedHardware
} // namespace DistributedInput
} // namespace OHOS
#endif // STOP_D_INPUT_CALL_BACK_PROXY_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 <string>
#include "i_stop_d_input_call_back.h"
#include "iremote_stub.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class StopDInputCallbackStub : public IRemoteStub<IStopDInputCallback> {
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
@@ -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 <string>
#include "i_unprepare_d_input_call_back.h"
#include "iremote_proxy.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class UnprepareDInputCallbackProxy : public IRemoteProxy<IUnprepareDInputCallback> {
public:
explicit UnprepareDInputCallbackProxy(const sptr<IRemoteObject> &object);
virtual ~UnprepareDInputCallbackProxy() override;
virtual void OnResult(const std::string& deviceId, const int32_t& status) override;
private:
static inline BrokerDelegator<UnprepareDInputCallbackProxy> g_delegator;
};
} // namespace DistributedHardware
} // namespace DistributedInput
} // namespace OHOS
#endif // UNPREPARE_D_INPUT_CALL_BACK_PROXY_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 <string>
#include "iremote_stub.h"
#include "i_unprepare_d_input_call_back.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class UnprepareDInputCallbackStub : public IRemoteStub<IUnprepareDInputCallback> {
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
@@ -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 <string>
#include "i_unregister_d_input_call_back.h"
#include "iremote_proxy.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class UnregisterDInputCallbackProxy : public IRemoteProxy<IUnregisterDInputCallback> {
public:
explicit UnregisterDInputCallbackProxy(const sptr<IRemoteObject> &object);
virtual ~UnregisterDInputCallbackProxy() override;
virtual void OnResult(const std::string& devId, const std::string& dhId, const int32_t& status) override;
private:
static inline BrokerDelegator<UnregisterDInputCallbackProxy> g_delegator;
};
} // namespace DistributedHardware
} // namespace DistributedInput
} // namespace OHOS
#endif // UNREGIST_D_INPUT_CALL_BACK_PROXY_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 <string>
#include "i_unregister_d_input_call_back.h"
#include "iremote_stub.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class UnregisterDInputCallbackStub : public IRemoteStub<IUnregisterDInputCallback> {
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