tizen beta release
[framework/web/wrt-plugins-common.git] / src / modules / API / MMPlayer / IMMPlayer.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 #ifndef WRTDEVICEAPIS_MMPLAYER_IMMPlayer_H_
17 #define WRTDEVICEAPIS_MMPLAYER_IMMPlayer_H_
18
19 #include <dpl/noncopyable.h>
20 #include <dpl/shared_ptr.h>
21 #include <MMPlayer/EventOnStateChange.h>
22
23 namespace WrtDeviceApis {
24 namespace MMPlayer {
25 namespace Api {
26
27 class IMMPlayer : DPL::Noncopyable
28 {
29   public:
30     virtual ~IMMPlayer()
31     {
32     }
33
34     /**
35      * Sets on player state change event emitter.
36      * @param emitter On player state change event emitter.
37      * @throw PlatformException If platform error occurs.
38      */
39     virtual void setEmitter(const EventOnStateChangeEmitterPtr& emitter) = 0;
40
41     /**
42      * Gets on player state change event emitter.
43      * @throw PlatformException If platform error occurs.
44      */
45     virtual EventOnStateChangeEmitterPtr getEmitter() = 0;
46
47     /**
48      * Removes on state change event emitter.
49      */
50     virtual void clearEmitter() = 0;
51
52     /**
53      * Gets how many times opened file will be played since now
54      */
55     virtual unsigned int getRepeatTimes() const = 0;
56
57     /**
58      * Sets how many times opened file should be played
59      */
60     virtual void setRepeatTimes(unsigned int count) = 0;
61
62   protected:
63     IMMPlayer()
64     {
65     }
66 };
67
68 typedef DPL::SharedPtr<IMMPlayer> IMMPlayerPtr;
69 }
70 }
71 }
72
73 #endif // WRTDEVICEAPIS_MMPLAYER_IMMPlayer_H_