libzypp  17.32.4
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-core/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-core/ui/ProgressData>
25 #include <zypp-media/auth/AuthData>
26 #include <zypp-curl/auth/CurlAuthData> // bsc#1194597: CurlAuthData must be exposed for zypper
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 
63  : _report(report)
64  , _first(true)
65  {}
66 
69  : _fnc(fnc)
70  , _report(report)
71  , _first(true)
72  {}
73 
74  bool operator()( const ProgressData &progress )
75  {
76  if ( _first )
77  {
78  _report->start(progress);
79  _first = false;
80  }
81 
82  bool value = _report->progress(progress);
83  if ( _fnc )
84  value &= _fnc(progress);
85 
86  if ( progress.finalReport() )
87  {
88  _report->finish(progress);
89  }
90  return value;
91  }
92 
95  bool _first;
96  };
97 
99 
100  namespace repo
101  {
102  // progress for downloading a resolvable
104  {
105  enum Action {
106  ABORT, // abort and return error
107  RETRY, // retry
108  IGNORE, // ignore this resolvable but continue
109  };
110 
111  enum Error {
113  NOT_FOUND, // the requested Url was not found
114  IO, // IO error
115  INVALID // the downloaded file is invalid
116  };
117 
121  virtual void infoInCache( Resolvable::constPtr res_r, const Pathname & localfile_r )
122  {}
123 
124  virtual void start(
125  Resolvable::constPtr /*resolvable_ptr*/
126  , const Url &/*url*/
127  ) {}
128 
129 
130  // Dowmload delta rpm:
131  // - path below url reported on start()
132  // - expected download size (0 if unknown)
133  // - download is interruptable
134  // - problems are just informal
135  virtual void startDeltaDownload( const Pathname & /*filename*/, const ByteCount & /*downloadsize*/ )
136  {}
137 
138  virtual bool progressDeltaDownload( int /*value*/ )
139  { return true; }
140 
141  virtual void problemDeltaDownload( const std::string &/*description*/ )
142  {}
143 
144  virtual void finishDeltaDownload()
145  {}
146 
147  // Apply delta rpm:
148  // - local path of downloaded delta
149  // - aplpy is not interruptable
150  // - problems are just informal
151  virtual void startDeltaApply( const Pathname & /*filename*/ )
152  {}
153 
154  virtual void progressDeltaApply( int /*value*/ )
155  {}
156 
157  virtual void problemDeltaApply( const std::string &/*description*/ )
158  {}
159 
160  virtual void finishDeltaApply()
161  {}
162 
163  // return false if the download should be aborted right now
164  virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable_ptr*/)
165  { return true; }
166 
167  virtual Action problem(
168  Resolvable::constPtr /*resolvable_ptr*/
169  , Error /*error*/
170  , const std::string &/*description*/
171  ) { return ABORT; }
172 
173 
189  virtual void pkgGpgCheck( const UserData & userData_r = UserData() )
190  {}
191 
192  virtual void finish(Resolvable::constPtr /*resolvable_ptr*/
193  , Error /*error*/
194  , const std::string &/*reason*/
195  ) {}
196  };
197 
198  // progress for probing a source
200  {
201  enum Action {
202  ABORT, // abort and return error
203  RETRY // retry
204  };
205 
206  enum Error {
208  NOT_FOUND, // the requested Url was not found
209  IO, // IO error
210  INVALID, // th source is invalid
212  };
213 
214  virtual void start(const Url &/*url*/) {}
215  virtual void failedProbe( const Url &/*url*/, const std::string &/*type*/ ) {}
216  virtual void successProbe( const Url &/*url*/, const std::string &/*type*/ ) {}
217  virtual void finish(const Url &/*url*/, Error /*error*/, const std::string &/*reason*/ ) {}
218 
219  virtual bool progress(const Url &/*url*/, int /*value*/)
220  { return true; }
221 
222  virtual Action problem( const Url &/*url*/, Error /*error*/, const std::string &/*description*/ ) { return ABORT; }
223  };
224 
226  {
227  enum Action {
228  ABORT, // abort and return error
229  RETRY, // retry
230  IGNORE // skip refresh, ignore failed refresh
231  };
232 
233  enum Error {
235  NOT_FOUND, // the requested Url was not found
236  IO, // IO error
238  INVALID, // th source is invali
240  };
241 
242  virtual void start( const zypp::Url &/*url*/ ) {}
243  virtual bool progress( int /*value*/ )
244  { return true; }
245 
246  virtual Action problem(
247  const zypp::Url &/*url*/
248  , Error /*error*/
249  , const std::string &/*description*/ )
250  { return ABORT; }
251 
252  virtual void finish(
253  const zypp::Url &/*url*/
254  , Error /*error*/
255  , const std::string &/*reason*/ )
256  {}
257  };
258 
260  {
261  enum Action {
262  ABORT, // abort and return error
263  RETRY, // retry
264  IGNORE // skip refresh, ignore failed refresh
265  };
266 
267  enum Error {
269  NOT_FOUND, // the requested Url was not found
270  IO, // IO error
271  INVALID // th source is invalid
272  };
273 
274  virtual void start( const ProgressData &/*task*/, const RepoInfo /*repo*/ ) {}
275  virtual bool progress( const ProgressData &/*task*/ )
276  { return true; }
277 
278  virtual Action problem(
279  Repository /*source*/
280  , Error /*error*/
281  , const std::string &/*description*/ )
282  { return ABORT; }
283 
284  virtual void finish(
285  Repository /*source*/
286  , const std::string &/*task*/
287  , Error /*error*/
288  , const std::string &/*reason*/ )
289  {}
290  };
291 
292 
294  } // namespace source
296 
298  namespace media
299  {
300  // media change request callback
302  {
303  enum Action {
304  ABORT, // abort and return error
305  RETRY, // retry
306  IGNORE, // ignore this media in future, not available anymore
307  IGNORE_ID, // ignore wrong medium id
308  CHANGE_URL, // change media URL
309  EJECT // eject the medium
310  };
311 
312  enum Error {
314  NOT_FOUND, // the medie not found at all
315  IO, // error accessing the media
316  INVALID, // media is broken
317  WRONG, // wrong media, need a different one
319  };
320 
335  Url & /* url (I/O parameter) */
336  , unsigned /*mediumNr*/
337  , const std::string & /* label */
338  , Error /*error*/
339  , const std::string & /*description*/
340  , const std::vector<std::string> & /* devices */
341  , unsigned int & /* dev_current (I/O param) */
342  ) { return ABORT; }
343  };
344 
351  {
353  ScopedDisableMediaChangeReport( bool condition_r = true );
354  private:
355  shared_ptr<callback::TempConnect<media::MediaChangeReport> > _guard;
356  };
357 
358  // progress for downloading a file
360  {
361  enum Action {
362  ABORT, // abort and return error
363  RETRY, // retry
364  IGNORE // ignore the failure
365  };
366 
367  enum Error {
369  NOT_FOUND, // the requested Url was not found
370  IO, // IO error
371  ACCESS_DENIED, // user authent. failed while accessing restricted file
372  ERROR // other error
373  };
374 
375  virtual void start( const Url &/*file*/, Pathname /*localfile*/ ) {}
376 
385  virtual bool progress(int /*value*/, const Url &/*file*/,
386  double dbps_avg = -1,
387  double dbps_current = -1)
388  { return true; }
389 
390  virtual Action problem(
391  const Url &/*file*/
392  , Error /*error*/
393  , const std::string &/*description*/
394  ) { return ABORT; }
395 
396  virtual void finish(
397  const Url &/*file*/
398  , Error /*error*/
399  , const std::string &/*reason*/
400  ) {}
401  };
402 
403  // authentication issues report
405  {
420  virtual bool prompt(const Url & /* url */,
421  const std::string & /* msg */,
422  AuthData & /* auth_data */)
423  {
424  return false;
425  }
426  };
427 
429  } // namespace media
431 
433  namespace target
434  {
437  {
441  virtual bool show( Patch::constPtr & /*patch*/ )
442  { return true; }
443  };
444 
450  {
451  enum Notify { OUTPUT, PING };
452  enum Action {
453  ABORT, // abort commit and return error
454  RETRY, // (re)try to execute this script
455  IGNORE // ignore any failue and continue
456  };
457 
460  virtual void start( const Package::constPtr & /*package*/,
461  const Pathname & /*script path*/ )
462  {}
467  virtual bool progress( Notify /*OUTPUT or PING*/,
468  const std::string & /*output*/ = std::string() )
469  { return true; }
471  virtual Action problem( const std::string & /*description*/ )
472  { return ABORT; }
474  virtual void finish()
475  {}
476  };
477 
489  {
494  virtual bool start( const ProgressData & progress_r )
495  { return true; }
496 
502  virtual bool progress( const ProgressData & progress_r, const sat::Queue & noFilelist_r )
503  { return true; }
504 
511  virtual bool result( const ProgressData & progress_r, const sat::Queue & noFilelist_r, const sat::FileConflicts & conflicts_r )
512  { return true; }
513  };
514 
515 
517  namespace rpm
518  {
519 
520  // progress for installing a resolvable
522  {
523  enum Action {
524  ABORT, // abort and return error
525  RETRY, // retry
526  IGNORE // ignore the failure
527  };
528 
529  enum Error {
531  NOT_FOUND, // the requested Url was not found
532  IO, // IO error
533  INVALID // th resolvable is invalid
534  };
535 
536  // the level of RPM pushing
538  enum RpmLevel {
542  };
543 
544  virtual void start(
545  Resolvable::constPtr /*resolvable*/
546  ) {}
547 
548  virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable*/)
549  { return true; }
550 
551  virtual Action problem(
552  Resolvable::constPtr /*resolvable*/
553  , Error /*error*/
554  , const std::string &/*description*/
555  , RpmLevel /*level*/
556  ) { return ABORT; }
557 
558  virtual void finish(
559  Resolvable::constPtr /*resolvable*/
560  , Error /*error*/
561  , const std::string &/*reason*/
562  , RpmLevel /*level*/
563  ) {}
564 
572  };
573 
574  // progress for removing a resolvable
576  {
577  enum Action {
578  ABORT, // abort and return error
579  RETRY, // retry
580  IGNORE // ignore the failure
581  };
582 
583  enum Error {
585  NOT_FOUND, // the requested Url was not found
586  IO, // IO error
587  INVALID // th resolvable is invalid
588  };
589 
590  virtual void start(
591  Resolvable::constPtr /*resolvable*/
592  ) {}
593 
594  virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable*/)
595  { return true; }
596 
597  virtual Action problem(
598  Resolvable::constPtr /*resolvable*/
599  , Error /*error*/
600  , const std::string &/*description*/
601  ) { return ABORT; }
602 
603  virtual void finish(
604  Resolvable::constPtr /*resolvable*/
605  , Error /*error*/
606  , const std::string &/*reason*/
607  ) {}
608 
613  };
614 
615  // progress for rebuilding the database
617  {
618  enum Action {
619  ABORT, // abort and return error
620  RETRY, // retry
621  IGNORE // ignore the failure
622  };
623 
624  enum Error {
626  FAILED // failed to rebuild
627  };
628 
629  virtual void start(Pathname /*path*/) {}
630 
631  virtual bool progress(int /*value*/, Pathname /*path*/)
632  { return true; }
633 
634  virtual Action problem(
635  Pathname /*path*/
636  , Error /*error*/
637  , const std::string &/*description*/
638  ) { return ABORT; }
639 
640  virtual void finish(
641  Pathname /*path*/
642  , Error /*error*/
643  , const std::string &/*reason*/
644  ) {}
645  };
646 
647 #if LEGACY(17)
648  // progress for converting the database
650  struct ZYPP_DEPRECATED ConvertDBReport : public callback::ReportBase
651  {
652  enum Action {
653  ABORT, // abort and return error
654  RETRY, // retry
655  IGNORE // ignore the failure
656  };
657 
658  enum Error {
659  NO_ERROR,
660  FAILED // conversion failed
661  };
662 
663  virtual void start( Pathname /*path*/ )
664  {}
665 
666  virtual bool progress( int/*value*/, Pathname/*path*/ )
667  { return true; }
668 
669  virtual Action problem( Pathname/*path*/, Error/*error*/, const std::string &/*description*/ )
670  { return ABORT; }
671 
672  virtual void finish( Pathname/*path*/, Error/*error*/, const std::string &/*reason*/ )
673  {}
674  };
675 #endif
676 
686  {
694  enum class loglevel { dbg, msg, war, err, crt };
696  static const char *const loglevelPrefix( loglevel level_r )
697  {
698  switch ( level_r ) {
699  case loglevel::crt: return "fatal error: ";
700  case loglevel::err: return "error: ";
701  case loglevel::war: return "warning: ";
702  case loglevel::msg: return "";
703  case loglevel::dbg: return "D: ";
704  }
705  return "";
706  }
707  };
708 
709  // Generic transaction reports, this is used for verifying and preparing tasks, the name param
710  // for the start function defines which report we are looking at
712  {
713  enum Error {
714  NO_ERROR, // everything went perfectly fine
715  FINISHED_WITH_ERRORS, // the transaction was finished, but some errors happened
716  FAILED // the transaction failed completely
717  };
718 
719  virtual void start(
720  const std::string &/*name*/,
721  const UserData & = UserData() /*userdata*/
722  ) {}
723 
724  virtual void progress(
725  int /*value*/,
726  const UserData & = UserData() /*userdata*/
727  ) { }
728 
729  virtual void finish(
730  Error /*error*/,
731  const UserData & = UserData() /*userdata*/
732  ) {}
733 
739  };
740 
741 
742  // progress for installing a resolvable in single transaction mode
744  {
745  enum Error {
747  NOT_FOUND, // the requested Url was not found
748  IO, // IO error
749  INVALID // th resolvable is invalid
750  };
751 
752  virtual void start(
753  Resolvable::constPtr /*resolvable*/,
754  const UserData & = UserData() /*userdata*/
755  ) {}
756 
757  virtual void progress(
758  int /*value*/,
759  Resolvable::constPtr /*resolvable*/,
760  const UserData & = UserData() /*userdata*/
761  ) { return; }
762 
763  virtual void finish(
764  Resolvable::constPtr /*resolvable*/
765  , Error /*error*/,
766  const UserData & = UserData() /*userdata*/
767  ) {}
768 
775  };
776 
777  // progress for removing a resolvable in single transaction mode
779  {
780  enum Error {
782  NOT_FOUND, // the requested Url was not found
783  IO, // IO error
784  INVALID // th resolvable is invalid
785  };
786 
787  virtual void start(
788  Resolvable::constPtr /*resolvable*/,
789  const UserData & = UserData() /*userdata*/
790  ) {}
791 
792  virtual void progress(
793  int /*value*/,
794  Resolvable::constPtr /*resolvable*/,
795  const UserData & = UserData() /*userdata*/
796  ) { return; }
797 
798  virtual void finish(
799  Resolvable::constPtr /*resolvable*/
800  , Error /*error*/
801  , const UserData & = UserData() /*userdata*/
802  ) {}
803 
808  };
809 
810  // progress for cleaning up the old version of a package after it was upgraded to a new version
812  {
813  enum Error {
815  };
816 
817  virtual void start(
818  const std::string & /*nvra*/,
819  const UserData & = UserData() /*userdata*/
820  ) {}
821 
822  virtual void progress(
823  int /*value*/,
824  const UserData & = UserData() /*userdata*/
825  ) { return; }
826 
827  virtual void finish(
828  Error /*error*/,
829  const UserData & = UserData() /*userdata*/
830  ) {}
831 
836  };
837 
838 
839  // progress for script thats executed during a commit transaction
840  // the resolvable can be null, for things like posttrans scripts
842  {
843  enum Error {
846  CRITICAL // the script failure prevented solvable installation
847  };
848 
849  virtual void start(
850  const std::string & /*scriptType*/,
851  const std::string & /*packageName ( can be empty )*/,
852  Resolvable::constPtr /*resolvable ( can be null )*/,
853  const UserData & = UserData() /*userdata*/
854  ) {}
855 
856  virtual void progress(
857  int /*value*/,
858  Resolvable::constPtr /*resolvable*/,
859  const UserData & = UserData() /*userdata*/
860  ) { return; }
861 
862  virtual void finish(
863  Resolvable::constPtr /*resolvable*/
864  , Error /*error*/,
865  const UserData & = UserData() /*userdata*/
866  ) {}
867 
874  };
875 
877  } // namespace rpm
879 
881  } // namespace target
883 
884  class PoolQuery;
885 
893  {
897  enum Action {
901  };
902 
906  enum Error {
909  };
910 
914  virtual void start(
915  ) {}
916 
921  virtual bool progress(int /*value*/)
922  { return true; }
923 
928  virtual Action execute(
929  const PoolQuery& /*error*/
930  ) { return DELETE; }
931 
935  virtual void finish(
936  Error /*error*/
937  ) {}
938 
939  };
940 
945  {
950  enum Action {
954  };
955 
959  enum Error {
962  };
963 
971  };
972 
973  virtual void start() {}
974 
979  virtual bool progress()
980  { return true; }
981 
985  virtual Action conflict(
986  const PoolQuery&,
988  ) { return DELETE; }
989 
990  virtual void finish(
991  Error /*error*/
992  ) {}
993  };
994 
1000  {
1001  public:
1003  struct EMsgTypeDef {
1005  };
1006  typedef base::EnumClass<EMsgTypeDef> MsgType;
1007 
1010 
1011  public:
1013  virtual bool message( MsgType type_r, const std::string & msg_r, const UserData & userData_r ) const
1014  { return true; }
1015 
1016 
1020  static callback::SendReport<JobReport> & instance(); // impl in ZYppImpl.cc
1021 
1023  static bool debug( const std::string & msg_r, const UserData & userData_r = UserData() )
1024  { return instance()->message( MsgType::debug, msg_r, userData_r ); }
1025 
1027  static bool info( const std::string & msg_r, const UserData & userData_r = UserData() )
1028  { return instance()->message( MsgType::info, msg_r, userData_r ); }
1029 
1031  static bool warning( const std::string & msg_r, const UserData & userData_r = UserData() )
1032  { return instance()->message( MsgType::warning, msg_r, userData_r ); }
1033 
1035  static bool error( const std::string & msg_r, const UserData & userData_r = UserData() )
1036  { return instance()->message( MsgType::error, msg_r, userData_r ); }
1037 
1039  static bool important( const std::string & msg_r, const UserData & userData_r = UserData() )
1040  { return instance()->message( MsgType::important, msg_r, userData_r ); }
1041 
1043  static bool data( const std::string & msg_r, const UserData & userData_r = UserData() )
1044  { return instance()->message( MsgType::data, msg_r, userData_r ); }
1046  };
1047 
1053  {
1055 
1056  bool debug( const std::string & msg_r ) { return JobReport::debug( msg_r, *this ); }
1057  bool info( const std::string & msg_r ) { return JobReport::info( msg_r, *this ); }
1058  bool warning( const std::string & msg_r ) { return JobReport::warning( msg_r, *this ); }
1059  bool error( const std::string & msg_r ) { return JobReport::error( msg_r, *this ); }
1060  bool important( const std::string & msg_r ) { return JobReport::important( msg_r, *this ); }
1061  bool data( const std::string & msg_r ) { return JobReport::data( msg_r, *this ); }
1062  };
1063 
1065 } // namespace zypp
1067 
1068 #endif // ZYPP_ZYPPCALLBACKS_H
static const UserData::ContentType contentRpmout
"zypp-rpm/scriptsa": Additional rpm output (sent immediately).
bool operator()(const ProgressData &progress)
Definition: ZYppCallbacks.h:74
TraitsType::constPtrType constPtr
Definition: Resolvable.h:59
virtual void start(Resolvable::constPtr, const Url &)
TraitsType::constPtrType constPtr
Definition: Package.h:38
virtual bool progress(int, const Url &, double dbps_avg=-1, double dbps_current=-1)
Download progress.
Generic report for sending messages.
ProgressData::ReceiverFnc _fnc
Definition: ZYppCallbacks.h:93
static bool error(const std::string &msg_r, const UserData &userData_r=UserData())
send error text
virtual void start(Resolvable::constPtr, const UserData &=UserData())
zypp::ContentType ContentType
Definition: UserData.h:50
JobReport convenience sending this instance of UserData with each message.
virtual Action problem(Resolvable::constPtr, Error, const std::string &)
virtual void start(const ProgressData &)
Definition: ZYppCallbacks.h:42
virtual Action problem(const Url &, Error, const std::string &)
bool data(const std::string &msg_r)
virtual void pkgGpgCheck(const UserData &userData_r=UserData())
Detail information about the result of a performed pkgGpgCheck.
base::EnumClass< EMsgTypeDef > MsgType
&#39;enum class MsgType&#39;
virtual bool progress(int, Resolvable::constPtr)
bool warning(const std::string &msg_r)
virtual void start(const zypp::Url &)
virtual Action problem(Resolvable::constPtr, Error, const std::string &, RpmLevel)
virtual void finish(Resolvable::constPtr, Error, const std::string &)
virtual void finish(const zypp::Url &, Error, const std::string &)
virtual void finish(const Url &, Error, const std::string &)
virtual void finish(Pathname, Error, const std::string &)
Store and operate with byte count.
Definition: ByteCount.h:30
virtual bool start(const ProgressData &progress_r)
callback::UserData UserData
typsafe map of userdata
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
Definition: progressdata.h:140
virtual void start(Resolvable::constPtr, const UserData &=UserData())
bool important(const std::string &msg_r)
virtual void start(Resolvable::constPtr)
virtual Action problem(Repository, Error, const std::string &)
virtual void finish(const ProgressData &)
Definition: ZYppCallbacks.h:54
static const UserData::ContentType contentLogline
"zypp-rpm/logline" report a line suitable to be written to the screen.
virtual bool progress(const ProgressData &)
virtual void start(const std::string &, const UserData &=UserData())
IO error which can happen on worse connection like timeout exceed.
bool finalReport() const
Definition: progressdata.h:336
virtual void finish()
Report success.
Error
result of cleaning
virtual void progress(int, Resolvable::constPtr, const UserData &=UserData())
What is known about a repository.
Definition: RepoInfo.h:71
static bool warning(const std::string &msg_r, const UserData &userData_r=UserData())
send warning text
virtual void finish(Resolvable::constPtr, Error, const std::string &)
cleaning aborted by user
bool debug(const std::string &msg_r)
delete conflicted lock
static const UserData::ContentType contentRpmout
"zypp-rpm/transactionsa": Additional rpm output (sent immediately).
Error
result of merging
virtual bool result(const ProgressData &progress_r, const sat::Queue &noFilelist_r, const sat::FileConflicts &conflicts_r)
callback::UserData UserData
Definition: Callback.h:151
Indicate execution of a patch script.
virtual void progress(int, const UserData &=UserData())
virtual void start(Pathname)
virtual void successProbe(const Url &, const std::string &)
Libsolv queue representing file conflicts.
Definition: FileConflicts.h:30
loglevel
Rendering hint for log-lines to show.
Action
action performed by cleaning api to specific lock
virtual bool message(MsgType type_r, const std::string &msg_r, const UserData &userData_r) const
Send a ready to show message text.
virtual void start(Resolvable::constPtr)
bool info(const std::string &msg_r)
locks lock some file and unlocking lock unlock only part of iti, so removing old lock can unlock more...
Check for package file conflicts in commit (after download)
virtual bool progress(int, Pathname)
virtual void startDeltaDownload(const Pathname &, const ByteCount &)
virtual void start(const Url &, Pathname)
virtual Action problem(const Url &, Error, const std::string &)
virtual void finish(Error)
cleaning is done
ProgressReportAdaptor(const ProgressData::ReceiverFnc &fnc, callback::SendReport< ProgressReport > &report)
Definition: ZYppCallbacks.h:67
message type (use like &#39;enum class MsgType&#39;)
virtual bool progress(const ProgressData &progress_r, const sat::Queue &noFilelist_r)
virtual Action problem(Pathname, Error, const std::string &)
cleaning aborted by user
virtual void finish(const Url &, Error, const std::string &)
virtual Action problem(const zypp::Url &, Error, const std::string &)
virtual Action problem(Resolvable::constPtr, Error, const std::string &)
virtual bool progress(int, Resolvable::constPtr)
Maintain [min,max] and counter (value) for progress counting.
Definition: progressdata.h:131
virtual bool progress()
merging still live
Request to display the pre commit message of a patch.
virtual Action problem(const std::string &)
Report error.
locks lock same item in pool but its parameters are different
static bool important(const std::string &msg_r, const UserData &userData_r=UserData())
send important message text
TraitsType::constPtrType constPtr
Definition: Patch.h:43
ProgressReportAdaptor(callback::SendReport< ProgressReport > &report)
Definition: ZYppCallbacks.h:62
static const UserData::ContentType contentRpmout
"zypp-rpm/installpkgsa": Additional rpm output (sent immediately).
virtual void progress(int, Resolvable::constPtr, const UserData &=UserData())
virtual void problemDeltaApply(const std::string &)
this callback handles merging old locks with newly added or removed
static bool data(const std::string &msg_r, const UserData &userData_r=UserData())
send data message
Class for handling media authentication data.
Definition: authdata.h:30
static const UserData::ContentType contentRpmout
"rpmout/installpkg": Additional rpm output (sent immediately).
static bool debug(const std::string &msg_r, const UserData &userData_r=UserData())
send debug message text
virtual void finish(Resolvable::constPtr, Error, const std::string &, RpmLevel)
virtual void problemDeltaDownload(const std::string &)
virtual bool prompt(const Url &, const std::string &, AuthData &)
Prompt for authentication data.
Temporarily disable MediaChangeReport Sometimes helpful to suppress interactive messages connected to...
UserData()
Default ctor.
Definition: UserData.h:54
ScopedDisableMediaChangeReport(bool condition_r=true)
Disbale MediaChangeReport if condition_r is true.
Definition: ZYppImpl.cc:87
virtual void start(const std::string &, const std::string &, Resolvable::constPtr, const UserData &=UserData())
virtual void failedProbe(const Url &, const std::string &)
Libsolv Id queue wrapper.
Definition: Queue.h:34
virtual void start(const ProgressData &, const RepoInfo)
virtual bool progress(int)
progress of cleaning specifies in percents
virtual void finish(Error, const UserData &=UserData())
Action
action for old lock which is in conflict
Meta-data query API.
Definition: PoolQuery.h:90
virtual void start(const Url &)
virtual bool progress(int)
virtual void finish(Resolvable::constPtr, Error, const UserData &=UserData())
callback::SendReport< ProgressReport > & _report
Definition: ZYppCallbacks.h:94
bool error(const std::string &msg_r)
virtual void start(const Package::constPtr &, const Pathname &)
Start executing the script provided by package.
Report active throughout the whole rpm transaction.
Typesafe passing of user data via callbacks.
Definition: UserData.h:38
abort and return error
virtual void finish(Repository, const std::string &, Error, const std::string &)
virtual void progress(int, const UserData &=UserData())
static const UserData::ContentType contentRpmout
"zypp-rpm/cleanupkgsa": Additional rpm output (sent immediately).
virtual Action execute(const PoolQuery &)
When find empty lock ask what to do with it.
virtual Action requestMedia(Url &, unsigned, const std::string &, Error, const std::string &, const std::vector< std::string > &, unsigned int &)
virtual void progress(int, Resolvable::constPtr, const UserData &=UserData())
static const UserData::ContentType contentRpmout
"rpmout/removepkg": Additional rpm output (sent immediately).
virtual void startDeltaApply(const Pathname &)
virtual bool progress(Notify, const std::string &=std::string())
Progress provides the script output.
static bool info(const std::string &msg_r, const UserData &userData_r=UserData())
send message text
virtual bool progress(const ProgressData &)
Definition: ZYppCallbacks.h:45
virtual bool progress(int, Resolvable::constPtr)
ConflictState
type of conflict of old and new lock
shared_ptr< callback::TempConnect< media::MediaChangeReport > > _guard
Callback for cleaning locks which doesn&#39;t lock anything in pool.
virtual void finish(Resolvable::constPtr, Error, const UserData &=UserData())
static const UserData::ContentType contentRpmout
"zypp-rpm/removepkgsa": Additional rpm output (sent immediately).
virtual void finish(Resolvable::constPtr, Error, const UserData &=UserData())
static callback::SendReport< JobReport > & instance()
Singleton sender instance.
Definition: ZYppImpl.cc:100
Easy-to use interface to the ZYPP dependency resolver.
Definition: Application.cc:19
virtual void finish(Error, const UserData &=UserData())
#define ZYPP_DEPRECATED
The ZYPP_DEPRECATED macro can be used to trigger compile-time warnings with gcc >= 3...
Definition: Globals.h:99
static const char *const loglevelPrefix(loglevel level_r)
Suggested prefix for log-lines to show.
Url manipulation class.
Definition: Url.h:91
virtual void start()
cleaning is started
virtual bool progress(const Url &, int)
virtual void infoInCache(Resolvable::constPtr res_r, const Pathname &localfile_r)
Hint that package is available in the local cache (no download needed).
virtual void start(const std::string &, const UserData &=UserData())
Mime type like &#39;type/subtype&#39; classification of content.
Definition: ContentType.h:29
virtual bool show(Patch::constPtr &)
Display patch->message().
virtual Action conflict(const PoolQuery &, ConflictState)
When user unlock something which is locked by non-identical query.
virtual void finish(Error)