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_IAVSESSION_H 17 #define OHOS_IAVSESSION_H 18 19 #include "iremote_broker.h" 20 #include "av_session.h" 21 #include "iavsession_callback.h" 22 23 namespace OHOS::AVSession { 24 class IAVSession : public AVSession, public IRemoteBroker { 25 public: 26 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.avsession.IAVSession"); 27 28 enum { 29 SESSION_CMD_GET_SESSION_ID, 30 SESSION_CMD_GET_META_DATA, 31 SESSION_CMD_SET_META_DATA, 32 SESSION_CMD_GET_PLAYBACK_STATE, 33 SESSION_CMD_SET_PLAYBACK_STATE, 34 SESSION_CMD_SET_LAUNCH_ABILITY, 35 SESSION_CMD_GET_CONTROLLER, 36 SESSION_CMD_REGISTER_CALLBACK, 37 SESSION_CMD_ACTIVATE, 38 SESSION_CMD_DEACTIVATE, 39 SESSION_CMD_ISACTIVE, 40 SESSION_CMD_DESTROY, 41 SESSION_CMD_ADD_SUPPORT_COMMAND, 42 SESSION_CMD_DELETE_SUPPORT_COMMAND, 43 SESSION_CMD_MAX, 44 }; 45 46 protected: 47 virtual int32_t RegisterCallbackInner(const sptr<IAVSessionCallback>& callback) = 0; 48 virtual sptr<IRemoteObject> GetControllerInner() = 0; 49 }; 50 } // namespace OHOS::AVSession 51 #endif // OHOS_IAVSESSION_H