12e147c35Sopenharmony_ci/* 22e147c35Sopenharmony_ci * Copyright (C) 2023-2023 Huawei Device Co., Ltd. 32e147c35Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 42e147c35Sopenharmony_ci * you may not use this file except in compliance with the License. 52e147c35Sopenharmony_ci * You may obtain a copy of the License at 62e147c35Sopenharmony_ci * 72e147c35Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 82e147c35Sopenharmony_ci * 92e147c35Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 102e147c35Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 112e147c35Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 122e147c35Sopenharmony_ci * See the License for the specific language governing permissions and 132e147c35Sopenharmony_ci * limitations under the License. 142e147c35Sopenharmony_ci * Description: supply Cast session definition. 152e147c35Sopenharmony_ci * Author: zhangge 162e147c35Sopenharmony_ci * Create: 2022-06-15 172e147c35Sopenharmony_ci */ 182e147c35Sopenharmony_ci 192e147c35Sopenharmony_ci#ifndef CAST_SESSION_H 202e147c35Sopenharmony_ci#define CAST_SESSION_H 212e147c35Sopenharmony_ci 222e147c35Sopenharmony_ci#include "cast_engine_common.h" 232e147c35Sopenharmony_ci#include "i_cast_session.h" 242e147c35Sopenharmony_ci#include "i_cast_session_impl.h" 252e147c35Sopenharmony_ci#include "oh_remote_control_event.h" 262e147c35Sopenharmony_ci 272e147c35Sopenharmony_cinamespace OHOS { 282e147c35Sopenharmony_cinamespace CastEngine { 292e147c35Sopenharmony_cinamespace CastEngineClient { 302e147c35Sopenharmony_ciclass CastSession : public ICastSession { 312e147c35Sopenharmony_cipublic: 322e147c35Sopenharmony_ci CastSession(sptr<ICastSessionImpl> proxy) : proxy_(proxy) {}; 332e147c35Sopenharmony_ci ~CastSession() override; 342e147c35Sopenharmony_ci 352e147c35Sopenharmony_ci int32_t RegisterListener(std::shared_ptr<ICastSessionListener> listener) override; 362e147c35Sopenharmony_ci int32_t UnregisterListener() override; 372e147c35Sopenharmony_ci int32_t AddDevice(const CastRemoteDevice &remoteDevice) override; 382e147c35Sopenharmony_ci int32_t RemoveDevice(const std::string &deviceId) override; 392e147c35Sopenharmony_ci int32_t StartAuth(const AuthInfo &authInfo) override; 402e147c35Sopenharmony_ci int32_t GetSessionId(std::string &sessionId) override; 412e147c35Sopenharmony_ci int32_t SetSessionProperty(const CastSessionProperty &property) override; 422e147c35Sopenharmony_ci int32_t SetSessionId(std::string sessionId); 432e147c35Sopenharmony_ci int32_t CreateMirrorPlayer(std::shared_ptr<IMirrorPlayer> &mirrorPlayer) override; 442e147c35Sopenharmony_ci int32_t CreateStreamPlayer(std::shared_ptr<IStreamPlayer> &streamPlayer) override; 452e147c35Sopenharmony_ci int32_t Release() override; 462e147c35Sopenharmony_ci int32_t NotifyEvent(EventId eventId, std::string &jsonParam) override; 472e147c35Sopenharmony_ci int32_t SetCastMode(CastMode mode, std::string &jsonParam) override; 482e147c35Sopenharmony_ci 492e147c35Sopenharmony_ciprivate: 502e147c35Sopenharmony_ci sptr<ICastSessionImpl> proxy_; 512e147c35Sopenharmony_ci std::string sessionId_{}; 522e147c35Sopenharmony_ci}; 532e147c35Sopenharmony_ci} // namespace CastEngineClient 542e147c35Sopenharmony_ci} // namespace CastEngine 552e147c35Sopenharmony_ci} // namespace OHOS 562e147c35Sopenharmony_ci 572e147c35Sopenharmony_ci#endif 58