return _nullimpl;
}
+ std::ostream & operator<<( std::ostream & str, const Target::DistributionLabel & obj )
+ {
+ str << "summary=" << obj.summary << endl;
+ str << "shortName=" << obj.shortName << endl;
+ return str;
+ }
///////////////////////////////////////////////////////////////////
//
std::string Target::targetDistributionRelease( const Pathname & root_r )
{ return target::TargetImpl::targetDistributionRelease( root_r ); }
+ Target::DistributionLabel Target::distributionLabel() const
+ { return _pimpl->distributionLabel(); }
+ Target::DistributionLabel Target::distributionLabel( const Pathname & root_r )
+ { return target::TargetImpl::distributionLabel( root_r ); }
+
std::string Target::distributionVersion() const
{ return _pimpl->distributionVersion(); }
std::string Target::distributionVersion( const Pathname & root_r )
/** \overload */
static std::string targetDistributionRelease( const Pathname & root_r );
+ struct DistributionLabel { std::string shortName; std::string summary; };
+ /** This is \c shortName and \c summary attribute of the installed base product.
+ * Used e.g. for the bootloader menu.
+ */
+ DistributionLabel distributionLabel() const;
+ /** \overload */
+ static DistributionLabel distributionLabel( const Pathname & root_r );
+
/** This is \c version attribute of the installed base product.
* For example http://download.opensue.org/update/11.0
* The 11.0 corresponds to the base product version.
inline std::ostream & operator<<( std::ostream & str, const Target & obj )
{ return obj.dumpOn( str ); }
+ /** \relates Target::DistributionLabel Stream output.
+ * Write out the content as key/value pairs:
+ * \code
+ * summary=Beautiful Name
+ * shortName=BN
+ * \endcode
+ */
+ std::ostream & operator<<( std::ostream & str, const Target::DistributionLabel & obj );
/////////////////////////////////////////////////////////////////
} // namespace zypp
std::string TargetImpl::targetDistribution( const Pathname & root_r )
{ return baseproductdata( staticGuessRoot(root_r) ).registerTarget(); }
-
std::string TargetImpl::targetDistributionRelease() const
{ return baseproductdata( _root ).registerRelease(); }
// static version:
std::string TargetImpl::targetDistributionRelease( const Pathname & root_r )
{ return baseproductdata( staticGuessRoot(root_r) ).registerRelease();}
+ Target::DistributionLabel TargetImpl::distributionLabel() const
+ {
+ Target::DistributionLabel ret;
+ parser::ProductFileData pdata( baseproductdata( _root ) );
+ ret.shortName = pdata.shortName();
+ ret.summary = pdata.summary();
+ return ret;
+ }
+ // static version:
+ Target::DistributionLabel TargetImpl::distributionLabel( const Pathname & root_r )
+ {
+ Target::DistributionLabel ret;
+ parser::ProductFileData pdata( baseproductdata( staticGuessRoot(root_r) ) );
+ ret.shortName = pdata.shortName();
+ ret.summary = pdata.summary();
+ return ret;
+ }
std::string TargetImpl::distributionVersion() const
{
static std::string targetDistributionRelease( const Pathname & root_r );
/** \copydoc Target::distributionVersion()*/
+ Target::DistributionLabel distributionLabel() const;
+ /** \overload */
+ static Target::DistributionLabel distributionLabel( const Pathname & root_r );
+
+ /** \copydoc Target::distributionVersion()*/
std::string distributionVersion() const;
/** \overload */
static std::string distributionVersion( const Pathname & root_r );