libzypp  17.31.31
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-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  }
706  };
707 
708  // Generic transaction reports, this is used for verifying and preparing tasks, the name param
709  // for the start function defines which report we are looking at
711  {
712  enum Error {
713  NO_ERROR, // everything went perfectly fine
714  FINISHED_WITH_ERRORS, // the transaction was finished, but some errors happened
715  FAILED // the transaction failed completely
716  };
717 
718  virtual void start(
719  const std::string &/*name*/,
720  const UserData & = UserData() /*userdata*/
721  ) {}
722 
723  virtual void progress(
724  int /*value*/,
725  const UserData & = UserData() /*userdata*/
726  ) { }
727 
728  virtual void finish(
729  Error /*error*/,
730  const UserData & = UserData() /*userdata*/
731  ) {}
732 
738  };
739 
740 
741  // progress for installing a resolvable in single transaction mode
743  {
744  enum Error {
746  NOT_FOUND, // the requested Url was not found
747  IO, // IO error
748  INVALID // th resolvable is invalid
749  };
750 
751  virtual void start(
752  Resolvable::constPtr /*resolvable*/,
753  const UserData & = UserData() /*userdata*/
754  ) {}
755 
756  virtual void progress(
757  int /*value*/,
758  Resolvable::constPtr /*resolvable*/,
759  const UserData & = UserData() /*userdata*/
760  ) { return; }
761 
762  virtual void finish(
763  Resolvable::constPtr /*resolvable*/
764  , Error /*error*/,
765  const UserData & = UserData() /*userdata*/
766  ) {}
767 
774  };
775 
776  // progress for removing a resolvable in single transaction mode
778  {
779  enum Error {
781  NOT_FOUND, // the requested Url was not found
782  IO, // IO error
783  INVALID // th resolvable is invalid
784  };
785 
786  virtual void start(
787  Resolvable::constPtr /*resolvable*/,
788  const UserData & = UserData() /*userdata*/
789  ) {}
790 
791  virtual void progress(
792  int /*value*/,
793  Resolvable::constPtr /*resolvable*/,
794  const UserData & = UserData() /*userdata*/
795  ) { return; }
796 
797  virtual void finish(
798  Resolvable::constPtr /*resolvable*/
799  , Error /*error*/
800  , const UserData & = UserData() /*userdata*/
801  ) {}
802 
807  };
808 
809  // progress for cleaning up the old version of a package after it was upgraded to a new version
811  {
812  enum Error {
814  };
815 
816  virtual void start(
817  const std::string & /*nvra*/,
818  const UserData & = UserData() /*userdata*/
819  ) {}
820 
821  virtual void progress(
822  int /*value*/,
823  const UserData & = UserData() /*userdata*/
824  ) { return; }
825 
826  virtual void finish(
827  Error /*error*/,
828  const UserData & = UserData() /*userdata*/
829  ) {}
830 
835  };
836 
837 
838  // progress for script thats executed during a commit transaction
839  // the resolvable can be null, for things like posttrans scripts
841  {
842  enum Error {
845  CRITICAL // the script failure prevented solvable installation
846  };
847 
848  virtual void start(
849  const std::string & /*scriptType*/,
850  const std::string & /*packageName ( can be empty )*/,
851  Resolvable::constPtr /*resolvable ( can be null )*/,
852  const UserData & = UserData() /*userdata*/
853  ) {}
854 
855  virtual void progress(
856  int /*value*/,
857  Resolvable::constPtr /*resolvable*/,
858  const UserData & = UserData() /*userdata*/
859  ) { return; }
860 
861  virtual void finish(
862  Resolvable::constPtr /*resolvable*/
863  , Error /*error*/,
864  const UserData & = UserData() /*userdata*/
865  ) {}
866 
873  };
874 
876  } // namespace rpm
878 
880  } // namespace target
882 
883  class PoolQuery;
884 
892  {
896  enum Action {
900  };
901 
905  enum Error {
908  };
909 
913  virtual void start(
914  ) {}
915 
920  virtual bool progress(int /*value*/)
921  { return true; }
922 
927  virtual Action execute(
928  const PoolQuery& /*error*/
929  ) { return DELETE; }
930 
934  virtual void finish(
935  Error /*error*/
936  ) {}
937 
938  };
939 
944  {
949  enum Action {
953  };
954 
958  enum Error {
961  };
962 
970  };
971 
972  virtual void start() {}
973 
978  virtual bool progress()
979  { return true; }
980 
984  virtual Action conflict(
985  const PoolQuery&,
987  ) { return DELETE; }
988 
989  virtual void finish(
990  Error /*error*/
991  ) {}
992  };
993 
999  {
1000  public:
1002  struct EMsgTypeDef {
1004  };
1005  typedef base::EnumClass<EMsgTypeDef> MsgType;
1006 
1009 
1010  public:
1012  virtual bool message( MsgType type_r, const std::string & msg_r, const UserData & userData_r ) const
1013  { return true; }
1014 
1015 
1019  static callback::SendReport<JobReport> & instance(); // impl in ZYppImpl.cc
1020 
1022  static bool debug( const std::string & msg_r, const UserData & userData_r = UserData() )
1023  { return instance()->message( MsgType::debug, msg_r, userData_r ); }
1024 
1026  static bool info( const std::string & msg_r, const UserData & userData_r = UserData() )
1027  { return instance()->message( MsgType::info, msg_r, userData_r ); }
1028 
1030  static bool warning( const std::string & msg_r, const UserData & userData_r = UserData() )
1031  { return instance()->message( MsgType::warning, msg_r, userData_r ); }
1032 
1034  static bool error( const std::string & msg_r, const UserData & userData_r = UserData() )
1035  { return instance()->message( MsgType::error, msg_r, userData_r ); }
1036 
1038  static bool important( const std::string & msg_r, const UserData & userData_r = UserData() )
1039  { return instance()->message( MsgType::important, msg_r, userData_r ); }
1040 
1042  static bool data( const std::string & msg_r, const UserData & userData_r = UserData() )
1043  { return instance()->message( MsgType::data, msg_r, userData_r ); }
1045  };
1046 
1052  {
1054 
1055  bool debug( const std::string & msg_r ) { return JobReport::debug( msg_r, *this ); }
1056  bool info( const std::string & msg_r ) { return JobReport::info( msg_r, *this ); }
1057  bool warning( const std::string & msg_r ) { return JobReport::warning( msg_r, *this ); }
1058  bool error( const std::string & msg_r ) { return JobReport::error( msg_r, *this ); }
1059  bool important( const std::string & msg_r ) { return JobReport::important( msg_r, *this ); }
1060  bool data( const std::string & msg_r ) { return JobReport::data( msg_r, *this ); }
1061  };
1062 
1064 } // namespace zypp
1066 
1067 #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
virtual void start(Resolvable::constPtr, const Url &)
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
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
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
Definition: progressdata.h:140
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
TraitsType::constPtrType constPtr
Definition: Patch.h:43
static bool important(const std::string &msg_r, const UserData &userData_r=UserData())
send important message text
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:28
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)
TraitsType::constPtrType constPtr
Definition: Resolvable.h:59
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: CodePitfalls.doc:1
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
TraitsType::constPtrType constPtr
Definition: Package.h:38
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)