libzypp  17.25.1
ZYppCallbacks.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_ZYPPCALLBACKS_H
13 #define ZYPP_ZYPPCALLBACKS_H
14 
15 #include <zypp/base/EnumClass.h>
16 #include <zypp/Callback.h>
17 #include <zypp/UserData.h>
18 #include <zypp/Resolvable.h>
19 #include <zypp/RepoInfo.h>
20 #include <zypp/Pathname.h>
21 #include <zypp/Package.h>
22 #include <zypp/Patch.h>
23 #include <zypp/Url.h>
24 #include <zypp/ProgressData.h>
26 
28 namespace zypp
29 {
30 
32  namespace sat
33  {
34  class Queue;
35  class FileConflicts;
36  } // namespace sat
38 
40  {
41  virtual void start( const ProgressData &/*task*/ )
42  {}
43 
44  virtual bool progress( const ProgressData &/*task*/ )
45  { return true; }
46 
47 // virtual Action problem(
48 // Repo /*source*/
49 // , Error /*error*/
50 // , const std::string &/*description*/ )
51 // { return ABORT; }
52 
53  virtual void finish( const ProgressData &/*task*/ )
54  {}
55 
56  };
57 
59  {
60 
63  : _fnc(fnc)
64  , _report(report)
65  , _first(true)
66  {
67  }
68 
69  bool operator()( const ProgressData &progress )
70  {
71  if ( _first )
72  {
73  _report->start(progress);
74  _first = false;
75  }
76 
77  bool value = _report->progress(progress);
78  if ( _fnc )
79  value &= _fnc(progress);
80 
81  if ( progress.finalReport() )
82  {
83  _report->finish(progress);
84  }
85  return value;
86  }
87 
90  bool _first;
91  };
92 
94 
95  namespace repo
96  {
97  // progress for downloading a resolvable
99  {
100  enum Action {
101  ABORT, // abort and return error
102  RETRY, // retry
103  IGNORE, // ignore this resolvable but continue
104  };
105 
106  enum Error {
108  NOT_FOUND, // the requested Url was not found
109  IO, // IO error
110  INVALID // the downloaded file is invalid
111  };
112 
116  virtual void infoInCache( Resolvable::constPtr res_r, const Pathname & localfile_r )
117  {}
118 
119  virtual void start(
120  Resolvable::constPtr /*resolvable_ptr*/
121  , const Url &/*url*/
122  ) {}
123 
124 
125  // Dowmload delta rpm:
126  // - path below url reported on start()
127  // - expected download size (0 if unknown)
128  // - download is interruptable
129  // - problems are just informal
130  virtual void startDeltaDownload( const Pathname & /*filename*/, const ByteCount & /*downloadsize*/ )
131  {}
132 
133  virtual bool progressDeltaDownload( int /*value*/ )
134  { return true; }
135 
136  virtual void problemDeltaDownload( const std::string &/*description*/ )
137  {}
138 
139  virtual void finishDeltaDownload()
140  {}
141 
142  // Apply delta rpm:
143  // - local path of downloaded delta
144  // - aplpy is not interruptable
145  // - problems are just informal
146  virtual void startDeltaApply( const Pathname & /*filename*/ )
147  {}
148 
149  virtual void progressDeltaApply( int /*value*/ )
150  {}
151 
152  virtual void problemDeltaApply( const std::string &/*description*/ )
153  {}
154 
155  virtual void finishDeltaApply()
156  {}
157 
158  // return false if the download should be aborted right now
159  virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable_ptr*/)
160  { return true; }
161 
162  virtual Action problem(
163  Resolvable::constPtr /*resolvable_ptr*/
164  , Error /*error*/
165  , const std::string &/*description*/
166  ) { return ABORT; }
167 
168 
184  virtual void pkgGpgCheck( const UserData & userData_r = UserData() )
185  {}
186 
187  virtual void finish(Resolvable::constPtr /*resolvable_ptr*/
188  , Error /*error*/
189  , const std::string &/*reason*/
190  ) {}
191  };
192 
193  // progress for probing a source
195  {
196  enum Action {
197  ABORT, // abort and return error
198  RETRY // retry
199  };
200 
201  enum Error {
203  NOT_FOUND, // the requested Url was not found
204  IO, // IO error
205  INVALID, // th source is invalid
207  };
208 
209  virtual void start(const Url &/*url*/) {}
210  virtual void failedProbe( const Url &/*url*/, const std::string &/*type*/ ) {}
211  virtual void successProbe( const Url &/*url*/, const std::string &/*type*/ ) {}
212  virtual void finish(const Url &/*url*/, Error /*error*/, const std::string &/*reason*/ ) {}
213 
214  virtual bool progress(const Url &/*url*/, int /*value*/)
215  { return true; }
216 
217  virtual Action problem( const Url &/*url*/, Error /*error*/, const std::string &/*description*/ ) { return ABORT; }
218  };
219 
221  {
222  enum Action {
223  ABORT, // abort and return error
224  RETRY, // retry
225  IGNORE // skip refresh, ignore failed refresh
226  };
227 
228  enum Error {
230  NOT_FOUND, // the requested Url was not found
231  IO, // IO error
233  INVALID, // th source is invali
235  };
236 
237  virtual void start( const zypp::Url &/*url*/ ) {}
238  virtual bool progress( int /*value*/ )
239  { return true; }
240 
241  virtual Action problem(
242  const zypp::Url &/*url*/
243  , Error /*error*/
244  , const std::string &/*description*/ )
245  { return ABORT; }
246 
247  virtual void finish(
248  const zypp::Url &/*url*/
249  , Error /*error*/
250  , const std::string &/*reason*/ )
251  {}
252  };
253 
255  {
256  enum Action {
257  ABORT, // abort and return error
258  RETRY, // retry
259  IGNORE // skip refresh, ignore failed refresh
260  };
261 
262  enum Error {
264  NOT_FOUND, // the requested Url was not found
265  IO, // IO error
266  INVALID // th source is invalid
267  };
268 
269  virtual void start( const ProgressData &/*task*/, const RepoInfo /*repo*/ ) {}
270  virtual bool progress( const ProgressData &/*task*/ )
271  { return true; }
272 
273  virtual Action problem(
274  Repository /*source*/
275  , Error /*error*/
276  , const std::string &/*description*/ )
277  { return ABORT; }
278 
279  virtual void finish(
280  Repository /*source*/
281  , const std::string &/*task*/
282  , Error /*error*/
283  , const std::string &/*reason*/ )
284  {}
285  };
286 
287 
289  } // namespace source
291 
293  namespace media
294  {
295  // media change request callback
297  {
298  enum Action {
299  ABORT, // abort and return error
300  RETRY, // retry
301  IGNORE, // ignore this media in future, not available anymore
302  IGNORE_ID, // ignore wrong medium id
303  CHANGE_URL, // change media URL
304  EJECT // eject the medium
305  };
306 
307  enum Error {
309  NOT_FOUND, // the medie not found at all
310  IO, // error accessing the media
311  INVALID, // media is broken
312  WRONG, // wrong media, need a different one
314  };
315 
330  Url & /* url (I/O parameter) */
331  , unsigned /*mediumNr*/
332  , const std::string & /* label */
333  , Error /*error*/
334  , const std::string & /*description*/
335  , const std::vector<std::string> & /* devices */
336  , unsigned int & /* dev_current (I/O param) */
337  ) { return ABORT; }
338  };
339 
346  {
348  ScopedDisableMediaChangeReport( bool condition_r = true );
349  private:
350  shared_ptr<callback::TempConnect<media::MediaChangeReport> > _guard;
351  };
352 
353  // progress for downloading a file
355  {
356  enum Action {
357  ABORT, // abort and return error
358  RETRY, // retry
359  IGNORE // ignore the failure
360  };
361 
362  enum Error {
364  NOT_FOUND, // the requested Url was not found
365  IO, // IO error
366  ACCESS_DENIED, // user authent. failed while accessing restricted file
367  ERROR // other error
368  };
369 
370  virtual void start( const Url &/*file*/, Pathname /*localfile*/ ) {}
371 
380  virtual bool progress(int /*value*/, const Url &/*file*/,
381  double dbps_avg = -1,
382  double dbps_current = -1)
383  { return true; }
384 
385  virtual Action problem(
386  const Url &/*file*/
387  , Error /*error*/
388  , const std::string &/*description*/
389  ) { return ABORT; }
390 
391  virtual void finish(
392  const Url &/*file*/
393  , Error /*error*/
394  , const std::string &/*reason*/
395  ) {}
396  };
397 
398  // authentication issues report
400  {
415  virtual bool prompt(const Url & /* url */,
416  const std::string & /* msg */,
417  AuthData & /* auth_data */)
418  {
419  return false;
420  }
421  };
422 
424  } // namespace media
426 
428  namespace target
429  {
432  {
436  virtual bool show( Patch::constPtr & /*patch*/ )
437  { return true; }
438  };
439 
445  {
446  enum Notify { OUTPUT, PING };
447  enum Action {
448  ABORT, // abort commit and return error
449  RETRY, // (re)try to execute this script
450  IGNORE // ignore any failue and continue
451  };
452 
455  virtual void start( const Package::constPtr & /*package*/,
456  const Pathname & /*script path*/ )
457  {}
462  virtual bool progress( Notify /*OUTPUT or PING*/,
463  const std::string & /*output*/ = std::string() )
464  { return true; }
466  virtual Action problem( const std::string & /*description*/ )
467  { return ABORT; }
469  virtual void finish()
470  {}
471  };
472 
484  {
489  virtual bool start( const ProgressData & progress_r )
490  { return true; }
491 
497  virtual bool progress( const ProgressData & progress_r, const sat::Queue & noFilelist_r )
498  { return true; }
499 
506  virtual bool result( const ProgressData & progress_r, const sat::Queue & noFilelist_r, const sat::FileConflicts & conflicts_r )
507  { return true; }
508  };
509 
510 
512  namespace rpm
513  {
514 
515  // progress for installing a resolvable
517  {
518  enum Action {
519  ABORT, // abort and return error
520  RETRY, // retry
521  IGNORE // ignore the failure
522  };
523 
524  enum Error {
526  NOT_FOUND, // the requested Url was not found
527  IO, // IO error
528  INVALID // th resolvable is invalid
529  };
530 
531  // the level of RPM pushing
533  enum RpmLevel {
537  };
538 
539  virtual void start(
540  Resolvable::constPtr /*resolvable*/
541  ) {}
542 
543  virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable*/)
544  { return true; }
545 
546  virtual Action problem(
547  Resolvable::constPtr /*resolvable*/
548  , Error /*error*/
549  , const std::string &/*description*/
550  , RpmLevel /*level*/
551  ) { return ABORT; }
552 
553  virtual void finish(
554  Resolvable::constPtr /*resolvable*/
555  , Error /*error*/
556  , const std::string &/*reason*/
557  , RpmLevel /*level*/
558  ) {}
559 
567  };
568 
569  // progress for removing a resolvable
571  {
572  enum Action {
573  ABORT, // abort and return error
574  RETRY, // retry
575  IGNORE // ignore the failure
576  };
577 
578  enum Error {
580  NOT_FOUND, // the requested Url was not found
581  IO, // IO error
582  INVALID // th resolvable is invalid
583  };
584 
585  virtual void start(
586  Resolvable::constPtr /*resolvable*/
587  ) {}
588 
589  virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable*/)
590  { return true; }
591 
592  virtual Action problem(
593  Resolvable::constPtr /*resolvable*/
594  , Error /*error*/
595  , const std::string &/*description*/
596  ) { return ABORT; }
597 
598  virtual void finish(
599  Resolvable::constPtr /*resolvable*/
600  , Error /*error*/
601  , const std::string &/*reason*/
602  ) {}
603 
608  };
609 
610  // progress for rebuilding the database
612  {
613  enum Action {
614  ABORT, // abort and return error
615  RETRY, // retry
616  IGNORE // ignore the failure
617  };
618 
619  enum Error {
621  FAILED // failed to rebuild
622  };
623 
624  virtual void start(Pathname /*path*/) {}
625 
626  virtual bool progress(int /*value*/, Pathname /*path*/)
627  { return true; }
628 
629  virtual Action problem(
630  Pathname /*path*/
631  , Error /*error*/
632  , const std::string &/*description*/
633  ) { return ABORT; }
634 
635  virtual void finish(
636  Pathname /*path*/
637  , Error /*error*/
638  , const std::string &/*reason*/
639  ) {}
640  };
641 
642 #if LEGACY(17)
643  // progress for converting the database
645  struct ZYPP_DEPRECATED ConvertDBReport : public callback::ReportBase
646  {
647  enum Action {
648  ABORT, // abort and return error
649  RETRY, // retry
650  IGNORE // ignore the failure
651  };
652 
653  enum Error {
654  NO_ERROR,
655  FAILED // conversion failed
656  };
657 
658  virtual void start( Pathname /*path*/ )
659  {}
660 
661  virtual bool progress( int/*value*/, Pathname/*path*/ )
662  { return true; }
663 
664  virtual Action problem( Pathname/*path*/, Error/*error*/, const std::string &/*description*/ )
665  { return ABORT; }
666 
667  virtual void finish( Pathname/*path*/, Error/*error*/, const std::string &/*reason*/ )
668  {}
669  };
670 #endif
671  } // namespace rpm
674 
676  } // namespace target
678 
679  class PoolQuery;
680 
688  {
692  enum Action {
696  };
697 
701  enum Error {
704  };
705 
709  virtual void start(
710  ) {}
711 
716  virtual bool progress(int /*value*/)
717  { return true; }
718 
723  virtual Action execute(
724  const PoolQuery& /*error*/
725  ) { return DELETE; }
726 
730  virtual void finish(
731  Error /*error*/
732  ) {}
733 
734  };
735 
740  {
745  enum Action {
749  };
750 
754  enum Error {
757  };
758 
766  };
767 
768  virtual void start() {}
769 
774  virtual bool progress()
775  { return true; }
776 
780  virtual Action conflict(
781  const PoolQuery&,
783  ) { return DELETE; }
784 
785  virtual void finish(
786  Error /*error*/
787  ) {}
788  };
789 
795  {
796  public:
798  struct EMsgTypeDef {
800  };
801  typedef base::EnumClass<EMsgTypeDef> MsgType;
802 
805 
806  public:
808  virtual bool message( MsgType type_r, const std::string & msg_r, const UserData & userData_r ) const
809  { return true; }
810 
811 
815  static callback::SendReport<JobReport> & instance(); // impl in ZYppImpl.cc
816 
818  static bool debug( const std::string & msg_r, const UserData & userData_r = UserData() )
819  { return instance()->message( MsgType::debug, msg_r, userData_r ); }
820 
822  static bool info( const std::string & msg_r, const UserData & userData_r = UserData() )
823  { return instance()->message( MsgType::info, msg_r, userData_r ); }
824 
826  static bool warning( const std::string & msg_r, const UserData & userData_r = UserData() )
827  { return instance()->message( MsgType::warning, msg_r, userData_r ); }
828 
830  static bool error( const std::string & msg_r, const UserData & userData_r = UserData() )
831  { return instance()->message( MsgType::error, msg_r, userData_r ); }
832 
834  static bool important( const std::string & msg_r, const UserData & userData_r = UserData() )
835  { return instance()->message( MsgType::important, msg_r, userData_r ); }
836 
838  static bool data( const std::string & msg_r, const UserData & userData_r = UserData() )
839  { return instance()->message( MsgType::data, msg_r, userData_r ); }
841  };
842 
843 
845 } // namespace zypp
847 
848 #endif // ZYPP_ZYPPCALLBACKS_H
zypp::media::AuthData
Class for handling media authentication data.
Definition: MediaUserAuth.h:30
zypp::target::rpm::RemoveResolvableReport::NOT_FOUND
Definition: ZYppCallbacks.h:580
zypp::repo::DownloadResolvableReport::progressDeltaApply
virtual void progressDeltaApply(int)
Definition: ZYppCallbacks.h:149
zypp::repo::RepoCreateReport::progress
virtual bool progress(int)
Definition: ZYppCallbacks.h:238
zypp::repo::DownloadResolvableReport::problem
virtual Action problem(Resolvable::constPtr, Error, const std::string &)
Definition: ZYppCallbacks.h:162
zypp::media::AuthenticationReport
Definition: ZYppCallbacks.h:399
zypp::repo::ProbeRepoReport::Action
Action
Definition: ZYppCallbacks.h:196
zypp::ProgressReport::start
virtual void start(const ProgressData &)
Definition: ZYppCallbacks.h:41
zypp::media::MediaChangeReport
Definition: ZYppCallbacks.h:296
zypp::media::MediaChangeReport::Error
Error
Definition: ZYppCallbacks.h:307
zypp::target::PatchScriptReport::problem
virtual Action problem(const std::string &)
Report error.
Definition: ZYppCallbacks.h:466
zypp::target::rpm::RebuildDBReport::Action
Action
Definition: ZYppCallbacks.h:613
zypp::repo::DownloadResolvableReport::start
virtual void start(Resolvable::constPtr, const Url &)
Definition: ZYppCallbacks.h:119
zypp::ProgressData::finalReport
bool finalReport() const
Definition: ProgressData.h:333
zypp::repo::DownloadResolvableReport::finish
virtual void finish(Resolvable::constPtr, Error, const std::string &)
Definition: ZYppCallbacks.h:187
zypp::target::rpm::InstallResolvableReport::problem
virtual Action problem(Resolvable::constPtr, Error, const std::string &, RpmLevel)
Definition: ZYppCallbacks.h:546
zypp::JobReport::EMsgTypeDef::warning
Definition: ZYppCallbacks.h:799
zypp::PoolQuery
Meta-data query API.
Definition: PoolQuery.h:90
zypp::repo::RepoReport::INVALID
Definition: ZYppCallbacks.h:266
zypp::repo::RepoReport::NOT_FOUND
Definition: ZYppCallbacks.h:264
zypp::repo::DownloadResolvableReport::pkgGpgCheck
virtual void pkgGpgCheck(const UserData &userData_r=UserData())
Detail information about the result of a performed pkgGpgCheck.
Definition: ZYppCallbacks.h:184
zypp::target::PatchScriptReport::RETRY
Definition: ZYppCallbacks.h:449
zypp::target::rpm::RemoveResolvableReport::IGNORE
Definition: ZYppCallbacks.h:575
zypp::callback::SendReport
Definition: Callback.h:236
zypp::RepoInfo
What is known about a repository.
Definition: RepoInfo.h:71
zypp::repo::RepoCreateReport::Action
Action
Definition: ZYppCallbacks.h:222
zypp::target::rpm::InstallResolvableReport::Error
Error
Definition: ZYppCallbacks.h:524
zypp::repo::ProbeRepoReport::start
virtual void start(const Url &)
Definition: ZYppCallbacks.h:209
zypp::repo::ProbeRepoReport::finish
virtual void finish(const Url &, Error, const std::string &)
Definition: ZYppCallbacks.h:212
zypp::media::MediaChangeReport::INVALID
Definition: ZYppCallbacks.h:311
zypp::target::PatchScriptReport::Action
Action
Definition: ZYppCallbacks.h:447
zypp::JobReport::important
static bool important(const std::string &msg_r, const UserData &userData_r=UserData())
send important message text
Definition: ZYppCallbacks.h:834
zypp::target::PatchScriptReport::start
virtual void start(const Package::constPtr &, const Pathname &)
Start executing the script provided by package.
Definition: ZYppCallbacks.h:455
zypp::repo::DownloadResolvableReport::finishDeltaDownload
virtual void finishDeltaDownload()
Definition: ZYppCallbacks.h:139
zypp::ProgressReportAdaptor::_first
bool _first
Definition: ZYppCallbacks.h:90
zypp::target::rpm::RebuildDBReport::RETRY
Definition: ZYppCallbacks.h:615
zypp::SavingLocksReport::progress
virtual bool progress()
merging still live
Definition: ZYppCallbacks.h:774
zypp::repo::RepoCreateReport::UNKNOWN
Definition: ZYppCallbacks.h:234
zypp::Resolvable::constPtr
TraitsType::constPtrType constPtr
Definition: Resolvable.h:59
zypp::repo::DownloadResolvableReport::NO_ERROR
Definition: ZYppCallbacks.h:107
zypp::repo::RepoCreateReport::NO_ERROR
Definition: ZYppCallbacks.h:229
zypp::JobReport::EMsgTypeDef::info
Definition: ZYppCallbacks.h:799
zypp::repo::RepoCreateReport::NOT_FOUND
Definition: ZYppCallbacks.h:230
zypp::io::Error
Definition: IOTools.h:58
zypp::callback::ReportBase
Definition: Callback.h:149
zypp::target::rpm::RemoveResolvableReport::IO
Definition: ZYppCallbacks.h:581
zypp::media::MediaChangeReport::IGNORE_ID
Definition: ZYppCallbacks.h:302
zypp::ProgressReportAdaptor
Definition: ZYppCallbacks.h:58
zypp::target::rpm::InstallResolvableReport::NO_ERROR
Definition: ZYppCallbacks.h:525
zypp::repo::RepoReport::RETRY
Definition: ZYppCallbacks.h:258
zypp::target::rpm::RebuildDBReport::progress
virtual bool progress(int, Pathname)
Definition: ZYppCallbacks.h:626
zypp::repo::DownloadResolvableReport::RETRY
Definition: ZYppCallbacks.h:102
zypp::Patch::constPtr
TraitsType::constPtrType constPtr
Definition: Patch.h:43
zypp::repo::DownloadResolvableReport::INVALID
Definition: ZYppCallbacks.h:110
zypp::CleanEmptyLocksReport::finish
virtual void finish(Error)
cleaning is done
Definition: ZYppCallbacks.h:730
zypp::target::rpm::InstallResolvableReport::RPM
Definition: ZYppCallbacks.h:534
zypp::JobReport::instance
static callback::SendReport< JobReport > & instance()
Singleton sender instance.
Definition: ZYppImpl.cc:51
zypp::JobReport::info
static bool info(const std::string &msg_r, const UserData &userData_r=UserData())
send message text
Definition: ZYppCallbacks.h:822
EnumClass.h
zypp::target::rpm::RemoveResolvableReport::progress
virtual bool progress(int, Resolvable::constPtr)
Definition: ZYppCallbacks.h:589
zypp::repo::ProbeRepoReport::problem
virtual Action problem(const Url &, Error, const std::string &)
Definition: ZYppCallbacks.h:217
zypp::target::PatchScriptReport::PING
Definition: ZYppCallbacks.h:446
zypp::target::rpm::InstallResolvableReport::INVALID
Definition: ZYppCallbacks.h:528
zypp::target::rpm::RemoveResolvableReport::NO_ERROR
Definition: ZYppCallbacks.h:579
zypp::CleanEmptyLocksReport::Action
Action
action performed by cleaning api to specific lock
Definition: ZYppCallbacks.h:692
zypp::Package::constPtr
TraitsType::constPtrType constPtr
Definition: Package.h:38
zypp::media::DownloadProgressReport::RETRY
Definition: ZYppCallbacks.h:358
zypp::repo::ProbeRepoReport::UNKNOWN
Definition: ZYppCallbacks.h:206
zypp::media::MediaChangeReport::IO
Definition: ZYppCallbacks.h:310
Pathname.h
zypp::repo::RepoCreateReport::finish
virtual void finish(const zypp::Url &, Error, const std::string &)
Definition: ZYppCallbacks.h:247
zypp::repo::RepoReport::NO_ERROR
Definition: ZYppCallbacks.h:263
zypp::SavingLocksReport::IGNORE
skip conflict lock
Definition: ZYppCallbacks.h:748
zypp::target::rpm::InstallResolvableReport::NOT_FOUND
Definition: ZYppCallbacks.h:526
zypp::target::rpm::RebuildDBReport::NO_ERROR
Definition: ZYppCallbacks.h:620
report
callback::SendReport< DownloadProgressReport > * report
Definition: MediaCurl.cc:70
zypp::SavingLocksReport::INTERSECT
locks lock some file and unlocking lock unlock only part of iti, so removing old lock can unlock more...
Definition: ZYppCallbacks.h:764
zypp::target::rpm::InstallResolvableReport::RETRY
Definition: ZYppCallbacks.h:520
zypp::JobReport::MsgType
base::EnumClass< EMsgTypeDef > MsgType
'enum class MsgType'
Definition: ZYppCallbacks.h:801
zypp::target::PatchScriptReport::finish
virtual void finish()
Report success.
Definition: ZYppCallbacks.h:469
zypp::repo::ProbeRepoReport::successProbe
virtual void successProbe(const Url &, const std::string &)
Definition: ZYppCallbacks.h:211
zypp::repo::DownloadResolvableReport::NOT_FOUND
Definition: ZYppCallbacks.h:108
zypp::callback::UserData
Typesafe passing of user data via callbacks.
Definition: UserData.h:38
zypp::ProgressReport::finish
virtual void finish(const ProgressData &)
Definition: ZYppCallbacks.h:53
zypp::repo::DownloadResolvableReport::startDeltaDownload
virtual void startDeltaDownload(const Pathname &, const ByteCount &)
Definition: ZYppCallbacks.h:130
zypp::media::MediaChangeReport::IGNORE
Definition: ZYppCallbacks.h:301
zypp::ByteCount
Store and operate with byte count.
Definition: ByteCount.h:30
zypp::JobReport::EMsgTypeDef::debug
Definition: ZYppCallbacks.h:799
zypp::media::DownloadProgressReport::NO_ERROR
Definition: ZYppCallbacks.h:363
zypp::repo::DownloadResolvableReport::progressDeltaDownload
virtual bool progressDeltaDownload(int)
Definition: ZYppCallbacks.h:133
zypp::repo::RepoCreateReport::Error
Error
Definition: ZYppCallbacks.h:228
Callback.h
zypp::target::PatchScriptReport::ABORT
Definition: ZYppCallbacks.h:448
zypp::media::DownloadProgressReport::IO
Definition: ZYppCallbacks.h:365
zypp::callback::ReportBase::UserData
callback::UserData UserData
Definition: Callback.h:151
zypp::target::rpm::RebuildDBReport::start
virtual void start(Pathname)
Definition: ZYppCallbacks.h:624
zypp::target::rpm::InstallResolvableReport::RPM_NODEPS
Definition: ZYppCallbacks.h:535
zypp::SavingLocksReport::DELETE
delete conflicted lock
Definition: ZYppCallbacks.h:747
zypp::target::FindFileConflictstReport::progress
virtual bool progress(const ProgressData &progress_r, const sat::Queue &noFilelist_r)
Definition: ZYppCallbacks.h:497
zypp::target::PatchMessageReport
Request to display the pre commit message of a patch.
Definition: ZYppCallbacks.h:431
zypp::target::rpm::RebuildDBReport
Definition: ZYppCallbacks.h:611
zypp::target::rpm::InstallResolvableReport::IGNORE
Definition: ZYppCallbacks.h:521
Url.h
Package.h
zypp::SavingLocksReport::Error
Error
result of merging
Definition: ZYppCallbacks.h:754
zypp::JobReport::data
static bool data(const std::string &msg_r, const UserData &userData_r=UserData())
send data message
Definition: ZYppCallbacks.h:838
RepoInfo.h
zypp::SavingLocksReport::ABORTED
cleaning aborted by user
Definition: ZYppCallbacks.h:756
zypp::repo::ProbeRepoReport::NO_ERROR
Definition: ZYppCallbacks.h:202
zypp::SavingLocksReport::Action
Action
action for old lock which is in conflict
Definition: ZYppCallbacks.h:745
zypp::repo::RepoReport::progress
virtual bool progress(const ProgressData &)
Definition: ZYppCallbacks.h:270
zypp::repo::RepoCreateReport
Definition: ZYppCallbacks.h:220
zypp::target::rpm::RemoveResolvableReport::INVALID
Definition: ZYppCallbacks.h:582
zypp::JobReport
Generic report for sending messages.
Definition: ZYppCallbacks.h:794
zypp::ProgressReportAdaptor::_fnc
ProgressData::ReceiverFnc _fnc
Definition: ZYppCallbacks.h:88
zypp::target::rpm::InstallResolvableReport::ABORT
Definition: ZYppCallbacks.h:519
zypp::media::MediaChangeReport::CHANGE_URL
Definition: ZYppCallbacks.h:303
zypp::repo::DownloadResolvableReport::Error
Error
Definition: ZYppCallbacks.h:106
zypp::repo::RepoReport::problem
virtual Action problem(Repository, Error, const std::string &)
Definition: ZYppCallbacks.h:273
zypp::repo::RepoReport::Action
Action
Definition: ZYppCallbacks.h:256
zypp::target::rpm::InstallResolvableReport::progress
virtual bool progress(int, Resolvable::constPtr)
Definition: ZYppCallbacks.h:543
zypp::media::ScopedDisableMediaChangeReport::ScopedDisableMediaChangeReport
ScopedDisableMediaChangeReport(bool condition_r=true)
Disbale MediaChangeReport if condition_r is true.
Definition: ZYppImpl.cc:38
zypp::repo::RepoCreateReport::INVALID
Definition: ZYppCallbacks.h:233
zypp::SavingLocksReport::SAME_RESULTS
locks lock same item in pool but his parameters is different
Definition: ZYppCallbacks.h:763
zypp::CleanEmptyLocksReport::IGNORE
skip empty lock
Definition: ZYppCallbacks.h:695
zypp::callback::UserData::ContentType
zypp::ContentType ContentType
Definition: UserData.h:50
zypp::target::rpm::RemoveResolvableReport::problem
virtual Action problem(Resolvable::constPtr, Error, const std::string &)
Definition: ZYppCallbacks.h:592
zypp::repo::ProbeRepoReport::progress
virtual bool progress(const Url &, int)
Definition: ZYppCallbacks.h:214
zypp::repo::DownloadResolvableReport::IO
Definition: ZYppCallbacks.h:109
zypp::CleanEmptyLocksReport
Callback for cleaning locks which doesn't lock anything in pool.
Definition: ZYppCallbacks.h:687
zypp::target::rpm::RebuildDBReport::problem
virtual Action problem(Pathname, Error, const std::string &)
Definition: ZYppCallbacks.h:629
zypp::ContentType
Mime type like 'type/subtype' classification of content.
Definition: ContentType.h:29
zypp::SavingLocksReport::conflict
virtual Action conflict(const PoolQuery &, ConflictState)
When user unlock something which is locked by non-identical query.
Definition: ZYppCallbacks.h:780
zypp::SavingLocksReport::ConflictState
ConflictState
type of conflict of old and new lock
Definition: ZYppCallbacks.h:762
zypp::target::rpm::RemoveResolvableReport
Definition: ZYppCallbacks.h:570
zypp::target::rpm::RebuildDBReport::IGNORE
Definition: ZYppCallbacks.h:616
zypp::target::rpm::RemoveResolvableReport::ABORT
Definition: ZYppCallbacks.h:573
zypp::target::rpm::InstallResolvableReport::RpmLevel
RpmLevel
Definition: ZYppCallbacks.h:533
zypp::repo::RepoReport::ABORT
Definition: ZYppCallbacks.h:257
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
zypp::target::PatchScriptReport
Indicate execution of a patch script.
Definition: ZYppCallbacks.h:444
zypp::target::PatchScriptReport::progress
virtual bool progress(Notify, const std::string &=std::string())
Progress provides the script output.
Definition: ZYppCallbacks.h:462
zypp::media::MediaChangeReport::EJECT
Definition: ZYppCallbacks.h:304
zypp::JobReport::debug
static bool debug(const std::string &msg_r, const UserData &userData_r=UserData())
send debug message text
Definition: ZYppCallbacks.h:818
zypp::media::DownloadProgressReport::ACCESS_DENIED
Definition: ZYppCallbacks.h:366
UserData.h
zypp::target::FindFileConflictstReport::start
virtual bool start(const ProgressData &progress_r)
Definition: ZYppCallbacks.h:489
zypp::JobReport::EMsgTypeDef::error
Definition: ZYppCallbacks.h:799
zypp::media::DownloadProgressReport::NOT_FOUND
Definition: ZYppCallbacks.h:364
zypp::target::rpm::RemoveResolvableReport::RETRY
Definition: ZYppCallbacks.h:574
zypp::repo::RepoReport::IO
Definition: ZYppCallbacks.h:265
zypp::target::rpm::RebuildDBReport::FAILED
Definition: ZYppCallbacks.h:621
zypp::repo::RepoCreateReport::REJECTED
Definition: ZYppCallbacks.h:232
zypp::sat::Queue
Libsolv Id queue wrapper.
Definition: Queue.h:34
zypp::JobReport::EMsgTypeDef
message type (use like 'enum class MsgType')
Definition: ZYppCallbacks.h:798
zypp::ProgressReportAdaptor::operator()
bool operator()(const ProgressData &progress)
Definition: ZYppCallbacks.h:69
zypp::repo::DownloadResolvableReport::Action
Action
Definition: ZYppCallbacks.h:100
zypp::CleanEmptyLocksReport::ABORTED
cleaning aborted by user
Definition: ZYppCallbacks.h:703
zypp::media::MediaChangeReport::Action
Action
Definition: ZYppCallbacks.h:298
zypp::repo::RepoReport::start
virtual void start(const ProgressData &, const RepoInfo)
Definition: ZYppCallbacks.h:269
zypp::target::PatchScriptReport::OUTPUT
Definition: ZYppCallbacks.h:446
Resolvable.h
zypp::repo::RepoCreateReport::start
virtual void start(const zypp::Url &)
Definition: ZYppCallbacks.h:237
zypp::repo::RepoReport::finish
virtual void finish(Repository, const std::string &, Error, const std::string &)
Definition: ZYppCallbacks.h:279
zypp::repo::ProbeRepoReport
Definition: ZYppCallbacks.h:194
zypp::CleanEmptyLocksReport::Error
Error
result of cleaning
Definition: ZYppCallbacks.h:701
zypp::target::rpm::RebuildDBReport::Error
Error
Definition: ZYppCallbacks.h:619
zypp::target::rpm::RemoveResolvableReport::Action
Action
Definition: ZYppCallbacks.h:572
zypp::repo::DownloadResolvableReport::problemDeltaApply
virtual void problemDeltaApply(const std::string &)
Definition: ZYppCallbacks.h:152
zypp::SavingLocksReport::ABORT
abort and return error
Definition: ZYppCallbacks.h:746
zypp::CleanEmptyLocksReport::start
virtual void start()
cleaning is started
Definition: ZYppCallbacks.h:709
zypp::media::DownloadProgressReport::problem
virtual Action problem(const Url &, Error, const std::string &)
Definition: ZYppCallbacks.h:385
zypp::ProgressReportAdaptor::ProgressReportAdaptor
ProgressReportAdaptor(const ProgressData::ReceiverFnc &fnc, callback::SendReport< ProgressReport > &report)
Definition: ZYppCallbacks.h:61
zypp::target::rpm::InstallResolvableReport
Definition: ZYppCallbacks.h:516
zypp::media::MediaChangeReport::ABORT
Definition: ZYppCallbacks.h:299
zypp::CleanEmptyLocksReport::DELETE
delete empty lock
Definition: ZYppCallbacks.h:694
zypp::SavingLocksReport
this callback handles merging old locks with newly added or removed
Definition: ZYppCallbacks.h:739
zypp::ProgressReport
Definition: ZYppCallbacks.h:39
zypp::repo::ProbeRepoReport::INVALID
Definition: ZYppCallbacks.h:205
zypp::CleanEmptyLocksReport::progress
virtual bool progress(int)
progress of cleaning specifies in percents
Definition: ZYppCallbacks.h:716
zypp::target::PatchScriptReport::Notify
Notify
Definition: ZYppCallbacks.h:446
zypp::target::rpm::InstallResolvableReport::finish
virtual void finish(Resolvable::constPtr, Error, const std::string &, RpmLevel)
Definition: ZYppCallbacks.h:553
zypp::media::DownloadProgressReport::start
virtual void start(const Url &, Pathname)
Definition: ZYppCallbacks.h:370
zypp::target::PatchMessageReport::show
virtual bool show(Patch::constPtr &)
Display patch->message().
Definition: ZYppCallbacks.h:436
zypp::media::MediaChangeReport::IO_SOFT
IO error which can happen on worse connection like timeout exceed.
Definition: ZYppCallbacks.h:313
zypp::target::PatchScriptReport::IGNORE
Definition: ZYppCallbacks.h:450
zypp::media::ScopedDisableMediaChangeReport
Temporarily disable MediaChangeReport Sometimes helpful to suppress interactive messages connected to...
Definition: ZYppCallbacks.h:345
zypp::ProgressData::ReceiverFnc
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
Definition: ProgressData.h:139
zypp::repo::DownloadResolvableReport::problemDeltaDownload
virtual void problemDeltaDownload(const std::string &)
Definition: ZYppCallbacks.h:136
zypp::media::MediaChangeReport::NOT_FOUND
Definition: ZYppCallbacks.h:309
zypp::sat::FileConflicts
Libsolv queue representing file conflicts.
Definition: FileConflicts.h:30
zypp::JobReport::EMsgTypeDef::important
Definition: ZYppCallbacks.h:799
zypp::repo::DownloadResolvableReport
Definition: ZYppCallbacks.h:98
ProgressData.h
zypp::target::FindFileConflictstReport::result
virtual bool result(const ProgressData &progress_r, const sat::Queue &noFilelist_r, const sat::FileConflicts &conflicts_r)
Definition: ZYppCallbacks.h:506
zypp::target::FindFileConflictstReport
Check for package file conflicts in commit (after download)
Definition: ZYppCallbacks.h:483
zypp::repo::DownloadResolvableReport::IGNORE
Definition: ZYppCallbacks.h:103
zypp::media::DownloadProgressReport::Action
Action
Definition: ZYppCallbacks.h:356
zypp::repo::ProbeRepoReport::failedProbe
virtual void failedProbe(const Url &, const std::string &)
Definition: ZYppCallbacks.h:210
zypp::SavingLocksReport::NO_ERROR
no problem
Definition: ZYppCallbacks.h:755
zypp::media::MediaChangeReport::RETRY
Definition: ZYppCallbacks.h:300
zypp::media::ScopedDisableMediaChangeReport::_guard
shared_ptr< callback::TempConnect< media::MediaChangeReport > > _guard
Definition: ZYppCallbacks.h:350
zypp::repo::RepoReport::IGNORE
Definition: ZYppCallbacks.h:259
zypp::SavingLocksReport::finish
virtual void finish(Error)
Definition: ZYppCallbacks.h:785
zypp::JobReport::message
virtual bool message(MsgType type_r, const std::string &msg_r, const UserData &userData_r) const
Send a ready to show message text.
Definition: ZYppCallbacks.h:808
zypp::filesystem::Pathname
Pathname.
Definition: Pathname.h:44
zypp::media::DownloadProgressReport::IGNORE
Definition: ZYppCallbacks.h:359
zypp::target::rpm::RemoveResolvableReport::contentRpmout
static const UserData::ContentType contentRpmout
"rpmout/removepkg": Additional rpm output (sent immediately).
Definition: ZYppCallbacks.h:607
zypp::media::DownloadProgressReport::ABORT
Definition: ZYppCallbacks.h:357
zypp::JobReport::warning
static bool warning(const std::string &msg_r, const UserData &userData_r=UserData())
send warning text
Definition: ZYppCallbacks.h:826
zypp::repo::RepoCreateReport::problem
virtual Action problem(const zypp::Url &, Error, const std::string &)
Definition: ZYppCallbacks.h:241
zypp::media::AuthenticationReport::prompt
virtual bool prompt(const Url &, const std::string &, AuthData &)
Prompt for authentication data.
Definition: ZYppCallbacks.h:415
zypp::repo::ProbeRepoReport::RETRY
Definition: ZYppCallbacks.h:198
zypp::media::DownloadProgressReport::progress
virtual bool progress(int, const Url &, double dbps_avg=-1, double dbps_current=-1)
Download progress.
Definition: ZYppCallbacks.h:380
zypp::repo::RepoCreateReport::RETRY
Definition: ZYppCallbacks.h:224
zypp::target::rpm::InstallResolvableReport::contentRpmout
static const UserData::ContentType contentRpmout
"rpmout/installpkg": Additional rpm output (sent immediately).
Definition: ZYppCallbacks.h:566
zypp::target::rpm::InstallResolvableReport::RPM_NODEPS_FORCE
only this one used
Definition: ZYppCallbacks.h:536
zypp::target::rpm::InstallResolvableReport::Action
Action
Definition: ZYppCallbacks.h:518
zypp::JobReport::EMsgTypeDef::data
Definition: ZYppCallbacks.h:799
zypp::CleanEmptyLocksReport::NO_ERROR
no problem
Definition: ZYppCallbacks.h:702
zypp::repo::RepoCreateReport::IO
Definition: ZYppCallbacks.h:231
zypp::repo::ProbeRepoReport::ABORT
Definition: ZYppCallbacks.h:197
zypp::repo::ProbeRepoReport::Error
Error
Definition: ZYppCallbacks.h:201
zypp::repo::DownloadResolvableReport::startDeltaApply
virtual void startDeltaApply(const Pathname &)
Definition: ZYppCallbacks.h:146
zypp::SavingLocksReport::start
virtual void start()
Definition: ZYppCallbacks.h:768
zypp::target::rpm::RebuildDBReport::ABORT
Definition: ZYppCallbacks.h:614
zypp::ProgressReport::progress
virtual bool progress(const ProgressData &)
Definition: ZYppCallbacks.h:44
zypp::repo::DownloadResolvableReport::ABORT
Definition: ZYppCallbacks.h:101
MediaUserAuth.h
zypp::target::rpm::RemoveResolvableReport::start
virtual void start(Resolvable::constPtr)
Definition: ZYppCallbacks.h:585
zypp::media::MediaChangeReport::NO_ERROR
Definition: ZYppCallbacks.h:308
zypp::repo::RepoCreateReport::ABORT
Definition: ZYppCallbacks.h:223
zypp::Url
Url manipulation class.
Definition: Url.h:87
zypp::media::DownloadProgressReport::Error
Error
Definition: ZYppCallbacks.h:362
zypp::repo::DownloadResolvableReport::progress
virtual bool progress(int, Resolvable::constPtr)
Definition: ZYppCallbacks.h:159
zypp::Repository
Definition: Repository.h:39
zypp::repo::RepoReport::Error
Error
Definition: ZYppCallbacks.h:262
zypp::CleanEmptyLocksReport::execute
virtual Action execute(const PoolQuery &)
When find empty lock ask what to do with it.
Definition: ZYppCallbacks.h:723
zypp::media::DownloadProgressReport::ERROR
Definition: ZYppCallbacks.h:367
zypp::repo::DownloadResolvableReport::infoInCache
virtual void infoInCache(Resolvable::constPtr res_r, const Pathname &localfile_r)
Hint that package is available in the local cache (no download needed).
Definition: ZYppCallbacks.h:116
zypp::ProgressReportAdaptor::_report
callback::SendReport< ProgressReport > & _report
Definition: ZYppCallbacks.h:89
zypp::media::DownloadProgressReport::finish
virtual void finish(const Url &, Error, const std::string &)
Definition: ZYppCallbacks.h:391
zypp::media::MediaChangeReport::WRONG
Definition: ZYppCallbacks.h:312
zypp::repo::ProbeRepoReport::IO
Definition: ZYppCallbacks.h:204
zypp::JobReport::UserData
callback::UserData UserData
typsafe map of userdata
Definition: ZYppCallbacks.h:804
zypp::repo::ProbeRepoReport::NOT_FOUND
Definition: ZYppCallbacks.h:203
zypp::target::rpm::InstallResolvableReport::IO
Definition: ZYppCallbacks.h:527
zypp::repo::DownloadResolvableReport::finishDeltaApply
virtual void finishDeltaApply()
Definition: ZYppCallbacks.h:155
zypp::CleanEmptyLocksReport::ABORT
abort and return error
Definition: ZYppCallbacks.h:693
zypp::JobReport::EMsgTypeDef::Enum
Enum
Definition: ZYppCallbacks.h:799
zypp::repo::RepoCreateReport::IGNORE
Definition: ZYppCallbacks.h:225
zypp::target::rpm::InstallResolvableReport::start
virtual void start(Resolvable::constPtr)
Definition: ZYppCallbacks.h:539
Patch.h
zypp::media::DownloadProgressReport
Definition: ZYppCallbacks.h:354
zypp::media::MediaChangeReport::requestMedia
virtual Action requestMedia(Url &, unsigned, const std::string &, Error, const std::string &, const std::vector< std::string > &, unsigned int &)
Definition: ZYppCallbacks.h:329
zypp::ProgressData
Maintain [min,max] and counter (value) for progress counting.
Definition: ProgressData.h:130
zypp::target::rpm::RemoveResolvableReport::Error
Error
Definition: ZYppCallbacks.h:578
zypp::target::rpm::RebuildDBReport::finish
virtual void finish(Pathname, Error, const std::string &)
Definition: ZYppCallbacks.h:635
zypp::repo::RepoReport
Definition: ZYppCallbacks.h:254
zypp::JobReport::error
static bool error(const std::string &msg_r, const UserData &userData_r=UserData())
send error text
Definition: ZYppCallbacks.h:830
zypp::target::rpm::RemoveResolvableReport::finish
virtual void finish(Resolvable::constPtr, Error, const std::string &)
Definition: ZYppCallbacks.h:598