Tizen 2.0 Release
[framework/osp/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 common thing required for IPlayerProgressiveDownloadListener.
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@n
46         * of this interface is called.
47         *
48         * @since                2.0
49         */
50         virtual ~IPlayerProgressiveDownloadListener(void) { }
51
52         /**
53         * Called when the progressive download started.
54         *
55         * @since                2.0
56         *
57         * @param[in]    player                                  A pointer to the Player instance that fired the event
58         */
59         virtual void OnPlayerProgressiveDownloadStarted(Player& player) = 0;
60
61         /**
62         * Called when the progressive download is in progress.
63         *
64         * @since                2.0
65         *
66         * @param[in]    player                                  A pointer to the Player instance that fired the event
67         * @param[in]    downloadedSize          The total downloaded size in bytes
68         * @param[in]    totalSize                               The total size in bytes
69         */
70         virtual void OnPlayerProgressiveDownloadInProgress(Player& player, int downloadedSize, int totalSize) = 0;
71
72
73         /**
74         * Called when the progressive download completed.
75         *
76         * @since                2.0
77         *
78         * @param[in]    player                                  A pointer to the Player instance that fired the event
79         * @param[in]    r                                               The result of progressive download.
80         * @exception    E_SUCCESS                               The method is successful.
81         * @exception    E_STORAGE_FULL                  The storage is full.
82         * @exception    E_INACCESSIBLE_PATH             The file path is invalid to store media data.
83         */
84         virtual void OnPlayerProgressiveDownloadCompleted(Player& player, result r) = 0;
85
86 protected:
87         //
88         // This method is for internal use only. Using this method can cause behavioral, security-related,
89         // and consistency-related issues in the application.
90         //
91         // This method is reserved and may change its name at any time without
92         // prior notice.
93         //
94         // @since               2.0
95         //
96         virtual void IPlayerProgressiveDownloadEventListener_Reserved1(void) {}
97
98         //
99         // This method is for internal use only. Using this method can cause behavioral, security-related,
100         // and consistency-related issues in the application.
101         //
102         // This method is reserved and may change its name at any time without
103         // prior notice.
104         //
105         // @since               2.0
106         //
107         virtual void IPlayerProgressiveDownloadEventListener_Reserved2(void) {}
108
109         //
110         // This method is for internal use only. Using this method can cause behavioral, security-related,
111         // and consistency-related issues in the application.
112         //
113         // This method is reserved and may change its name at any time without
114         // prior notice.
115         //
116         // @since               2.0
117         //
118         virtual void IPlayerProgressiveDownloadEventListener_Reserved3(void) {}
119
120 };
121 }}                      //Tizen::Media
122         #endif