Author: jkupec
Date: Wed Sep 10 17:53:46 2008
New Revision: 11004
URL: http://svn.opensuse.org/viewcvs/zypp?rev=11004&view=rev
Log:
- added dumpAsXMLOn(stream,string) to ServiceInfo to print services with
content (repos)
Modified:
trunk/libzypp/zypp/RepoInfo.cc
trunk/libzypp/zypp/RepoInfo.h
trunk/libzypp/zypp/ServiceInfo.cc
trunk/libzypp/zypp/ServiceInfo.h
trunk/libzypp/zypp/repo/RepoInfoBase.cc
trunk/libzypp/zypp/repo/RepoInfoBase.h
Modified: trunk/libzypp/zypp/RepoInfo.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoInfo.cc?rev=11004&r1=11003&r2=11004&view=diff
==============================================================================
--- trunk/libzypp/zypp/RepoInfo.cc (original)
+++ trunk/libzypp/zypp/RepoInfo.cc Wed Sep 10 17:53:46 2008
@@ -330,6 +330,9 @@
}
std::ostream & RepoInfo::dumpAsXMLOn( std::ostream & str) const
+ { return dumpAsXMLOn(str, ""); }
+
+ std::ostream & RepoInfo::dumpAsXMLOn( std::ostream & str, const std::string & content) const
{
string tmpstr;
str
@@ -356,11 +359,13 @@
return str;
}
+
std::ostream & operator<<( std::ostream & str, const RepoInfo & obj )
{
return obj.dumpOn(str);
}
+
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/RepoInfo.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoInfo.h?rev=11004&r1=11003&r2=11004&view=diff
==============================================================================
--- trunk/libzypp/zypp/RepoInfo.h (original)
+++ trunk/libzypp/zypp/RepoInfo.h Wed Sep 10 17:53:46 2008
@@ -323,8 +323,18 @@
/**
* Write an XML representation of this RepoInfo object.
+ */
+ virtual std::ostream & dumpAsXMLOn(std::ostream & str) const;
+
+ /**
+ * Write an XML representation of this RepoInfo object.
+ *
+ * \param str
+ * \param content this argument is ignored (used in other classed derived
+ * from RepoInfoBase.
*/
- virtual std::ostream & dumpAsXMLOn( std::ostream & str) const;
+ virtual std::ostream & dumpAsXMLOn(
+ std::ostream & str, const std::string & content) const;
class Impl;
private:
Modified: trunk/libzypp/zypp/ServiceInfo.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ServiceInfo.cc?rev=11004&r1=11003&r2=11004&view=diff
==============================================================================
--- trunk/libzypp/zypp/ServiceInfo.cc (original)
+++ trunk/libzypp/zypp/ServiceInfo.cc Wed Sep 10 17:53:46 2008
@@ -118,18 +118,28 @@
return str;
}
- std::ostream & ServiceInfo::dumpAsXMLOn( std::ostream & str) const
+ std::ostream & ServiceInfo::dumpAsXMLOn(std::ostream & str) const
+ { return dumpAsXMLOn(str, ""); }
+
+ ostream & ServiceInfo::dumpAsXMLOn( ostream & str, const string & content) const
{
- return str
+ str
<< "