Author: dmacvicar
Date: Thu Apr 12 18:29:02 2007
New Revision: 5364
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5364&view=rev
Log:
documentation
Modified:
trunk/libzypp/zypp/parser/yum/PatchesFileReader.cc
trunk/libzypp/zypp/parser/yum/PatchesFileReader.h
trunk/libzypp/zypp/parser/yum/RepomdFileReader.h
Modified: trunk/libzypp/zypp/parser/yum/PatchesFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/yum/PatchesFileReader.cc?rev=5364&r1=5363&r2=5364&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/yum/PatchesFileReader.cc (original)
+++ trunk/libzypp/zypp/parser/yum/PatchesFileReader.cc Thu Apr 12 18:29:02 2007
@@ -32,15 +32,15 @@
std::string data_type;
if ( reader_r->nodeType() == XML_READER_TYPE_ELEMENT )
{
- if ( reader_r->name() == "repomd" )
+ if ( reader_r->name() == "patches" )
{
_tag = tag_Patches;
return true;
}
- if ( reader_r->name() == "data" )
+ if ( reader_r->name() == "patch" )
{
- _tag = tag_Data;
- _type = reader_r->getAttribute("type").asString();
+ _tag = tag_Patch;
+ _id = reader_r->getAttribute("id").asString();
return true;
}
if ( reader_r->name() == "location" )
@@ -66,8 +66,8 @@
else if ( reader_r->nodeType() == XML_READER_TYPE_END_ELEMENT )
{
//MIL << "end element" << endl;
- if ( reader_r->name() == "data" )
- _callback( _location, _type );
+ if ( reader_r->name() == "patch" )
+ _callback( _location, _id );
return true;
}
return true;
Modified: trunk/libzypp/zypp/parser/yum/PatchesFileReader.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/yum/PatchesFileReader.h?rev=5364&r1=5363&r2=5364&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/yum/PatchesFileReader.h (original)
+++ trunk/libzypp/zypp/parser/yum/PatchesFileReader.h Thu Apr 12 18:29:02 2007
@@ -25,30 +25,56 @@
{
namespace yum
{
-
+ /**
+ * Iterates through a patches.xml file giving on each iteration
+ * a \ref OnMediaLocation object with the resource and its
+ * patch id.
+ * The iteration is done via a callback provided on
+ * construction.
+ *
+ * \code
+ * PatchesFileReader reader(patches_file,
+ * bind( &SomeClass::callbackfunc, &object, _1, _2 ) );
+ * \endcode
+ */
class PatchesFileReader
{
public:
+
+ /**
+ * Callback definition
+ * first parameter is a \ref OnMediaLocation object with the resource
+ * second parameter is the patch id.
+ */
typedef function