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_HttpDeleter.h
20 * @brief This is the header file for defining custom deleter for smart pointer.
22 * This is the header file for defining custom deleter for smart pointer.
25 #ifndef _FNET_HTTP_INTERNAL_HTTP_DELETER_H_
26 #define _FNET_HTTP_INTERNAL_HTTP_DELETER_H_
28 #include <openssl/ssl.h>
30 #include <FNetHttpHttpTypes.h>
31 #include <FBaseSysLog.h>
32 #include <FSecCert_CertService.h>
33 #include <FNetHttpHttpRequest.h>
34 #include <FNetHttpHttpResponse.h>
35 #include <FNetHttpHttpCookie.h>
36 #include <FNetHttpHttpCookieStorageManager.h>
37 #include <FNetHttpHttpCookieStorageManager.h>
38 #include "FNetHttp_HttpCookieImpl.h"
39 #include "FNetHttp_HttpRequestImpl.h"
40 #include "FNetHttp_HttpResponseImpl.h"
41 #include "FNetHttp_HttpCookieStorageManagerImpl.h"
43 namespace Tizen { namespace Net { namespace Http
48 void operator()(BIO* pBIo)
54 struct _CertInfoDeleter
56 void operator()(Tizen::Security::Cert::_CertInfo* pCertInfo)
62 struct _HttpCookieDeleter
64 void operator()(HttpCookie* pCookie)
66 _HttpCookieImpl::DeleteHttpCookie(pCookie);
70 struct _HttpRequestDeleter
72 void operator()(HttpRequest* pRequest)
74 _HttpRequestImpl::DeleteHttpRequest(pRequest);
78 struct _HttpResponseDeleter
80 void operator()(HttpResponse* pResponse)
82 _HttpResponseImpl::DeleteHttpResponse(pResponse);
86 struct _HttpCookieStorageManagerDeleter
88 void operator()(HttpCookieStorageManager* pCookieStorageMgr)
90 _HttpCookieStorageManagerImpl::DeleteHttpCookieStorageManager(pCookieStorageMgr);
94 struct _CollectionDeleter
96 template<typename Collection>
97 void operator()(Collection* pCollection)
99 pCollection->RemoveAll(true);
106 void operator()(char* pBytes)
114 void operator()(X509* pCert)
120 struct _X509ChainDeleter
122 void operator()(STACK_OF(X509)* pCertChain)
124 sk_X509_free(pCertChain);
129 } } } //Tizen::Net::Http
130 #endif // _FNET_HTTP_INTERNAL_HTTP_DELETER_H_