1 #ifndef _CURL_WIKI_GRABBER_H
2 #define _CURL_WIKI_GRABBER_H
6 #include "WalkerException.h"
9 //! Class responsible for grabbing the contents / links of an article
13 //! Create a new instance.
14 //! Might throw an exception, if curl intialization failed
17 int error
= curl_global_init(CURL_GLOBAL_ALL
);
20 throw WalkerException("CURL init failed");
26 curl_global_cleanup();
29 /*! given an URL, return an Article with its links
30 * \returns an Article instance wiith title and links set.
31 * If title is empty, an error occurred.
33 Article
grabUrl(std::string url
);
36 #endif // _CURL_WIKI_GRABBER_H