Mailinglist Archive: zypp-commit (223 mails)

< Previous Next >
[zypp-commit] r10711 - /trunk/libzypp/zypp/ExternalProgram.h
  • From: dmacvicar@xxxxxxxxxxxxxxxx
  • Date: Thu, 31 Jul 2008 17:08:18 -0000
  • Message-id: <20080731170818.981002F117@xxxxxxxxxxxxxxxx>
Author: dmacvicar
Date: Thu Jul 31 19:08:18 2008
New Revision: 10711

URL: http://svn.opensuse.org/viewcvs/zypp?rev=10711&view=rev
Log:
add example code

Modified:
trunk/libzypp/zypp/ExternalProgram.h

Modified: trunk/libzypp/zypp/ExternalProgram.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ExternalProgram.h?rev=10711&r1=10710&r2=10711&view=diff
==============================================================================
--- trunk/libzypp/zypp/ExternalProgram.h (original)
+++ trunk/libzypp/zypp/ExternalProgram.h Thu Jul 31 19:08:18 2008
@@ -27,6 +27,30 @@
* an external program. It starts the program using fork
* and some exec.. call, gives you access to the program's
* stdio and closes the program after use.
+ *
+ * \code
+ *
+ * const char* argv[] =
+ * {
+ * "/usr/bin/foo,
+ * "--option1",
+ * "--option2",
+ * NULL
+ * };
+ *
+ * ExternalProgram prog( argv,
+ * ExternalProgram::Discard_Stderr,
+ * false, -1, true);
+ * string line;
+ * for(line = prog.receiveLine();
+ * ! line.empty();
+ * line = prog.receiveLine() )
+ * {
+ * stream << line;
+ * }
+ * prog.close();
+ *
+ * \endcode
*/
class ExternalProgram : public zypp::externalprogram::ExternalDataSource
{

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages