cURLpp Project
Description
cURLpp is a C++ wrapper for libcURL. libcURL is described as:a free and easy-to-use client-side URL transfer library, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos, HTTP form based upload, proxies, cookies, user+password authentication, file transfer resume, http proxy tunneling and more!
libcurl is highly portable, it builds and works identically on numerous platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX, IRIX, AIX, Tru64, Linux, Windows, Amiga, OS/2, BeOs, Mac OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS and more...
libcurl is free, thread-safe, IPv6 compatible, feature rich, well supported and fast.
First, I need to quote Daniel Stenberg, the maintener of libcURL:You can use libcURL instantly from within your C++ programs. You don't _need_ cURLpp for that, cURLpp just adds an OO'ified layer that libcURL doesn't normally provide.
It means that you need to be sure that you need, or want, cURLpp features. If not, I suggest to use directly the libcURL library. So, what are thoses features that cURLpp offers?- You can query handles for option values (version 0.5.x and newer only).
- It use the C++ standard library structures instead of home made ones.
- It is exception safe. (see this)
- It is type safe.
Current News
cURLpp 0.7.0-pre2 is out!
(2006-06-29) I don't know what else to say: It's out! So, here it is. Changes includes (since 0.7.0-pre2):-
Bug fixes:
- Fixed the missing msvc makefiles in source distribution.
- Fixed some gcc 3.2 compilation fixes (MaHo)
- Updated MSVC makefiles for new examples and for Multi integration.
- Better Multi interface error handling.
cURLpp 0.7.0-pre1 is out!
(2006-06-25) The version 0.7.0 was supposed to be the share interface integration, but someone needed the multi interface. Because nobody expressed the need for the share interface, I assumed that it wouldn't be critical to put it further. So, here it is. Changes includes (since 0.6.1):-
New Features:
- Multi interface.
Subversion switching
(2006-01-13) From now on, cURLpp will rely on subversion for the source repository. After few month of using the GNU Arch system, I must admit I did a mistake. The problem is that too few people are able to use it, including me.
License
cURLpp is true Open Source/Free Software and meet all definitions as such. It means that you are free to modify and redistribute all contents of the cURLpp distributed archives. You may also freely use cURLpp in your commercial projects. cURLpp is licensed under a MIT license, see below.Copyright (c) 2002-2006, Jean-Philippe Barrette-LaPierre
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 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.
Documentation
The programming guide for the 0.5.x and newer versions is here. There's a programming guide available for the 0.3.x and older versions here. Those guides are greatly inspired by the libcURL guide, that I strongly suggest to read. There's also some examples in the "examples/" source directory of cURLpp.Branches
The devel branch (0.5.x and newer)
This version is a complete re-factorization of cURLpp against 0.3.x and older versions. This re-factorization was made for the following reasons:- cURLpp was difficult to maintain.
- cURLpp wasn't flexible.
But in fact, the real problem is that I'm a fat bastard who DOES read feature requests, but does not necessarily program them (You can send your complains to my university/job/girlfriend). So, this design is, in fact, "Ze" one that is compatible with my laziness.
Seriously, here's the advantages of this new design:
- Allow you to change cURLpp's C++ wrapping behavior, without requiring its recompilation.
- Allow you to retrieve the option values already set on the handle.
The stable branch
This version is designed over the project began by Eric Lavigne. It's no longer active.Development Plans
So, what's next? I have some ideas for future releases. If you want to suggest some feature, don't be shy and send me an email (see at the bottom of the page).-
Version 0.6.0 (Out)
- Exception safe feature. What's exactly the matter? Isn't supposed to be already exception safe? Well, the problem is when you work with C++ callbacks that are called within C code. What will happen if the callback throw an exception? The exception will go through the C code. This will completely break the C code. So, you need to be sure that it's impossible that an exception is thrown, without being handled in your callback. So, I want to add some code that will handle any exception thrown and rethrow it in the C++ code, meaning in the cURLpp::Easy::perform function. Then, you'll be able to throw exceptions, without being scared to break libcURL's execution.
- Functors. At this time we use plain functions as callbacks. However, if you want to use a member function, you need to create a function that will cast your data (that you previously set on the handle), and then call your member function. I want to use functors instead. If you don't know what are functors, check this.
-
Version 0.7.0 (Out)
-
Multi interface. We need to add the
Multi interface. Here's the description from libcURL's documentation:
The multi interface is the asynchronous brother in the family and it also offers multiple transfers using a single thread and more. The multi interface introduces several new abilities that the easy interface refuses to offer. They are mainly:- Enable a "pull" interface. The application that uses libcurl decides where and when to ask libcurl to get/send data.
- Enable multiple simultaneous transfers in the same thread without making it complicated for the application.
- Enable the application to select() on its own file descriptors and curl's file descriptors simultaneous easily.
-
Multi interface. We need to add the
Multi interface. Here's the description from libcURL's documentation:
-
Version 0.8.0
- Share interface. Right now, we don't provide any wrapping for the Share interface. Mostly, this wrapping will depend on the functor feature. This is the description from the libcURL documentation: The share interface was added to enable sharing of data between curl "handles". You can have multiple easy handles share data between them. Have them update and use the same cookie database or DNS cache! This way, each single transfer will take advantage from data updates made by the other transfer(s).
Compilers
cURLpp is meant to be portable, but I can't maintain, all by myself, a project file for every platform that exists. Here's the environnements that I maintain, or will maintain personally:- Linux/GCC 2.95/GCC 3.x
- Cygwin/GCC 2.95/GCC 3.x
-
MinGW/GCC 2.95/GCC 3.x
(not at this moment, but I want to)
Downloads
This is the multi interface integration. The CHANGES file is here. All files are here.Subversion
I no longer use CVS. After using GNU Arch for few months, I decided to use subversion. GNU Arch was too complex to use. In fact, it was so complex that I'm not event sure if there's a single person that was able to access cURLpp's GNU Arch repository.The subversion repository isn't available, but it will when my sysadmin will be kind enough to set it up (Hey david! Come on!).