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_CONTROLLER_H
17 #define OHOS_IAVSESSION_CONTROLLER_H
18 
19 #include "avsession_controller.h"
20 #include "iavcontroller_callback.h"
21 #include "iremote_broker.h"
22 
23 namespace OHOS::AVSession {
24 class IAVSessionController : public AVSessionController, public IRemoteBroker {
25 public:
26     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.avsession.IAVSessionController");
27 
28     enum {
29         CONTROLLER_CMD_REGISTER_CALLBACK,
30         CONTROLLER_CMD_DESTROY,
31         CONTROLLER_CMD_GET_AV_PLAYBACK_STATE,
32         CONTROLLER_CMD_GET_AV_META_DATA,
33         CONTROLLER_CMD_SEND_AV_KEYEVENT,
34         CONTROLLER_CMD_GET_LAUNCH_ABILITY,
35         CONTROLLER_CMD_GET_VALID_COMMANDS,
36         CONTROLLER_CMD_SEND_CONTROL_COMMAND,
37         CONTROLLER_CMD_SEND_COMMON_COMMAND,
38         CONTROLLER_CMD_SET_META_FILTER,
39         CONTROLLER_CMD_SET_PLAYBACK_FILTER,
40         CONTROLLER_CMD_IS_SESSION_ACTIVE,
41         CONTROLLER_CMD_GET_SESSION_ID,
42         CONTROLLER_CMD_GET_AV_QUEUE_ITEMS,
43         CONTROLLER_CMD_GET_AV_QUEUE_TITLE,
44         CONTROLLER_CMD_SKIP_TO_QUEUE_ITEM,
45         CONTROLLER_CMD_GET_EXTRAS,
46         CONTROLLER_CMD_GET_AVCALL_META_DATA,
47         CONTROLLER_CMD_SET_AVCALL_META_FILTER,
48         CONTROLLER_CMD_GET_AVCALL_STATE,
49         CONTROLLER_CMD_SET_AVCALL_STATE_FILTER,
50         CONTROLLER_CMD_MAX,
51     };
52 
53 protected:
54     virtual int32_t RegisterCallbackInner(const sptr<IRemoteObject>& callback) = 0;
55 };
56 }
57 #endif // OHOS_IAVSESSION_CONTROLLER_H