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 permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef DISTRIBUTED_INPUT_SINK_PROXY_H 17 #define DISTRIBUTED_INPUT_SINK_PROXY_H 18 19 #include "i_distributed_sink_input.h" 20 21 #include <iostream> 22 23 #include "iremote_proxy.h" 24 25 #include "i_sharing_dhid_listener.h" 26 27 namespace OHOS { 28 namespace DistributedHardware { 29 namespace DistributedInput { 30 class DistributedInputSinkProxy : public IRemoteProxy<IDistributedSinkInput> { 31 public: 32 33 explicit DistributedInputSinkProxy(const sptr<IRemoteObject> &object); 34 ~DistributedInputSinkProxy() override; 35 36 int32_t Init() override; 37 38 int32_t Release() override; 39 40 int32_t RegisterGetSinkScreenInfosCallback(sptr<IGetSinkScreenInfosCallback> callback) override; 41 42 int32_t NotifyStartDScreen(const SrcScreenInfo &srcScreenRemoteCtrlInfo) override; 43 int32_t NotifyStopDScreen(const std::string &srcScreenInfoKey) override; 44 45 int32_t RegisterSharingDhIdListener(sptr<ISharingDhIdListener> sharingDhIdListener) override; 46 47 private: 48 bool SendRequest(uint32_t code, MessageParcel &data, MessageParcel &reply); 49 50 static inline BrokerDelegator<DistributedInputSinkProxy> delegator_; 51 }; 52 } // namespace DistributedInput 53 } // namespace DistributedHardware 54 } // namespace OHOS 55 56 #endif // DISTRIBUTED_INPUT_PROXY_H 57