[content] Remove Open Service Platform words
[platform/framework/native/content.git] / src / inc / FCnt_DownloadRequestImpl.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
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.
15 //
16 /**
17  * @file                FCnt_DownloadRequestImpl.h
18  * @brief               This is the header file for the %_DownloadRequestImpl class.
19  *
20  * This header file contains the declarations of the %_DownloadRequestImpl class.
21  */
22 #ifndef _FCNT_DOWNLOAD_REQUEST_IMPL_H_
23 #define _FCNT_DOWNLOAD_REQUEST_IMPL_H_
24
25 #include <FBaseResult.h>
26 #include <FBaseString.h>
27 #include <FBaseColHashMap.h>
28 #include <FBaseColIMap.h>
29
30 #include <FCntTypes.h>
31
32 namespace Tizen { namespace Content
33 {
34
35 class IDownloadEventListener;
36 class IDownloadProgressListener;
37 class DownloadRequest;
38
39 class _OSP_EXPORT_ _DownloadRequestImpl
40         : public Tizen::Base::Object
41 {
42 public:
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);
47         
48         virtual ~_DownloadRequestImpl(void);
49
50         _DownloadRequestImpl& operator =(const _DownloadRequestImpl& rhs);
51         bool operator ==(const _DownloadRequestImpl& rhs) const;
52
53         virtual bool Equals(const Object& obj) const;
54         virtual int GetHashCode(void) const;
55
56         void SetDirectoryPath(const Tizen::Base::String& dirPath); 
57         void SetFileName(const Tizen::Base::String& fileName); 
58
59         Tizen::Base::String GetUrl(void) const;
60         Tizen::Base::String GetDirectoryPath(void) const;
61         Tizen::Base::String GetFileName(void) const;
62
63         void SetNotification(bool enable);
64         result SetNotificationExtraData(const Tizen::Base::Collection::IMap *pExtraData);
65         void SetNetworkType(DownloadNetworkType type);
66
67         bool IsNotificationEnabled(void) const;
68         const Tizen::Base::Collection::IMap* GetNotificationExtraData(void) const;
69         DownloadNetworkType GetNetworkType(void) const;
70
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);
75
76         static _DownloadRequestImpl* GetInstance(const DownloadRequest* pRequest);
77         Tizen::Base::Collection::IMap* GetRequestHeader(void);
78
79 private:
80
81         Tizen::Base::String __url;
82         Tizen::Base::String __dirPath;
83         Tizen::Base::String __fileName;
84         bool __notification;
85         DownloadNetworkType __networkType;
86         Tizen::Base::Collection::HashMap __notifyExtraData;
87         Tizen::Base::Collection::HashMap __requestHeader;
88
89 }; // _DownloadRequestImpl
90
91 } } // Tizen::Content
92
93 #endif //_FCNT_DOWNLOAD_MANAGER_IMPL_H_
94