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 FCntContentTransferInfo.h
19 * @brief This is the header file for the %ContentTransferInfo class.
21 * This header file contains the declarations of the %ContentTransferInfo class.
25 #ifndef _FCNT_CONTENT_TRANSFER_INFO_H_
26 #define _FCNT_CONTENT_TRANSFER_INFO_H_
28 #include <FBaseUtilUri.h>
30 namespace Tizen { namespace Content
33 class _ContentTransferInfoImpl;
34 class IContentTransferListener;
38 * @enum ContentTransferStatus
40 * Defines the content transfer status.
45 enum ContentTransferStatus
47 CONTENT_TRANSFER_STATUS_NONE, /**< @if OSPDEPREC None @endif */
48 CONTENT_TRANSFER_STATUS_DOWNLOADING, /**< @if OSPDEPREC The downloading status @endif */
49 CONTENT_TRANSFER_STATUS_DOWNLOAD_COMPLETED, /**< @if OSPDEPREC The download completed status @endif */
50 CONTENT_TRANSFER_STATUS_DOWNLOAD_READY, /**< @if OSPDEPREC The download ready status @endif */
55 * @class ContentTransferInfo
56 * @brief <i> [Deprecated] </i> This class contains methods that provide information about content transfer.
58 * @deprecated This class is deprecated. Instead of using this class, use the DownloadManager class.
61 * The %ContentTransferInfo class provides information about the transfer of content between the device and the servers.
64 class _OSP_EXPORT_ ContentTransferInfo
65 : virtual public Tizen::Base::Object
69 * This is the constructor for this class.
71 * @brief <i> [Deprecated] </i>
72 * @deprecated This class is deprecated. Instead of using this class, use the DownloadManager class.
75 ContentTransferInfo(void);
78 * This destructor overrides Tizen::Base::Object::~Object().
80 * @brief <i> [Deprecated] </i>
81 * @deprecated This class is deprecated. Instead of using this class, use the DownloadManager class.
84 virtual ~ContentTransferInfo(void);
87 * Gets the requested Uniform Resource Identifier (URI).
89 * @brief <i> [Deprecated] </i>
90 * @deprecated This class is deprecated. Instead of using this class, use the DownloadManager class.
93 * @return The requested URI
95 Tizen::Base::Utility::Uri GetUri(void) const;
98 * Gets the request ID.
100 * @brief <i> [Deprecated] </i>
101 * @deprecated This class is deprecated. Instead of using this class, use the DownloadManager class.
104 * @return The request ID
107 RequestId GetRequestId(void) const;
110 * Gets the destination file path.
112 * @brief <i> [Deprecated] </i>
113 * @deprecated This class is deprecated. Instead of using this class, use the DownloadManager class.
116 * @return The destination file path
119 Tizen::Base::String GetDestPath(void) const;
122 * Gets the content transfer status.
124 * @brief <i> [Deprecated] </i>
125 * @deprecated This class is deprecated. Instead of using this class, use the DownloadManager class.
128 * @return The content transfer status
130 ContentTransferStatus GetContentTransferStatus(void) const;
133 void SetAllInfo(RequestId reqId, const Tizen::Base::Utility::Uri& uri, const Tizen::Base::String& destPath, const Tizen::Base::String& sourcePath, int sourceFileSize, ContentTransferStatus status);
135 void SetRestRequestId(RequestId reqId);
137 RequestId GetRestRequestId(void) const;
139 int GetSourceFileSize(void) const;
141 void SetSlotId(int slot);
143 int GetSlotId(void) const;
145 void SetTimeout(int sec);
147 int GetTimeout(void) const;
149 void SetListener(IContentTransferListener* pListener);
151 ContentTransferInfo* CopyN(void);
153 void SetIsBuffer(bool isBuffer);
155 bool GetIsBuffer(void) const;
157 void SetProgressInterval(int intervalValue);
159 int GetProgressInterval(void) const;
161 void SetDownloadStatus(ContentTransferStatus status);
164 RequestId __requestId;
165 RequestId __restRequestId;
166 ContentTransferStatus __status;
167 Tizen::Base::String __destPath;
168 Tizen::Base::Utility::Uri __uri;
169 Tizen::Base::String __sourcePath;
170 int __sourceFileSize;
172 IContentTransferListener* __pListener;
176 _ContentTransferInfoImpl* __pImpl; // pubonly - for ABC
177 friend class _ContentTransferInfoImpl;
178 friend class _ContentTransferImpl;
179 friend class _ContentDownloadListener;
181 }; // class ContentTransferInfo
185 #endif // _FCNT_CONTENT_TRANSFER_INFO_H_