增加sessionsatate回调

Signed-off-by: litiangang4 <litiangang4@huawei.com>
This commit is contained in:
litiangang4
2023-08-25 11:31:19 +08:00
parent 5bed52aaaa
commit 56df04c600
24 changed files with 442 additions and 6 deletions
@@ -35,6 +35,7 @@
#include "i_unregister_d_input_call_back.h"
#include "i_input_node_listener.h"
#include "i_simulation_event_listener.h"
#include "i_session_state_callback.h"
namespace OHOS {
namespace DistributedHardware {
@@ -98,6 +99,8 @@ public:
const std::string &nodeDesc) = 0;
virtual int32_t RegisterSimulationEventListener(sptr<ISimulationEventListener> listener) = 0;
virtual int32_t UnregisterSimulationEventListener(sptr<ISimulationEventListener> listener) = 0;
virtual int32_t RegisterSessionStateCb(sptr<ISessionStateCallback> callback) = 0;
virtual int32_t UnregisterSessionStateCb() = 0;
};
} // namespace DistributedInput
} // namespace DistributedHardware
@@ -0,0 +1,40 @@
/*
* Copyright (c) 2023 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 I_REGISTER_SESSION_STATE_CALLBACK_H
#define I_REGISTER_SESSION_STATE_CALLBACK_H
#include <string>
#include <iremote_broker.h>
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class ISessionStateCallback : public IRemoteBroker {
public:
virtual void OnResult(const std::string &devId, const uint32_t status) = 0;
enum class Message {
RESULT,
};
DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedHardware.DistributedInput.ISessionStateCallback");
};
} // namespace DistributedInput
} // namespace DistributedHardware
} // namespace OHOS
#endif // I_REGISTER_SESSION_STATE_CALLBACK_H