delete % before the URI of the privilege
[platform/framework/native/media.git] / inc / FMediaIPlayerProgressiveDownloadListener.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19 * @file                         FMediaIPlayerProgressiveDownloadListener.h
20 * @brief                        This is the header file for the %IPlayerProgressiveDownloadListener interface.
21 *
22 * This header files contains the declarations of the %IPlayerProgressiveDownloadListener interface.
23 *
24 */
25 #ifndef _FMEDIA_IPLAYER_PROGRESSIVE_DOWNLOAD_LISTENER_H_
26 #define _FMEDIA_IPLAYER_PROGRESSIVE_DOWNLOAD_LISTENER_H_
27
28 #include <FBaseRtIEventListener.h>
29
30 namespace Tizen { namespace Media
31 {
32 /**
33 * @interface    IPlayerProgressiveDownloadListener
34 * @brief                This interface provides a listener that receives events associated with the progressive download playback.
35 *
36 * @since                2.0
37 *
38 * The %IPlayerProgressiveDownloadListener interface specifies the methods used to notify when the application starts, or completes progressive download.
39 */
40 class _OSP_EXPORT_ IPlayerProgressiveDownloadListener
41                 : virtual public Tizen::Base::Runtime::IEventListener
42 {
43 public:
44         /**
45         * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
46         *
47         * @since                2.0
48         */
49         virtual ~IPlayerProgressiveDownloadListener(void) { }
50
51         /**
52         * Called when the progressive download has started.
53         *
54         * @since                2.0
55         *
56         * @param[in]    player                                  An instance of Player that fires the event
57         */
58         virtual void OnPlayerProgressiveDownloadStarted(Player& player) = 0;
59
60         /**
61         * Called when the progressive download is in progress.
62         *
63         * @since                2.0
64         *
65         * @param[in]    player                                  An instance of Player that fires the event
66         * @param[in]    downloadedSize          The total downloaded size in bytes
67         * @param[in]    totalSize                               The total size in bytes
68         */
69         virtual void OnPlayerProgressiveDownloadInProgress(Player& player, int downloadedSize, int totalSize) = 0;
70
71
72         /**
73         * Called when the progressive download has completed.
74         *
75         * @since                2.0
76         *
77         * @param[in]    player                                  An instance of Player that fires the event
78         * @param[in]    r                                               The result of progressive download
79         * @exception    E_SUCCESS                               The method is successful.
80         * @exception    E_STORAGE_FULL                  The storage is full.
81         * @exception    E_INACCESSIBLE_PATH             The file path is invalid to store media data.
82         */
83         virtual void OnPlayerProgressiveDownloadCompleted(Player& player, result r) = 0;
84
85 protected:
86         //
87         // This method is for internal use only. Using this method can cause behavioral, security-related,
88         // and consistency-related issues in the application.
89         //
90         // This method is reserved and may change its name at any time without
91         // prior notice.
92         //
93         // @since               2.0
94         //
95         virtual void IPlayerProgressiveDownloadEventListener_Reserved1(void) {}
96
97         //
98         // This method is for internal use only. Using this method can cause behavioral, security-related,
99         // and consistency-related issues in the application.
100         //
101         // This method is reserved and may change its name at any time without
102         // prior notice.
103         //
104         // @since               2.0
105         //
106         virtual void IPlayerProgressiveDownloadEventListener_Reserved2(void) {}
107
108         //
109         // This method is for internal use only. Using this method can cause behavioral, security-related,
110         // and consistency-related issues in the application.
111         //
112         // This method is reserved and may change its name at any time without
113         // prior notice.
114         //
115         // @since               2.0
116         //
117         virtual void IPlayerProgressiveDownloadEventListener_Reserved3(void) {}
118
119 };
120 }}                      //Tizen::Media
121         #endif