Author: dmacvicar Date: Fri Oct 17 16:16:30 2008 New Revision: 11393 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11393&view=rev Log: add docs Modified: trunk/libzypp/tests/lib/WebServer.h Modified: trunk/libzypp/tests/lib/WebServer.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/lib/WebServer.h?rev=11393&r1=11392&r2=11393&view=diff ============================================================================== --- trunk/libzypp/tests/lib/WebServer.h (original) +++ trunk/libzypp/tests/lib/WebServer.h Fri Oct 17 16:16:30 2008 @@ -10,16 +10,46 @@ struct shttpd_ctx; +/** + * + * Starts a webserver to simulate remote transfers in + * testcases + * + * \code + * #include "WebServer.h" + * + * BOOST_AUTO_TEST_CASE(Foo) + * { + * + * WebServer web((Pathname(TESTS_SRC_DIR) + "/datadir").c_str() ); + * web.start(); + * + * MediaSetAccess media( Url("http://localhost:9099"), "/" ); + * + * // do something with the url + * + * + * web.stop(); + * + * \endcode + */ class WebServer { public: + /** + * creates a web server on \ref root and \port + */ WebServer(const zypp::Pathname root, unsigned int port=9099); ~WebServer(); + /** + * Starts the webserver worker thread + */ void start(); - + /** + * Stops the worker thread + */ void stop(); - private: void setStrOption( std::string name, std::string value); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org