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.
17 * @file FCntContentTransferInfo.h
18 * @brief This is the header file for the %ContentTransferInfo class.
20 * This header file contains the declarations of the %ContentTransferInfo class.
23 #ifndef _FCNT_CONTENT_TRANSFER_INFO_H_
24 #define _FCNT_CONTENT_TRANSFER_INFO_H_
26 #include <FBaseUtilUri.h>
28 namespace Tizen { namespace Content
31 class _ContentTransferInfoImpl;
32 class IContentTransferListener;
36 * @enum ContentTransferStatus
38 * Defines the content transfer status.
43 enum ContentTransferStatus
45 CONTENT_TRANSFER_STATUS_NONE, /**< None */
46 CONTENT_TRANSFER_STATUS_DOWNLOADING, /**< The Downloading status */
47 CONTENT_TRANSFER_STATUS_DOWNLOAD_COMPLETED, /**< The Download completed status */
48 CONTENT_TRANSFER_STATUS_DOWNLOAD_READY, /**< The Download ready status */
53 * @class ContentTransferInfo
54 * @brief <i> [Deprecated] </i> This class contains methods that provide information about the content transfer.
56 * @deprecated This class is deprecated. Instead of using this class, use DownloadManager class.
59 * The %ContentTransferInfo class provides information about the transfer of content between the device and servers.
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_