Source

cURLpp / include / curlpp / Info.hpp

Piotr Dobrogost … 6bec8bc 
Piotr Dobrogost … 7e5b244 
Piotr Dobrogost … 6bec8bc 


Piotr Dobrogost … 9308597 
Piotr Dobrogost … 6bec8bc 




















Piotr Dobrogost … 4b00509 
Jean-Philippe Ba… dbd147c 
Piotr Dobrogost … d22e411 
Jean-Philippe Ba… dbd147c 
Piotr Dobrogost … 6bec8bc 
Piotr Dobrogost … 4b00509 

Piotr Dobrogost … 6bec8bc 


Piotr Dobrogost … 4b00509 




Piotr Dobrogost … 6bec8bc 
Piotr Dobrogost … 4b00509 


Kirill Morarenko 9c9ed86 

Piotr Dobrogost … 4b00509 
Piotr Dobrogost … 6bec8bc 

Piotr Dobrogost … 4b00509 



Piotr Dobrogost … 6bec8bc 
Piotr Dobrogost … 4b00509 


Kirill Morarenko 9c9ed86 

Piotr Dobrogost … 4b00509 
Piotr Dobrogost … 6bec8bc 

Piotr Dobrogost … 4b00509 









Kirill Morarenko 9c9ed86 
Piotr Dobrogost … 4b00509 




Kirill Morarenko 9c9ed86 
Piotr Dobrogost … 4b00509 



Kirill Morarenko 9c9ed86 
Piotr Dobrogost … 4b00509 



Kirill Morarenko 9c9ed86 
Piotr Dobrogost … 4b00509 



Kirill Morarenko 9c9ed86 
Piotr Dobrogost … 4b00509 













Kirill Morarenko 9c9ed86 
Piotr Dobrogost … 4b00509 


Piotr Dobrogost … 9308597 
Piotr Dobrogost … 6bec8bc 
Piotr Dobrogost … 4b00509 


Piotr Dobrogost … 6bec8bc 
Jean-Philippe Ba… dbd147c 
Piotr Dobrogost … 6bec8bc 

Piotr Dobrogost … 9308597 
Piotr Dobrogost … 6bec8bc 
/*
 *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
 *    
 *    Permission is hereby granted, free of charge, to any person obtaining
 *    a copy of this software and associated documentation files 
 *    (curlpp), to deal in the Software without restriction, 
 *    including without limitation the rights to use, copy, modify, merge,
 *    publish, distribute, sublicense, and/or sell copies of the Software,
 *    and to permit persons to whom the Software is furnished to do so, 
 *    subject to the following conditions:
 *    
 *    The above copyright notice and this permission notice shall be included
 *    in all copies or substantial portions of the Software.
 *    
 *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
 *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
 *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
 *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */


#ifndef CURLPP_INFO_HPP
#define CURLPP_INFO_HPP


#include "internal/buildconfig.h"

#include "Easy.hpp"


namespace curlpp
{


	/**
	* This class is responsible of retreiving the Info from
	* a handle. This is the class you use when you want to do
	* so.
	*/

	template<CURLINFO info, typename T>
	struct CURLPPAPI Info 
	{
		static void get(const curlpp::Easy & handle, T & value);
		static T get(const curlpp::Easy & handle);
	};


	/**
	* This class is used when an info is not available for the
	* current libcURL version.
	*/

	template<CURLINFO info, typename T>
	struct CURLPPAPI NotAvailableInfo : Info<info, T>
	{
		static void get(const curlpp::Easy & handle, T & value);
		static T get(const curlpp::Easy & handle);
	};


	/**
	* This is the class you need to specialize if you use
	* a special type that libcURL is not aware of. This class
	* need to call curlpp::InfoGetter::get function. See 
	* curlpp::InfoGetter for more information.
	*/

	template<typename T>
	struct CURLPPAPI InfoTypeConverter
	{
		static void get(const curlpp::Easy & handle, CURLINFO info, T & value);
	}; 


	template<>
	void InfoTypeConverter<std::string>
		::get(const curlpp::Easy & handle, CURLINFO info, std::string & value);


	template<>
	void InfoTypeConverter<std::list<std::string> >
		::get(const curlpp::Easy & handle, CURLINFO info, std::list<std::string> & value);


	template<>
	void InfoTypeConverter<long>
		::get(const curlpp::Easy & handle, CURLINFO info, long & value);


	template<>
	void InfoTypeConverter<double>
		::get(const curlpp::Easy & handle, CURLINFO info, double & value);


	/**
	* This is the only class that is authorized to retreive 
	* info from a curlpp::Easy class. So, this is the class
	* you need to use when you specialize the class
	* curlpp::InfoTypeConverter. This class is in fact used
	* as a proxy, just to be sure that nobody access curlpp::Easy's 
	* private data.
	*/

	struct CURLPPAPI InfoGetter
	{
		template<typename T>
		static void get(const curlpp::Easy & handle, CURLINFO info, T & value);
	};


} // namespace curlpp

namespace cURLpp = curlpp;


#ifdef CURLPP_INCLUDE_TEMPLATE_DEFINITIONS
	#include "Info.inl"
#endif


#endif // #ifndef CURLPP_INFO_HPP
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.