_first = false;
}
- _report->progress(progress);
- bool value = true;
+ bool value = _report->progress(progress);
if ( _fnc )
- value = _fnc(progress);
-
+ value &= _fnc(progress);
if ( progress.finalReport() )
{
virtual void finishDeltaApply()
{}
- /** \deprecated Unused since 2008 */
- virtual ZYPP_DEPRECATED void startPatchDownload( const Pathname & /*filename*/, const ByteCount & /*downloadsize*/ )
- {}
-
- /** \deprecated Unused since 2008 */
- virtual ZYPP_DEPRECATED bool progressPatchDownload( int /*value*/ )
- { return true; }
-
- /** \deprecated Unused since 2008 */
- virtual ZYPP_DEPRECATED void problemPatchDownload( const std::string &/*description*/ )
- {}
-
- /** \deprecated Unused since 2008 */
- virtual ZYPP_DEPRECATED void finishPatchDownload()
- {}
-
-
// return false if the download should be aborted right now
virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable_ptr*/)
{ return true; }
, const std::string &/*description*/
) { return ABORT; }
+
+ /** Detail information about the result of a performed pkgGpgCheck.
+ *
+ * Userdata sent:
+ * \param "ResObject" ResObject::constPtr of the downloaded package (Package or SrcPackage)
+ * \param "Localpath" Pathname to downloaded package on disk
+ * \param "CheckPackageResult" RpmDb::CheckPackageResult of signature check
+ * \param "CheckPackageDetail" RpmDb::CheckPackageDetail logmessages of rpm signature check
+ *
+ * Userdata accepted:
+ * \param "Action" DownloadResolvableReport::Action user advice how to behave on error (ABORT).
+ * If you set just an empty value here, a default probelm report will be triggered.
+ *
+ * Legacy data:
+ * \param "Package" Replaced by \c "ResObject" in 16.10.0. Package::constPtr of the package (\c nullptr in case of a SrcPackage)
+ */
+ virtual void pkgGpgCheck( const UserData & userData_r = UserData() )
+ {}
+
virtual void finish(Resolvable::constPtr /*resolvable_ptr*/
, Error /*error*/
, const std::string &/*reason*/
) {}
};
+#if LEGACY(17)
// progress for converting the database
- struct ConvertDBReport : public callback::ReportBase
+ /// \deprecated Still used by y2-bindings in Code15 (libyzpp major 17)
+ struct ZYPP_DEPRECATED ConvertDBReport : public callback::ReportBase
{
enum Action {
ABORT, // abort and return error
- RETRY, // retry
- IGNORE // ignore the failure
+ RETRY, // retry
+ IGNORE // ignore the failure
};
enum Error {
NO_ERROR,
- FAILED // conversion failed
+ FAILED // conversion failed
};
- virtual void start(
- Pathname /*path*/
- ) {}
+ virtual void start( Pathname /*path*/ )
+ {}
- virtual bool progress(int /*value*/, Pathname /*path*/)
+ virtual bool progress( int/*value*/, Pathname/*path*/ )
{ return true; }
- virtual Action problem(
- Pathname /*path*/
- , Error /*error*/
- , const std::string &/*description*/
- ) { return ABORT; }
+ virtual Action problem( Pathname/*path*/, Error/*error*/, const std::string &/*description*/ )
+ { return ABORT; }
- virtual void finish(
- Pathname /*path*/
- , Error /*error*/
- , const std::string &/*reason*/
- ) {}
+ virtual void finish( Pathname/*path*/, Error/*error*/, const std::string &/*reason*/ )
+ {}
};
-
+#endif
/////////////////////////////////////////////////////////////////
} // namespace rpm
///////////////////////////////////////////////////////////////////
{
public:
/** message type (use like 'enum class \ref MsgType') */
- struct _MsgTypeDef {
+ struct EMsgTypeDef {
enum Enum { debug, info, warning, error, important, data };
};
- typedef base::EnumClass<_MsgTypeDef> MsgType; ///< 'enum class MsgType'
+ typedef base::EnumClass<EMsgTypeDef> MsgType; ///< 'enum class MsgType'
/** typsafe map of userdata */
typedef callback::UserData UserData;
static callback::SendReport<JobReport> & instance(); // impl in ZYppImpl.cc
/** send debug message text */
- static bool debug( const MessageString & msg_r, const UserData & userData_r = UserData() )
+ static bool debug( const std::string & msg_r, const UserData & userData_r = UserData() )
{ return instance()->message( MsgType::debug, msg_r, userData_r ); }
/** send message text */
- static bool info( const MessageString & msg_r, const UserData & userData_r = UserData() )
+ static bool info( const std::string & msg_r, const UserData & userData_r = UserData() )
{ return instance()->message( MsgType::info, msg_r, userData_r ); }
/** send warning text */
- static bool warning( const MessageString & msg_r, const UserData & userData_r = UserData() )
+ static bool warning( const std::string & msg_r, const UserData & userData_r = UserData() )
{ return instance()->message( MsgType::warning, msg_r, userData_r ); }
/** send error text */
- static bool error( const MessageString & msg_r, const UserData & userData_r = UserData() )
+ static bool error( const std::string & msg_r, const UserData & userData_r = UserData() )
{ return instance()->message( MsgType::error, msg_r, userData_r ); }
/** send important message text */
- static bool important( const MessageString & msg_r, const UserData & userData_r = UserData() )
+ static bool important( const std::string & msg_r, const UserData & userData_r = UserData() )
{ return instance()->message( MsgType::important, msg_r, userData_r ); }
/** send data message */
- static bool data( const MessageString & msg_r, const UserData & userData_r = UserData() )
+ static bool data( const std::string & msg_r, const UserData & userData_r = UserData() )
{ return instance()->message( MsgType::data, msg_r, userData_r ); }
//@}
};