[content] Fix a description for ContentManager
[platform/framework/native/content.git] / inc / FCntContentTransferInfo.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17 /**
18  * @file                FCntContentTransferInfo.h
19  * @brief               This is the header file for the %ContentTransferInfo class.
20  *
21  * This header file contains the declarations of the %ContentTransferInfo class.
22  */
23
24 #ifndef _FCNT_CONTENT_TRANSFER_INFO_H_
25 #define _FCNT_CONTENT_TRANSFER_INFO_H_
26
27 #include <FBaseUtilUri.h>
28
29 namespace Tizen { namespace Content
30 {
31
32 class _ContentTransferInfoImpl;
33 class IContentTransferListener;
34
35 /**
36  * @if OSPDEPREC
37  * @class       ContentTransferInfo
38  * @brief       <i> [Deprecated] </i> This class contains methods that provide information about the content transfer.
39  *
40  * @deprecated  This class is deprecated. Instead of using this class, use DownloadManager class.
41  * @since       2.0
42  *
43  * The %ContentTransferInfo class provides information about the transfer of content between the device and servers.
44  * @endif
45  */
46
47 /**
48  * @enum ContentTransferStatus
49  *
50  * Defines the content transfer status.
51  *
52  * @since       2.0
53  */
54 enum  ContentTransferStatus
55 {
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 */
60 };
61
62 class _OSP_EXPORT_ ContentTransferInfo
63         : virtual public Tizen::Base::Object
64 {
65 public:
66         /**
67          * This is the constructor for this class.
68          *
69          * @brief       <i> [Deprecated] </i>
70          * @deprecated  This class is deprecated. Instead of using this class, use DownloadManager class.
71          * @since               2.0
72          */
73         ContentTransferInfo(void);
74
75         /**
76          * This destructor overrides Tizen::Base::Object::~Object().
77          *
78          * @brief       <i> [Deprecated] </i>
79          * @deprecated  This class is deprecated. Instead of using this class, use DownloadManager class.
80          * @since               2.0
81          */
82         virtual ~ContentTransferInfo(void);
83
84         /**
85          * Gets the requested Uniform Resource Identifier (URI).
86          *
87          * @brief       <i> [Deprecated] </i>
88          * @deprecated  This class is deprecated. Instead of using this class, use DownloadManager class.
89          * @since               2.0
90          *
91          * @return              The requested URI
92          */
93         Tizen::Base::Utility::Uri GetUri(void) const;
94
95         /**
96          * Gets the request ID.
97          *
98          * @brief       <i> [Deprecated] </i>
99          * @deprecated  This class is deprecated. Instead of using this class, use DownloadManager class.
100          * @since               2.0
101          *
102          * @return              The request ID
103          *
104          */
105         RequestId GetRequestId(void) const;
106
107         /**
108          * Gets the destination file path.
109          *
110          * @brief       <i> [Deprecated] </i>
111          * @deprecated  This class is deprecated. Instead of using this class, use DownloadManager class.
112          * @since               2.0
113          *
114          * @return              The destination file path
115          *
116          */
117         Tizen::Base::String GetDestPath(void) const;
118
119         /**
120          * Gets the content transfer's status.
121          *
122          * @brief       <i> [Deprecated] </i>
123          * @deprecated  This class is deprecated. Instead of using this class, use DownloadManager class.
124          * @since               2.0
125          *
126          * @return              The content transfer's status
127          */
128         ContentTransferStatus GetContentTransferStatus(void) const;
129
130 private:
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);
132
133         void SetRestRequestId(RequestId reqId);
134
135         RequestId GetRestRequestId(void) const;
136
137         int GetSourceFileSize(void) const;
138
139         void SetSlotId(int slot);
140
141         int GetSlotId(void) const;
142
143         void SetTimeout(int sec);
144
145         int GetTimeout(void) const;
146
147         void SetListener(IContentTransferListener* pListener);
148
149         ContentTransferInfo* CopyN(void);
150
151         void SetIsBuffer(bool isBuffer);
152
153         bool GetIsBuffer(void) const;
154
155         void SetProgressInterval(int intervalValue);
156
157         int GetProgressInterval(void) const;
158
159         void SetDownloadStatus(ContentTransferStatus status);
160
161 private:
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;
169         int __slotId;
170         IContentTransferListener* __pListener;
171         int __timeout;
172         bool __isBuffer;
173         int __intervalValue;
174         _ContentTransferInfoImpl* __pImpl; // pubonly - for ABC
175         friend class _ContentTransferInfoImpl;
176         friend class _ContentTransferImpl;
177         friend class _ContentDownloadListener;
178
179 };  // class ContentTransferInfo
180
181 }}  // Tizen::Content
182
183 #endif  // _FCNT_CONTENT_TRANSFER_INFO_H_