1 /* 2 * Copyright (c) 2022 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 OHOS_DISTRIBUTED_ABILITY_MANAGER_DEVICE_SELECTION_NOTIFIER_PROXY_H 17 #define OHOS_DISTRIBUTED_ABILITY_MANAGER_DEVICE_SELECTION_NOTIFIER_PROXY_H 18 19 #include <functional> 20 #include <iosfwd> 21 #include <vector> 22 23 #include "idevice_selection_notifier.h" 24 #include "iremote_broker.h" 25 #include "iremote_proxy.h" 26 #include "refbase.h" 27 28 namespace OHOS { 29 namespace DistributedSchedule { 30 class DeviceSelectionNotifierProxy : public IRemoteProxy<IDeviceSelectionNotifier> { 31 public: DeviceSelectionNotifierProxy(const sptr<IRemoteObject> & impl)32 explicit DeviceSelectionNotifierProxy(const sptr<IRemoteObject>& impl) 33 : IRemoteProxy<IDeviceSelectionNotifier>(impl) {} 34 virtual ~DeviceSelectionNotifierProxy() = default; 35 36 void OnDeviceConnect(const std::vector<ContinuationResult>& continuationResults) override; 37 void OnDeviceDisconnect(const std::vector<ContinuationResult>& continuationResults) override; 38 private: 39 static inline BrokerDelegator<DeviceSelectionNotifierProxy> delegator_; 40 }; 41 } // namespace DistributedSchedule 42 } // namespace OHOS 43 #endif // OHOS_DISTRIBUTED_ABILITY_MANAGER_DEVICE_SELECTION_NOTIFIER_PROXY_H