1 /*
2  * Copyright (c) 2022-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  */
15 #ifndef OHOS_AVSESSION_CALLBACK_PROXY_H
16 #define OHOS_AVSESSION_CALLBACK_PROXY_H
17 
18 #include "iremote_proxy.h"
19 #include "iavsession_callback.h"
20 
21 namespace OHOS::AVSession {
22 class AVSessionCallbackProxy : public IRemoteProxy<IAVSessionCallback> {
23 public:
24     explicit AVSessionCallbackProxy(const sptr<IRemoteObject>& impl);
25     void OnAVCallAnswer() override;
26     void OnAVCallHangUp() override;
27     void OnAVCallToggleCallMute() override;
28     void OnPlay() override;
29     void OnPause() override;
30     void OnStop() override;
31     void OnPlayNext() override;
32     void OnPlayPrevious() override;
33     void OnFastForward(int64_t time) override;
34     void OnRewind(int64_t time) override;
35     void OnSeek(int64_t time) override;
36     void OnSetSpeed(double speed) override;
37     void OnSetLoopMode(int32_t loopMode) override;
38     void OnToggleFavorite(const std::string& mediaId) override;
39     void OnMediaKeyEvent(const MMI::KeyEvent& keyEvent) override;
40     void OnOutputDeviceChange(const int32_t connectionState, const OutputDeviceInfo& outputDeviceInfo) override;
41     void OnCommonCommand(const std::string& commonCommand, const AAFwk::WantParams& commandArgs) override;
42     void OnSkipToQueueItem(int32_t itemId) override;
43     void OnPlayFromAssetId(int64_t assetId) override;
44     void OnCastDisplayChange(const CastDisplayInfo& castDisplayInfo) override;
45 private:
46     static inline BrokerDelegator<AVSessionCallbackProxy> delegator_;
47 };
48 } // namespace OHOS::AVSession
49 #endif // OHOS_AVSESSION_CALLBACK_PROXY_H