/* * Copyright (c) <2002-2009> * * 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_OPTIONS_HPP #define CURLPP_OPTIONS_HPP #include "Option.hpp" #include #ifdef CURLPP_ALLOW_NOT_AVAILABLE #define DEF_IF_ALLOW_AVAILABLE (type,option,name) typedef curlpp::NotAvailableOptionTrait name; #endif // #begin define OPTION(version,type,option,name) // #if LIBCURL_VERSION_NUM >= version // typedef curlpp::OptionTrait name; // #else // DEF_IF_ALLOW_AVAILABLE(type,option,name) // #endif // #end namespace curlpp { namespace options { /** * Cookie interface. */ #if LIBCURL_VERSION_NUM >= 0x070d01 typedef curlpp::OptionTrait CookieList; #else #ifdef CURLPP_ALLOW_NOT_AVAILABLE typedef curlpp::NotAvailableOptionTrait CookieList; #endif #endif /** * Behavior options. */ typedef curlpp::OptionTrait Verbose; typedef curlpp::OptionTrait Header; #if LIBCURL_VERSION_NUM >= 0x070A00 typedef curlpp::OptionTrait NoSignal; #else #ifdef CURLPP_ALLOW_NOT_AVAILABLE typedef curlpp::NotAvailableOptionTrait NoSignal; #endif // CURLPP_ALLOW_NOT_AVAILABLE #endif // LIBCURL_VERSION_NUM typedef curlpp::OptionTrait NoProgress; /** * Callback options. */ typedef curlpp::OptionTrait WriteFunctionCurlFunction; typedef curlpp::OptionTrait WriteFunction; /** * Using this option will reset CURLOPT_WRITEFUNCTION to * default callback. In fact, use only this option if you only * want libcURL to use the FILE * given in argument instead * of stdout. */ #if LIBCURL_VERSION_NUM >= 0x070907 typedef curlpp::OptionTrait WriteFile; typedef curlpp::OptionTrait WriteStream; #else #ifdef CURLPP_ALLOW_NOT_AVAILABLE typedef curlpp::NotAvailableOptionTrait WriteFile; typedef curlpp::NotAvailableOptionTrait WriteStream; #endif // CURLPP_ALLOW_NOT_AVAILABLE #endif // LIBCURL_VERSION_NUM #if LIBCURL_VERSION_NUM >= 0x070c01 typedef curlpp::OptionTrait ReadFunctionCurlFunction; typedef curlpp::OptionTrait ReadFunction; #else #ifdef CURLPP_ALLOW_NOT_AVAILABLE typedef curlpp::NotAvailableOptionTrait ReadFunctionCurlFunction; typedef curlpp::NotAvailableOptionTrait ReadFunction; #endif // CURLPP_ALLOW_NOT_AVAILABLE #endif // LIBCURL_VERSION_NUM /** * Using this option will reset CURLOPT_READFUNCTION to * default callback. In fact, use only this option if you only * want libcURL to use the FILE * given in argument instead * of stdout. */ #if LIBCURL_VERSION_NUM >= 0x070907 typedef curlpp::OptionTrait ReadFile; typedef curlpp::OptionTrait ReadStream; #else #ifdef CURLPP_ALLOW_NOT_AVAILABLE typedef curlpp::NotAvailableOptionTrait ReadFile; typedef curlpp::NotAvailableOptionTrait ReadStream; #endif // CURLPP_ALLOW_NOT_AVAILABLE #endif // LIBCURL_VERSION_NUM typedef curlpp::OptionTrait ProgressFunction; typedef curlpp::OptionTrait HeaderFunction; typedef curlpp::OptionTrait DebugFunction; typedef curlpp::OptionTrait SslCtxFunction; /** * Error options. */ typedef curlpp::OptionTrait ErrorBuffer; #ifdef FILE typedef curlpp::OptionTrait StdErr; #endif typedef curlpp::OptionTrait FailOnError; /** * Network options. */ typedef curlpp::OptionTrait Url; typedef curlpp::OptionTrait Proxy; typedef curlpp::OptionTrait ProxyPort; typedef curlpp::OptionTrait ProxyType; typedef curlpp::OptionTrait HttpProxyTunnel; typedef curlpp::OptionTrait Interface; typedef curlpp::OptionTrait DnsCacheTimeout; typedef curlpp::OptionTrait DnsUseGlobalCache; typedef curlpp::OptionTrait BufferSize; typedef curlpp::OptionTrait Port; typedef curlpp::OptionTrait TcpNoDelay; /** * Names and passwords options. */ typedef curlpp::OptionTrait Netrc; typedef curlpp::OptionTrait NetrcFile; typedef curlpp::OptionTrait UserPwd; typedef curlpp::OptionTrait ProxyUserPwd; typedef curlpp::OptionTrait HttpAuth; typedef curlpp::OptionTrait ProxyAuth; /** * HTTP options. */ typedef curlpp::OptionTrait AutoReferer; typedef curlpp::OptionTrait Encoding; typedef curlpp::OptionTrait FollowLocation; typedef curlpp::OptionTrait UnrestrictedAuth; typedef curlpp::OptionTrait MaxRedirs; typedef curlpp::OptionTrait Put; typedef curlpp::OptionTrait Upload; typedef curlpp::OptionTrait Post; typedef curlpp::OptionTrait PostFields; typedef curlpp::OptionTrait PostFieldSize; typedef curlpp::OptionTrait PostFieldSizeLarge; typedef curlpp::OptionTrait HttpPost; typedef curlpp::OptionTrait Referer; typedef curlpp::OptionTrait UserAgent; typedef curlpp::OptionTrait, CURLOPT_HTTPHEADER> HttpHeader; typedef curlpp::OptionTrait, CURLOPT_HTTP200ALIASES> Http200Aliases; typedef curlpp::OptionTrait Cookie; typedef curlpp::OptionTrait CookieFile; typedef curlpp::OptionTrait CookieJar; typedef curlpp::OptionTrait CookieSession; typedef curlpp::OptionTrait HttpGet; typedef curlpp::OptionTrait HttpVersion; /** * FTP options. */ typedef curlpp::OptionTrait FtpPort; typedef curlpp::OptionTrait, CURLOPT_QUOTE> Quote; typedef curlpp::OptionTrait, CURLOPT_POSTQUOTE> PostQuote; typedef curlpp::OptionTrait, CURLOPT_PREQUOTE> PreQuote; typedef curlpp::OptionTrait FtpListOnly; typedef curlpp::OptionTrait FtpAppend; typedef curlpp::OptionTrait FtpUseEpsv; typedef curlpp::OptionTrait FtpFileMethod; typedef curlpp::OptionTrait FtpCreateMissingDirs; typedef curlpp::OptionTrait FtpResponseTimeout; typedef curlpp::OptionTrait FtpSsl; typedef curlpp::OptionTrait FtpSslAuth; /** * Protocol options. */ typedef curlpp::OptionTrait TransferText; typedef curlpp::OptionTrait Crlf; typedef curlpp::OptionTrait Range; typedef curlpp::OptionTrait ResumeFrom; typedef curlpp::OptionTrait ResumeFromLarge; typedef curlpp::OptionTrait CustomRequest; typedef curlpp::OptionTrait FileTime; typedef curlpp::OptionTrait NoBody; typedef curlpp::OptionTrait InfileSize; typedef curlpp::OptionTrait InfileSizeLarge; typedef curlpp::OptionTrait MaxFileSize; typedef curlpp::OptionTrait MaxFileSizeLarge; typedef curlpp::OptionTrait TimeCondition; typedef curlpp::OptionTrait TimeValue; /** * Connection options. */ typedef curlpp::OptionTrait Timeout; typedef curlpp::OptionTrait LowSpeedLimit; typedef curlpp::OptionTrait LowSpeedTime; typedef curlpp::OptionTrait MaxConnects; typedef curlpp::OptionTrait ClosePolicy; typedef curlpp::OptionTrait FreshConnect; typedef curlpp::OptionTrait ForbidReuse; typedef curlpp::OptionTrait ConnectTimeout; typedef curlpp::OptionTrait IpResolve; /** * SSL and security options. */ typedef curlpp::OptionTrait SslCert; typedef curlpp::OptionTrait SslCertType; typedef curlpp::OptionTrait SslCertPasswd; typedef curlpp::OptionTrait SslKey; typedef curlpp::OptionTrait SslKeyType; typedef curlpp::OptionTrait SslKeyPasswd; typedef curlpp::OptionTrait SslEngine; typedef curlpp::NoValueOptionTrait SslEngineDefault; typedef curlpp::OptionTrait SslVersion; typedef curlpp::OptionTrait SslVerifyPeer; typedef curlpp::OptionTrait CaInfo; typedef curlpp::OptionTrait CaPath; typedef curlpp::OptionTrait RandomFile; typedef curlpp::OptionTrait EgdSocket; typedef curlpp::OptionTrait SslVerifyHost; typedef curlpp::OptionTrait SslCipherList; typedef curlpp::OptionTrait Krb4Level; /** * Other options. */ typedef curlpp::OptionTrait Private; typedef curlpp::OptionTrait Krb4Level; //Share; //TelnetOptions } // namespace options namespace Options = options; } // namespace curlpp namespace cURLpp = curlpp; std::ostream & operator<<(std::ostream & stream, const curlpp::options::Url & url); #endif // #ifndef CURLPP_OPTIONS_HPP