[content] Fix description in DownloadManager
[platform/framework/native/content.git] / inc / FCntIContentTransferListener.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  * @file                        FCntIContentTransferListener.h
19  * @brief               This is the header file for the %IContentTransferListener interface.
20  *
21  * This header file contains the declarations of the %IContentTransferListener interface.
22  */
23
24 #ifndef _FCNT_ICONTENT_TRANSFER_LISTENER_H_
25 #define _FCNT_ICONTENT_TRANSFER_LISTENER_H_
26
27 #include <FBaseRtIEventListener.h>
28 #include <FCntTypes.h>
29
30 namespace Tizen { namespace Base
31 {
32 class ByteBuffer;
33 }}
34
35 namespace Tizen { namespace Content
36 {
37 /**
38  * @if OSPDEPREC
39  * @interface IContentTransferListener
40  * @brief       <i> [Deprecated] </i> This interface provides event handlers that receive the events associated with ContentTransfer.
41  *
42  * @deprecated  This class is deprecated. Instead of using this class, use DownloadManager class.
43  * @since       2.0
44  *
45  * The %IContentTransferListener interface handles the content download events.
46  * @endif
47  */
48 class _OSP_EXPORT_ IContentTransferListener
49         : virtual public Tizen::Base::Runtime::IEventListener
50 {
51 public:
52         /**
53          * 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.
54          *
55          * @brief       <i> [Deprecated] </i>
56          * @deprecated  This class is deprecated. Instead of using this class, use DownloadManager class.
57          * @since       2.0
58          */
59         virtual ~IContentTransferListener(void) {}
60
61         /**
62          * Called when the content transfer is in progress.
63          *
64          * @brief       <i> [Deprecated] </i>
65          * @deprecated  This class is deprecated. Instead of using this class, use DownloadManager class.
66          * @since                       2.0
67          *
68          * @param[in]   reqId                   The request ID
69          * @param[in]   totalTransferedSize             The total size of the data to transfer in bytes
70          */
71         virtual void OnContentTransferInProgress(RequestId reqId, int totalTransferedSize) = 0;
72
73         /**
74          * Called when a download operation is completed.
75          *
76          * @brief       <i> [Deprecated] </i>
77          * @deprecated  This class is deprecated. Instead of using this class, use DownloadManager class.
78          * @since                       2.0
79          *
80          * @param[in]   reqId           The request ID
81          * @param[in]   contentId       The registered content ID
82          * @param[in]   r                       The result of the download
83          * @param[in]   errorCode       The error code from the server
84          * @param[in]   errorMessage    The error message from the server
85          * @exception   E_SUCCESS               The method is successful.
86          * @exception   E_SERVER                An error has occurred on the server side.
87          * @exception   E_CONNECTION_FAILED The server connection has failed.
88          * @exception   E_ILLEGAL_ACCESS        The request to access a server is illegal.
89          * @exception   E_STORAGE_FULL          The storage is full.
90          * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
91          * @exception   E_SYSTEM                A system error has occurred.
92          */
93         virtual void OnContentDownloadCompleted(RequestId reqId, ContentId contentId, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage) = 0;
94
95         /**
96          * Called when a download to buffer operation is completed.
97          *
98          * @brief       <i> [Deprecated] </i>
99          * @deprecated  This class is deprecated. Instead of using this class, use DownloadManager class.
100          * @since                       2.0
101          *
102          * @param[in]   reqId           The request ID
103          * @param[in]   pBuffer         The binary buffer that has been downloaded
104          * @param[in]   r                       The result of the download
105          * @param[in]   errorCode       The error code from the server
106          * @param[in]   errorMessage    The error message from the server
107          * @exception   E_SUCCESS               The method is successful.
108          * @exception   E_SERVER                An error has occurred on the server side.
109          * @exception   E_FILE_ALREADY_EXIST The specified file already exists.
110          * @exception   E_STORAGE_FULL          The storage is full.
111          * @exception   E_CONNECTION_FAILED The server connection has failed.
112          * @exception   E_ILLEGAL_ACCESS        The request to access a server is illegal.
113          * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
114          * @exception   E_SYSTEM                A system error has occurred.
115          */
116         virtual void OnContentDownloadToBufferCompleted(RequestId reqId, Tizen::Base::ByteBuffer* pBuffer, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage) = 0;
117
118         /**
119         * Called when a transfer operation is cancelled.
120          *
121          * @brief       <i> [Deprecated] </i>
122          * @deprecated  This class is deprecated. Instead of using this class, use DownloadManager class.
123          * @since                       2.0
124          *
125          * @param[in]   reqId           The request ID
126          * @param[in]   r                       The result of the transfer
127          * @param[in]   errorCode       The error code from the server
128          * @param[in]   errorMessage    The error message from the server
129          * @exception   E_SUCCESS               The method is successful.
130          * @exception   E_SERVER                An error has occurred on the server side.
131          */
132         virtual void OnContentTransferCanceled(RequestId reqId, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage) = 0;
133
134 protected:
135
136         //
137         // This method is for internal use only.
138         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
139         //
140         // This method is reserved and may change its name at any time without prior notice.
141         //
142         // @since               2.0
143         //
144         virtual void IContentTransferListener_Reserved1(void) {}
145
146         //
147         // This method is for internal use only.
148         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
149         //
150         // This method is reserved and may change its name at any time without prior notice.
151         //
152         // @since               2.0
153         //
154         virtual void IContentTransferListener_Reserved2(void) {}
155
156 };  // class IContentTransferListener
157
158 }} // Tizen::Content
159
160 #endif // _FCNT_ICONTENT_TRANSFER_LISTENER_H_