2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @file FNetHttp_HttpTransactionEventArg.h
20 * @brief This is the header file for %_HttpTransactionEventArg class.
23 #ifndef _FNET_HTTP_INTERNAL_HTTP_TRANSACTION_EVENT_ARG_H_
24 #define _FNET_HTTP_INTERNAL_HTTP_TRANSACTION_EVENT_ARG_H_
26 #include <FBaseRtIEventArg.h>
27 #include "FNetHttp_HttpCommon.h"
29 namespace Tizen { namespace Base
34 namespace Tizen { namespace Base { namespace Collection
39 namespace Tizen { namespace Net { namespace Http
42 * @class _HttpTransactionEventArg FNetHttp_HttpTransactionEventArg.h "OspdOaf/FNet/H/FNetHttp_HttpTransactionEventArg.h"
43 * @brief This class is used as an argument on firing a Transaction Event.
47 * _HttpTransactionEventArg::FireImpl() receives an argument of this type, when any %Http Transaction event is generated.
50 class _HttpTransactionEventArg
51 : public Tizen::Base::Object
52 , public Tizen::Base::Runtime::IEventArg
56 _HttpTransactionEventArg(int transactionId, _HttpTransactionEventType eventType);
58 ~_HttpTransactionEventArg(void);
60 int GetTransactionId(void) const;
62 _HttpTransactionEventType GetEventType(void);
64 void SetError(result error);
66 result GetError(void) const;
68 void SetReadHeaderLength(int readHeaderLength);
70 int GetReadHeaderLength(void) const;
72 void SetAuthType(long httpAuth);
74 long GetAuthType(void) const;
76 void SetProxyAuth(bool isProxyAuth);
78 bool IsProxyAuth(void) const;
80 void SetReadBodyLength(int readBodyLength);
82 int GetReadBodyLength(void) const;
84 void SetRecommendedSize(int recommendedSize);
86 int GetRecommendedSize(void) const;
88 void SetUploadProgress(long long currentSize, long long totalSize);
90 long long GetCurrentUploadProgress(void) const;
92 long long GetTotalUploadProgress(void) const;
94 void SetDownloadProgress(long long currentSize, long long totalSize);
96 long long GetCurrentDownloadProgress(void) const;
98 long long GetTotalDownloadProgress(void) const;
100 void SetServerCert(Tizen::Base::String* pServerCert);
102 Tizen::Base::String* GetServerCert(void) const;
104 void SetServerCertList(Tizen::Base::Collection::IList* pServerCertList);
106 Tizen::Base::Collection::IList* GetServerCertList(void) const;
110 _HttpTransactionEventArg(const _HttpTransactionEventArg& rhs);
112 _HttpTransactionEventArg& operator =(const _HttpTransactionEventArg& rhs);
116 _HttpTransactionEventType __eventType;
118 int __readHeaderLength;
121 int __readBodyLength;
122 int __recommendedSize;
123 long long __uploadCurrentProgress;
124 long long __uploadTotalProgress;
125 long long __downloadCurrentProgress;
126 long long __downloadTotalProgress;
127 Tizen::Base::String* __pServerCert;
128 Tizen::Base::Collection::IList* __pServerCertList;
130 }; // _HttpTransactionEventArg
132 } } } // Tizen::Net::Http
133 #endif // _FNET_HTTP_INTERNAL_HTTP_TRANSACTION_EVENT_ARG_H_