2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
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.
24 #ifndef _FCNT_ICONTENT_TRANSFER_LISTENER_H_
25 #define _FCNT_ICONTENT_TRANSFER_LISTENER_H_
27 #include <FBaseRtIEventListener.h>
28 #include <FCntTypes.h>
30 namespace Tizen { namespace Base
35 namespace Tizen { namespace Content
39 * @interface IContentTransferListener
40 * @brief <i> [Deprecated] </i> This interface provides event handlers that receive the events associated with ContentTransfer.
42 * @deprecated This class is deprecated. Instead of using this class, use DownloadManager class.
45 * The %IContentTransferListener interface handles the content download events.
48 class _OSP_EXPORT_ IContentTransferListener
49 : virtual public Tizen::Base::Runtime::IEventListener
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.
55 * @brief <i> [Deprecated] </i>
56 * @deprecated This class is deprecated. Instead of using this class, use DownloadManager class.
59 virtual ~IContentTransferListener(void) {}
62 * Called when the content transfer is in progress.
64 * @brief <i> [Deprecated] </i>
65 * @deprecated This class is deprecated. Instead of using this class, use DownloadManager class.
68 * @param[in] reqId The request ID
69 * @param[in] totalTransferedSize The total size of the data to transfer in bytes
71 virtual void OnContentTransferInProgress(RequestId reqId, int totalTransferedSize) = 0;
74 * Called when a download operation is completed.
76 * @brief <i> [Deprecated] </i>
77 * @deprecated This class is deprecated. Instead of using this class, use DownloadManager class.
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.
93 virtual void OnContentDownloadCompleted(RequestId reqId, ContentId contentId, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage) = 0;
96 * Called when a download to buffer operation is completed.
98 * @brief <i> [Deprecated] </i>
99 * @deprecated This class is deprecated. Instead of using this class, use DownloadManager class.
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.
116 virtual void OnContentDownloadToBufferCompleted(RequestId reqId, Tizen::Base::ByteBuffer* pBuffer, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage) = 0;
119 * Called when a transfer operation is cancelled.
121 * @brief <i> [Deprecated] </i>
122 * @deprecated This class is deprecated. Instead of using this class, use DownloadManager class.
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.
132 virtual void OnContentTransferCanceled(RequestId reqId, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage) = 0;
137 // This method is for internal use only.
138 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
140 // This method is reserved and may change its name at any time without prior notice.
144 virtual void IContentTransferListener_Reserved1(void) {}
147 // This method is for internal use only.
148 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
150 // This method is reserved and may change its name at any time without prior notice.
154 virtual void IContentTransferListener_Reserved2(void) {}
156 }; // class IContentTransferListener
160 #endif // _FCNT_ICONTENT_TRANSFER_LISTENER_H_