2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 #ifndef WRTDEVICEAPIS_MMPLAYER_MANAGER_H_
17 #define WRTDEVICEAPIS_MMPLAYER_MANAGER_H_
19 #include <MMPlayer/IManager.h>
21 namespace WrtDeviceApis {
24 class Manager : public Api::IManager
32 * @param event @see WrtDeviceApis::Api::EventOpen.
33 * @exception Commons::PlatformException when platform error occurs
35 virtual void openFile(const Api::EventOpenPtr& event);
37 * Plays current file. If file is already playing player starts from the beginning
38 * @param event @see WrtDeviceApis::Api::EventPlay.
39 * @exception Commons::PlatformException when platform error occurs
41 virtual void play(const Api::EventPlayPtr& event);
43 * Pauses current playing file. If no file is currently playing noting happens
44 * @param event @see WrtDeviceApis::Api::EventPause.
45 * @exception Commons::PlatformException when platform error occurs
46 * @exception Commons::InvalidArgumentException when fileName is empty
48 virtual void pause(const Api::EventPausePtr& event);
50 * Resumes after pause. If file is not paused nothing happens
51 * @param event @see WrtDeviceApis::Api::EventResume.
52 * @exception Commons::PlatformException when platform error occurs
54 virtual void resume(const Api::EventResumePtr& event);
56 * Stops current playing file. If file is not playing nothing happens
57 * @param event @see WrtDeviceApis::Api::EventStop.
58 * @exception Commons::PlatformException when platform error occurs
60 virtual void stop(const Api::EventStopPtr& event);
62 * Sets window for video files
63 * @param event @see WrtDeviceApis::Api::EventSetWindow.
64 * @exception Commons::PlatformException when platform error occurs
66 virtual void setWindow(const Api::EventSetWindowPtr& event);
68 * Returns current playing state
69 * @param event @see WrtDeviceApis::Api::EventIsPlaying.
70 * @return True if player is in playing state
71 * @exception Commons::PlatformException when platform error occurs
73 virtual void isPlaying(const Api::EventIsPlayingPtr& event);
75 * Returns current playing state
76 * @param [out] event @see WrtDeviceApis::Api::EventIsPlaying.
77 * @exception Commons::PlatformException when platform error occurs
79 virtual void getVolume(const Api::EventGetVolumePtr& event);
82 virtual void OnRequestReceived(const Api::EventOpenPtr& event);
83 virtual void OnRequestReceived(const Api::EventPlayPtr& event);
84 virtual void OnRequestReceived(const Api::EventPausePtr& event);
85 virtual void OnRequestReceived(const Api::EventResumePtr& event);
86 virtual void OnRequestReceived(const Api::EventStopPtr& event);
87 virtual void OnRequestReceived(const Api::EventSetWindowPtr& event);
88 virtual void OnRequestReceived(const Api::EventIsPlayingPtr& event);
89 virtual void OnRequestReceived(const Api::EventGetVolumePtr& event);
95 #endif // WRTDEVICEAPIS_MMPLAYER_MANAGER_H_