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 FCntContentTransferInfo.h
19 * @brief This is the header file for the %ContentTransferInfo class.
21 * This header file contains the declarations of the %ContentTransferInfo class.
24 #ifndef _FCNT_CONTENT_TRANSFER_INFO_H_
25 #define _FCNT_CONTENT_TRANSFER_INFO_H_
27 #include <FBaseUtilUri.h>
29 namespace Tizen { namespace Content
32 class _ContentTransferInfoImpl;
33 class IContentTransferListener;
37 * @class ContentTransferInfo
38 * @brief <i> [Deprecated] </i> This class contains methods that provide information about the content transfer.
40 * @deprecated This class is deprecated. Instead of using this class, use DownloadManager class.
43 * The %ContentTransferInfo class provides information about the transfer of content between the device and servers.
48 * @enum ContentTransferStatus
50 * Defines the content transfer status.
54 enum ContentTransferStatus
56 CONTENT_TRANSFER_STATUS_NONE, /**< None */
57 CONTENT_TRANSFER_STATUS_DOWNLOADING, /**< The Downloading status */
58 CONTENT_TRANSFER_STATUS_DOWNLOAD_COMPLETED, /**< The Download completed status */
59 CONTENT_TRANSFER_STATUS_DOWNLOAD_READY, /**< The Download ready status */
62 class _OSP_EXPORT_ ContentTransferInfo
63 : virtual public Tizen::Base::Object
67 * This is the constructor for this class.
69 * @brief <i> [Deprecated] </i>
70 * @deprecated This class is deprecated. Instead of using this class, use DownloadManager class.
73 ContentTransferInfo(void);
76 * This destructor overrides Tizen::Base::Object::~Object().
78 * @brief <i> [Deprecated] </i>
79 * @deprecated This class is deprecated. Instead of using this class, use DownloadManager class.
82 virtual ~ContentTransferInfo(void);
85 * Gets the requested Uniform Resource Identifier (URI).
87 * @brief <i> [Deprecated] </i>
88 * @deprecated This class is deprecated. Instead of using this class, use DownloadManager class.
91 * @return The requested URI
93 Tizen::Base::Utility::Uri GetUri(void) const;
96 * Gets the request ID.
98 * @brief <i> [Deprecated] </i>
99 * @deprecated This class is deprecated. Instead of using this class, use DownloadManager class.
102 * @return The request ID
105 RequestId GetRequestId(void) const;
108 * Gets the destination file path.
110 * @brief <i> [Deprecated] </i>
111 * @deprecated This class is deprecated. Instead of using this class, use DownloadManager class.
114 * @return The destination file path
117 Tizen::Base::String GetDestPath(void) const;
120 * Gets the content transfer's status.
122 * @brief <i> [Deprecated] </i>
123 * @deprecated This class is deprecated. Instead of using this class, use DownloadManager class.
126 * @return The content transfer's status
128 ContentTransferStatus GetContentTransferStatus(void) const;
131 void SetAllInfo(RequestId reqId, const Tizen::Base::Utility::Uri& uri, const Tizen::Base::String& destPath, const Tizen::Base::String& sourcePath, int sourceFileSize, ContentTransferStatus status);
133 void SetRestRequestId(RequestId reqId);
135 RequestId GetRestRequestId(void) const;
137 int GetSourceFileSize(void) const;
139 void SetSlotId(int slot);
141 int GetSlotId(void) const;
143 void SetTimeout(int sec);
145 int GetTimeout(void) const;
147 void SetListener(IContentTransferListener* pListener);
149 ContentTransferInfo* CopyN(void);
151 void SetIsBuffer(bool isBuffer);
153 bool GetIsBuffer(void) const;
155 void SetProgressInterval(int intervalValue);
157 int GetProgressInterval(void) const;
159 void SetDownloadStatus(ContentTransferStatus status);
162 RequestId __requestId;
163 RequestId __restRequestId;
164 ContentTransferStatus __status;
165 Tizen::Base::String __destPath;
166 Tizen::Base::Utility::Uri __uri;
167 Tizen::Base::String __sourcePath;
168 int __sourceFileSize;
170 IContentTransferListener* __pListener;
174 _ContentTransferInfoImpl* __pImpl; // pubonly - for ABC
175 friend class _ContentTransferInfoImpl;
176 friend class _ContentTransferImpl;
177 friend class _ContentDownloadListener;
179 }; // class ContentTransferInfo
183 #endif // _FCNT_CONTENT_TRANSFER_INFO_H_