libzypp  17.31.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/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 
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 
568  };
569 
570  // progress for removing a resolvable
572  {
573  enum Action {
574  ABORT, // abort and return error
575  RETRY, // retry
576  IGNORE // ignore the failure
577  };
578 
579  enum Error {
581  NOT_FOUND, // the requested Url was not found
582  IO, // IO error
583  INVALID // th resolvable is invalid
584  };
585 
586  virtual void start(
587  Resolvable::constPtr /*resolvable*/
588  ) {}
589 
590  virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable*/)
591  { return true; }
592 
593  virtual Action problem(
594  Resolvable::constPtr /*resolvable*/
595  , Error /*error*/
596  , const std::string &/*description*/
597  ) { return ABORT; }
598 
599  virtual void finish(
600  Resolvable::constPtr /*resolvable*/
601  , Error /*error*/
602  , const std::string &/*reason*/
603  ) {}
604 
609  };
610 
611  // progress for rebuilding the database
613  {
614  enum Action {
615  ABORT, // abort and return error
616  RETRY, // retry
617  IGNORE // ignore the failure
618  };
619 
620  enum Error {
622  FAILED // failed to rebuild
623  };
624 
625  virtual void start(Pathname /*path*/) {}
626 
627  virtual bool progress(int /*value*/, Pathname /*path*/)
628  { return true; }
629 
630  virtual Action problem(
631  Pathname /*path*/
632  , Error /*error*/
633  , const std::string &/*description*/
634  ) { return ABORT; }
635 
636  virtual void finish(
637  Pathname /*path*/
638  , Error /*error*/
639  , const std::string &/*reason*/
640  ) {}
641  };
642 
643 #if LEGACY(17)
644  // progress for converting the database
646  struct ZYPP_DEPRECATED ConvertDBReport : public callback::ReportBase
647  {
648  enum Action {
649  ABORT, // abort and return error
650  RETRY, // retry
651  IGNORE // ignore the failure
652  };
653 
654  enum Error {
655  NO_ERROR,
656  FAILED // conversion failed
657  };
658 
659  virtual void start( Pathname /*path*/ )
660  {}
661 
662  virtual bool progress( int/*value*/, Pathname/*path*/ )
663  { return true; }
664 
665  virtual Action problem( Pathname/*path*/, Error/*error*/, const std::string &/*description*/ )
666  { return ABORT; }
667 
668  virtual void finish( Pathname/*path*/, Error/*error*/, const std::string &/*reason*/ )
669  {}
670  };
671 #endif
672 
682  {
690  enum class loglevel { dbg, msg, war, err, crt };
692  static const char *const loglevelPrefix( loglevel level_r )
693  {
694  switch ( level_r ) {
695  case loglevel::crt: return "fatal error: ";
696  case loglevel::err: return "error: ";
697  case loglevel::war: return "warning: ";
698  case loglevel::msg: return "";
699  case loglevel::dbg: return "D: ";
700  }
701  }
702  };
703 
704  // Generic transaction reports, this is used for verifying and preparing tasks, the name param
705  // for the start function defines which report we are looking at
707  {
708  enum Error {
709  NO_ERROR, // everything went perfectly fine
710  FINISHED_WITH_ERRORS, // the transaction was finished, but some errors happened
711  FAILED // the transaction failed completely
712  };
713 
714  virtual void start(
715  const std::string &/*name*/,
716  const UserData & = UserData() /*userdata*/
717  ) {}
718 
719  virtual void progress(
720  int /*value*/,
721  const UserData & = UserData() /*userdata*/
722  ) { }
723 
724  virtual void finish(
725  Error /*error*/,
726  const UserData & = UserData() /*userdata*/
727  ) {}
728 
734  };
735 
736 
737  // progress for installing a resolvable in single transaction mode
739  {
740  enum Error {
742  NOT_FOUND, // the requested Url was not found
743  IO, // IO error
744  INVALID // th resolvable is invalid
745  };
746 
747  virtual void start(
748  Resolvable::constPtr /*resolvable*/,
749  const UserData & = UserData() /*userdata*/
750  ) {}
751 
752  virtual void progress(
753  int /*value*/,
754  Resolvable::constPtr /*resolvable*/,
755  const UserData & = UserData() /*userdata*/
756  ) { return; }
757 
758  virtual void finish(
759  Resolvable::constPtr /*resolvable*/
760  , Error /*error*/,
761  const UserData & = UserData() /*userdata*/
762  ) {}
763 
770  };
771 
772  // progress for removing a resolvable in single transaction mode
774  {
775  enum Error {
777  NOT_FOUND, // the requested Url was not found
778  IO, // IO error
779  INVALID // th resolvable is invalid
780  };
781 
782  virtual void start(
783  Resolvable::constPtr /*resolvable*/,
784  const UserData & = UserData() /*userdata*/
785  ) {}
786 
787  virtual void progress(
788  int /*value*/,
789  Resolvable::constPtr /*resolvable*/,
790  const UserData & = UserData() /*userdata*/
791  ) { return; }
792 
793  virtual void finish(
794  Resolvable::constPtr /*resolvable*/
795  , Error /*error*/
796  , const UserData & = UserData() /*userdata*/
797  ) {}
798 
803  };
804 
805  // progress for cleaning up the old version of a package after it was upgraded to a new version
807  {
808  enum Error {
810  };
811 
812  virtual void start(
813  const std::string & /*nvra*/,
814  const UserData & = UserData() /*userdata*/
815  ) {}
816 
817  virtual void progress(
818  int /*value*/,
819  const UserData & = UserData() /*userdata*/
820  ) { return; }
821 
822  virtual void finish(
823  Error /*error*/,
824  const UserData & = UserData() /*userdata*/
825  ) {}
826 
831  };
832 
833 
834  // progress for script thats executed during a commit transaction
835  // the resolvable can be null, for things like posttrans scripts
837  {
838  enum Error {
841  CRITICAL // the script failure prevented solvable installation
842  };
843 
844  virtual void start(
845  const std::string & /*scriptType*/,
846  const std::string & /*packageName ( can be empty )*/,
847  Resolvable::constPtr /*resolvable ( can be null )*/,
848  const UserData & = UserData() /*userdata*/
849  ) {}
850 
851  virtual void progress(
852  int /*value*/,
853  Resolvable::constPtr /*resolvable*/,
854  const UserData & = UserData() /*userdata*/
855  ) { return; }
856 
857  virtual void finish(
858  Resolvable::constPtr /*resolvable*/
859  , Error /*error*/,
860  const UserData & = UserData() /*userdata*/
861  ) {}
862 
869  };
870 
872  } // namespace rpm
874 
876  } // namespace target
878 
879  class PoolQuery;
880 
888  {
892  enum Action {
896  };
897 
901  enum Error {
904  };
905 
909  virtual void start(
910  ) {}
911 
916  virtual bool progress(int /*value*/)
917  { return true; }
918 
923  virtual Action execute(
924  const PoolQuery& /*error*/
925  ) { return DELETE; }
926 
930  virtual void finish(
931  Error /*error*/
932  ) {}
933 
934  };
935 
940  {
945  enum Action {
949  };
950 
954  enum Error {
957  };
958 
966  };
967 
968  virtual void start() {}
969 
974  virtual bool progress()
975  { return true; }
976 
980  virtual Action conflict(
981  const PoolQuery&,
983  ) { return DELETE; }
984 
985  virtual void finish(
986  Error /*error*/
987  ) {}
988  };
989 
995  {
996  public:
998  struct EMsgTypeDef {
1000  };
1001  typedef base::EnumClass<EMsgTypeDef> MsgType;
1002 
1005 
1006  public:
1008  virtual bool message( MsgType type_r, const std::string & msg_r, const UserData & userData_r ) const
1009  { return true; }
1010 
1011 
1015  static callback::SendReport<JobReport> & instance(); // impl in ZYppImpl.cc
1016 
1018  static bool debug( const std::string & msg_r, const UserData & userData_r = UserData() )
1019  { return instance()->message( MsgType::debug, msg_r, userData_r ); }
1020 
1022  static bool info( const std::string & msg_r, const UserData & userData_r = UserData() )
1023  { return instance()->message( MsgType::info, msg_r, userData_r ); }
1024 
1026  static bool warning( const std::string & msg_r, const UserData & userData_r = UserData() )
1027  { return instance()->message( MsgType::warning, msg_r, userData_r ); }
1028 
1030  static bool error( const std::string & msg_r, const UserData & userData_r = UserData() )
1031  { return instance()->message( MsgType::error, msg_r, userData_r ); }
1032 
1034  static bool important( const std::string & msg_r, const UserData & userData_r = UserData() )
1035  { return instance()->message( MsgType::important, msg_r, userData_r ); }
1036 
1038  static bool data( const std::string & msg_r, const UserData & userData_r = UserData() )
1039  { return instance()->message( MsgType::data, msg_r, userData_r ); }
1041  };
1042 
1048  {
1050 
1051  bool debug( const std::string & msg_r ) { return JobReport::debug( msg_r, *this ); }
1052  bool info( const std::string & msg_r ) { return JobReport::info( msg_r, *this ); }
1053  bool warning( const std::string & msg_r ) { return JobReport::warning( msg_r, *this ); }
1054  bool error( const std::string & msg_r ) { return JobReport::error( msg_r, *this ); }
1055  bool important( const std::string & msg_r ) { return JobReport::important( msg_r, *this ); }
1056  bool data( const std::string & msg_r ) { return JobReport::data( msg_r, *this ); }
1057  };
1058 
1060 } // namespace zypp
1062 
1063 #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:70
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:89
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:333
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:139
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:62
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:130
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
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
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:38
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:90
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:51
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)