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