2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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.
18 * @file FCntIContentTransferListener.h
19 * @brief This is the header file for the %IContentTransferListener interface.
21 * This header file contains the declarations of the %IContentTransferListener interface.
25 #ifndef _FCNT_ICONTENT_TRANSFER_LISTENER_H_
26 #define _FCNT_ICONTENT_TRANSFER_LISTENER_H_
28 #include <FBaseRtIEventListener.h>
29 #include <FCntTypes.h>
31 namespace Tizen { namespace Base
36 namespace Tizen { namespace Content
40 * @interface IContentTransferListener
41 * @brief <i> [Deprecated] </i> This interface provides event handlers that receive the events associated with %ContentTransfer.
43 * @deprecated This class is deprecated. Instead of using this class, use the DownloadManager class.
46 * The %IContentTransferListener interface handles the content download events.
49 class _OSP_EXPORT_ IContentTransferListener
50 : virtual public Tizen::Base::Runtime::IEventListener
54 * This polymorphic destructor should be overridden if required. @n
55 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
57 * @brief <i> [Deprecated] </i>
58 * @deprecated This class is deprecated. Instead of using this class, use the DownloadManager class.
61 virtual ~IContentTransferListener(void) {}
64 * Called when the content transfer is in progress.
66 * @brief <i> [Deprecated] </i>
67 * @deprecated This class is deprecated. Instead of using this class, use the DownloadManager class.
70 * @param[in] reqId The request ID
71 * @param[in] totalTransferedSize The total size of the data to transfer in bytes
73 virtual void OnContentTransferInProgress(RequestId reqId, int totalTransferedSize) = 0;
76 * Called when the download operation is completed.
78 * @brief <i> [Deprecated] </i>
79 * @deprecated This class is deprecated. Instead of using this class, use the DownloadManager class.
82 * @param[in] reqId The request ID
83 * @param[in] contentId The registered content ID
84 * @param[in] r The result of the download
85 * @param[in] errorCode The error code from the server
86 * @param[in] errorMessage The error message from the server
87 * @exception E_SUCCESS The method is successful.
88 * @exception E_SERVER An error has occurred on the server side.
89 * @exception E_CONNECTION_FAILED The server connection has failed.
90 * @exception E_ILLEGAL_ACCESS The request to access the server is illegal.
91 * @exception E_STORAGE_FULL The storage is full.
92 * @exception E_OUT_OF_MEMORY The memory is insufficient.
93 * @exception E_SYSTEM A system error has occurred.
95 virtual void OnContentDownloadCompleted(RequestId reqId, ContentId contentId, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage) = 0;
98 * Called when the download to buffer operation is completed.
100 * @brief <i> [Deprecated] </i>
101 * @deprecated This class is deprecated. Instead of using this class, use the DownloadManager class.
104 * @param[in] reqId The request ID
105 * @param[in] pBuffer The binary buffer that is downloaded
106 * @param[in] r The result of the download
107 * @param[in] errorCode The error code from the server
108 * @param[in] errorMessage The error message from the server
109 * @exception E_SUCCESS The method is successful.
110 * @exception E_SERVER An error has occurred on the server side.
111 * @exception E_FILE_ALREADY_EXIST The specified file already exists.
112 * @exception E_STORAGE_FULL The storage is full.
113 * @exception E_CONNECTION_FAILED The server connection has failed.
114 * @exception E_ILLEGAL_ACCESS The request to access the server is illegal.
115 * @exception E_OUT_OF_MEMORY The memory is insufficient.
116 * @exception E_SYSTEM A system error has occurred.
118 virtual void OnContentDownloadToBufferCompleted(RequestId reqId, Tizen::Base::ByteBuffer* pBuffer, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage) = 0;
121 * Called when the transfer operation is cancelled.
123 * @brief <i> [Deprecated] </i>
124 * @deprecated This class is deprecated. Instead of using this class, use DownloadManager class.
127 * @param[in] reqId The request ID
128 * @param[in] r The result of the transfer
129 * @param[in] errorCode The error code from the server
130 * @param[in] errorMessage The error message from the server
131 * @exception E_SUCCESS The method is successful.
132 * @exception E_SERVER An error has occurred on the server side.
134 virtual void OnContentTransferCanceled(RequestId reqId, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage) = 0;
139 // This method is for internal use only.
140 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
142 // This method is reserved and may change its name at any time without prior notice.
146 virtual void IContentTransferListener_Reserved1(void) {}
149 // This method is for internal use only.
150 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
152 // This method is reserved and may change its name at any time without prior notice.
156 virtual void IContentTransferListener_Reserved2(void) {}
158 }; // class IContentTransferListener
162 #endif // _FCNT_ICONTENT_TRANSFER_LISTENER_H_