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 FCnt_DownloadRequestImpl.h
18 * @brief This is the header file for the %_DownloadRequestImpl class.
20 * This header file contains the declarations of the %_DownloadRequestImpl class.
22 #ifndef _FCNT_DOWNLOAD_REQUEST_IMPL_H_
23 #define _FCNT_DOWNLOAD_REQUEST_IMPL_H_
25 #include <FBaseResult.h>
26 #include <FBaseString.h>
27 #include <FBaseColHashMap.h>
28 #include <FBaseColIMap.h>
30 #include <FCntTypes.h>
32 namespace Tizen { namespace Content
35 class IDownloadEventListener;
36 class IDownloadProgressListener;
37 class DownloadRequest;
39 class _OSP_EXPORT_ _DownloadRequestImpl
40 : public Tizen::Base::Object
43 _DownloadRequestImpl(void);
44 _DownloadRequestImpl(const Tizen::Base::String& url);
45 _DownloadRequestImpl(const Tizen::Base::String& url, const Tizen::Base::String& dirPath);
46 _DownloadRequestImpl(const _DownloadRequestImpl& rhs);
48 virtual ~_DownloadRequestImpl(void);
50 _DownloadRequestImpl& operator =(const _DownloadRequestImpl& rhs);
51 bool operator ==(const _DownloadRequestImpl& rhs) const;
53 virtual bool Equals(const Object& obj) const;
54 virtual int GetHashCode(void) const;
56 void SetDirectoryPath(const Tizen::Base::String& dirPath);
57 void SetFileName(const Tizen::Base::String& fileName);
59 Tizen::Base::String GetUrl(void) const;
60 Tizen::Base::String GetDirectoryPath(void) const;
61 Tizen::Base::String GetFileName(void) const;
63 void SetNotification(bool enable);
64 result SetNotificationExtraData(const Tizen::Base::Collection::IMap *pExtraData);
65 void SetNetworkType(DownloadNetworkType type);
67 bool IsNotificationEnabled(void) const;
68 const Tizen::Base::Collection::IMap* GetNotificationExtraData(void) const;
69 DownloadNetworkType GetNetworkType(void) const;
71 result AddRequestHeader(const Tizen::Base::String& field, const Tizen::Base::String& value);
72 result SetRequestHeader(const Tizen::Base::String& field, const Tizen::Base::String& value);
73 result RemoveRequestHeader(const Tizen::Base::String& field);
74 Tizen::Base::String* GetRequestHeaderN(const Tizen::Base::String& field);
76 static _DownloadRequestImpl* GetInstance(const DownloadRequest* pRequest);
77 Tizen::Base::Collection::IMap* GetRequestHeader(void);
81 Tizen::Base::String __url;
82 Tizen::Base::String __dirPath;
83 Tizen::Base::String __fileName;
85 DownloadNetworkType __networkType;
86 Tizen::Base::Collection::HashMap __notifyExtraData;
87 Tizen::Base::Collection::HashMap __requestHeader;
89 }; // _DownloadRequestImpl
93 #endif //_FCNT_DOWNLOAD_MANAGER_IMPL_H_