180922886Sopenharmony_ci/*
280922886Sopenharmony_ci * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
380922886Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
480922886Sopenharmony_ci * you may not use this file except in compliance with the License.
580922886Sopenharmony_ci * You may obtain a copy of the License at
680922886Sopenharmony_ci *
780922886Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
880922886Sopenharmony_ci *
980922886Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1080922886Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1180922886Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1280922886Sopenharmony_ci * See the License for the specific language governing permissions and
1380922886Sopenharmony_ci * limitations under the License.
1480922886Sopenharmony_ci */
1580922886Sopenharmony_ci
1680922886Sopenharmony_ci#ifndef OHOS_IAVSESSION_H
1780922886Sopenharmony_ci#define OHOS_IAVSESSION_H
1880922886Sopenharmony_ci
1980922886Sopenharmony_ci#include "iremote_broker.h"
2080922886Sopenharmony_ci#include "av_session.h"
2180922886Sopenharmony_ci#include "iavsession_callback.h"
2280922886Sopenharmony_ci
2380922886Sopenharmony_cinamespace OHOS::AVSession {
2480922886Sopenharmony_ciclass IAVSession : public AVSession, public IRemoteBroker {
2580922886Sopenharmony_cipublic:
2680922886Sopenharmony_ci    DECLARE_INTERFACE_DESCRIPTOR(u"ohos.avsession.IAVSession");
2780922886Sopenharmony_ci
2880922886Sopenharmony_ci    enum {
2980922886Sopenharmony_ci        SESSION_CMD_GET_SESSION_ID,
3080922886Sopenharmony_ci        SESSION_CMD_GET_SESSION_TYPE,
3180922886Sopenharmony_ci        SESSION_CMD_GET_META_DATA,
3280922886Sopenharmony_ci        SESSION_CMD_SET_META_DATA,
3380922886Sopenharmony_ci        SESSION_CMD_GET_PLAYBACK_STATE,
3480922886Sopenharmony_ci        SESSION_CMD_SET_PLAYBACK_STATE,
3580922886Sopenharmony_ci        SESSION_CMD_GET_QUEUE_ITEMS,
3680922886Sopenharmony_ci        SESSION_CMD_SET_QUEUE_ITEMS,
3780922886Sopenharmony_ci        SESSION_CMD_GET_QUEUE_TITLE,
3880922886Sopenharmony_ci        SESSION_CMD_SET_QUEUE_TITLE,
3980922886Sopenharmony_ci        SESSION_CMD_GET_EXTRAS,
4080922886Sopenharmony_ci        SESSION_CMD_SET_EXTRAS,
4180922886Sopenharmony_ci        SESSION_CMD_SET_LAUNCH_ABILITY,
4280922886Sopenharmony_ci        SESSION_CMD_GET_CONTROLLER,
4380922886Sopenharmony_ci#ifdef CASTPLUS_CAST_ENGINE_ENABLE
4480922886Sopenharmony_ci        SESSION_CMD_GET_AVCAST_CONTROLLER,
4580922886Sopenharmony_ci        SESSION_CMD_START_CAST_DISPLAY_LISTENER,
4680922886Sopenharmony_ci        SESSION_CMD_STOP_CAST_DISPLAY_LISTENER,
4780922886Sopenharmony_ci        SESSION_CMD_GET_ALL_CAST_DISPLAYS,
4880922886Sopenharmony_ci#endif
4980922886Sopenharmony_ci        SESSION_CMD_REGISTER_CALLBACK,
5080922886Sopenharmony_ci        SESSION_CMD_ACTIVATE,
5180922886Sopenharmony_ci        SESSION_CMD_DEACTIVATE,
5280922886Sopenharmony_ci        SESSION_CMD_ISACTIVE,
5380922886Sopenharmony_ci        SESSION_CMD_DESTROY,
5480922886Sopenharmony_ci        SESSION_CMD_ADD_SUPPORT_COMMAND,
5580922886Sopenharmony_ci        SESSION_CMD_DELETE_SUPPORT_COMMAND,
5680922886Sopenharmony_ci        SESSION_CMD_SET_SESSION_EVENT,
5780922886Sopenharmony_ci#ifdef CASTPLUS_CAST_ENGINE_ENABLE
5880922886Sopenharmony_ci        SESSION_CMD_RELEASE_CAST,
5980922886Sopenharmony_ci#endif
6080922886Sopenharmony_ci        SESSION_CMD_SET_AVCALL_META_DATA,
6180922886Sopenharmony_ci        SESSION_CMD_SET_AVCALL_STATE,
6280922886Sopenharmony_ci        SESSION_CMD_MAX,
6380922886Sopenharmony_ci    };
6480922886Sopenharmony_ci
6580922886Sopenharmony_ciprotected:
6680922886Sopenharmony_ci    virtual int32_t RegisterCallbackInner(const sptr<IAVSessionCallback>& callback) = 0;
6780922886Sopenharmony_ci    virtual sptr<IRemoteObject> GetControllerInner() = 0;
6880922886Sopenharmony_ci
6980922886Sopenharmony_ci#ifdef CASTPLUS_CAST_ENGINE_ENABLE
7080922886Sopenharmony_ci    virtual sptr<IRemoteObject> GetAVCastControllerInner() = 0;
7180922886Sopenharmony_ci#endif
7280922886Sopenharmony_ci};
7380922886Sopenharmony_ci} // namespace OHOS::AVSession
7480922886Sopenharmony_ci#endif // OHOS_IAVSESSION_H