1 /* 2 * Copyright (c) 2021-2023 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 DistributedInputs and 13 * limitations under the License. 14 */ 15 16 #ifndef I_DISTRIBUTED_SINK_INPUT_H 17 #define I_DISTRIBUTED_SINK_INPUT_H 18 19 #include <string> 20 21 #include "iremote_broker.h" 22 #include "iremote_object.h" 23 24 #include "constants_dinput.h" 25 #include "i_dinput_context.h" 26 #include "i_distributed_sink_input.h" 27 #include "i_get_sink_screen_infos_call_back.h" 28 #include "i_sharing_dhid_listener.h" 29 30 namespace OHOS { 31 namespace DistributedHardware { 32 namespace DistributedInput { 33 class IDistributedSinkInput : public IRemoteBroker { 34 public: 35 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedHardware.DistributedInput.IDistributedSinkInput"); 36 37 /* 38 * Init and Release are IPC interface, 39 * which are used for interacting by dhareware and dinput 40 */ 41 virtual int32_t Init() = 0; 42 43 virtual int32_t Release() = 0; 44 45 virtual int32_t RegisterGetSinkScreenInfosCallback(sptr<IGetSinkScreenInfosCallback> callback) = 0; 46 47 /* 48 * NotifyStartDScreen and NotifyStopDScreen are RPC interface, 49 * which are used for interacting by dinput source and dinput sink 50 */ 51 virtual int32_t NotifyStartDScreen(const SrcScreenInfo &remoteCtrlInfo) = 0; 52 53 virtual int32_t NotifyStopDScreen(const std::string &srcScreenInfoKey) = 0; 54 55 virtual int32_t RegisterSharingDhIdListener(sptr<ISharingDhIdListener> sharingDhIdListener) = 0; 56 }; 57 } // namespace DistributedInput 58 } // namespace DistributedHardware 59 } // namespace OHOS 60 61 #endif // I_DISTRIBUTED_SINK_INPUT_H 62