• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2023-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  * Description: supply cast service listener implement proxy class.
15  * Author: zhangge
16  * Create: 2022-6-15
17  */
18 
19 #ifndef CAST_SERVICE_LISTENER_IMPL_PROXY_H
20 #define CAST_SERVICE_LISTENER_IMPL_PROXY_H
21 
22 #include "cast_engine_common.h"
23 #include "i_cast_service_listener_impl.h"
24 #include "i_cast_session_impl.h"
25 #include "iremote_proxy.h"
26 
27 namespace OHOS {
28 namespace CastEngine {
29 namespace CastEngineService {
30 class CastServiceListenerImplProxy : public IRemoteProxy<ICastServiceListenerImpl> {
31 public:
CastServiceListenerImplProxy(const sptr<IRemoteObject> & impl)32     explicit CastServiceListenerImplProxy(const sptr<IRemoteObject> &impl)
33         : IRemoteProxy<ICastServiceListenerImpl>(impl)
34     {}
35 
36     void OnDeviceFound(const std::vector<CastRemoteDevice> &deviceList) override;
37     void OnDeviceOffline(const std::string &deviceId) override;
38     void OnSessionCreated(const sptr<ICastSessionImpl> &castSession) override;
39     void OnServiceDied() override;
40 
41 private:
42     static inline BrokerDelegator<CastServiceListenerImplProxy> delegator_;
43 };
44 } // namespace CastEngineService
45 } // namespace CastEngine
46 } // namespace OHOS
47 #endif