libzypp  17.36.1
ZYppCallbacks.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_ZYPPCALLBACKS_H
13 #define ZYPP_ZYPPCALLBACKS_H
14 
15 #include <zypp/base/EnumClass.h>
16 #include <zypp/Callback.h>
17 #include <zypp-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
201  {
202  enum Action {
203  ABORT, // abort and return error
204  RETRY // retry
205  };
206 
207  enum Error {
209  NOT_FOUND, // the requested Url was not found
210  IO, // IO error
211  INVALID, // th source is invalid
213  };
214 
215  virtual void start(const Url &/*url*/) {}
216  virtual void failedProbe( const Url &/*url*/, const std::string &/*type*/ ) {}
217  virtual void successProbe( const Url &/*url*/, const std::string &/*type*/ ) {}
218  virtual void finish(const Url &/*url*/, Error /*error*/, const std::string &/*reason*/ ) {}
219 
220  virtual bool progress(const Url &/*url*/, int /*value*/)
221  { return true; }
222 
223  virtual Action problem( const Url &/*url*/, Error /*error*/, const std::string &/*description*/ ) { return ABORT; }
224  };
225 
228  {
229  enum Action {
230  ABORT, // abort and return error
231  RETRY, // retry
232  IGNORE // skip refresh, ignore failed refresh
233  };
234 
235  enum Error {
237  NOT_FOUND, // the requested Url was not found
238  IO, // IO error
240  INVALID, // th source is invali
242  };
243 
244  virtual void start( const zypp::Url &/*url*/ ) {}
245  virtual bool progress( int /*value*/ )
246  { return true; }
247 
248  virtual Action problem(
249  const zypp::Url &/*url*/
250  , Error /*error*/
251  , const std::string &/*description*/ )
252  { return ABORT; }
253 
254  virtual void finish(
255  const zypp::Url &/*url*/
256  , Error /*error*/
257  , const std::string &/*reason*/ )
258  {}
259  };
260 
263  {
264  enum Action {
265  ABORT, // abort and return error
266  RETRY, // retry
267  IGNORE // skip refresh, ignore failed refresh
268  };
269 
270  enum Error {
272  NOT_FOUND, // the requested Url was not found
273  IO, // IO error
274  INVALID // th source is invalid
275  };
276 
277  virtual void start( const ProgressData &/*task*/, const RepoInfo /*repo*/ ) {}
278  virtual bool progress( const ProgressData &/*task*/ )
279  { return true; }
280 
281  virtual Action problem(
282  Repository /*source*/
283  , Error /*error*/
284  , const std::string &/*description*/ )
285  { return ABORT; }
286 
287  virtual void finish(
288  Repository /*source*/
289  , const std::string &/*task*/
290  , Error /*error*/
291  , const std::string &/*reason*/ )
292  {}
293  };
294 
295 
297  } // namespace source
299 
301  namespace media
302  {
303  // media change request callback
305  {
306  enum Action {
307  ABORT, // abort and return error
308  RETRY, // retry
309  IGNORE, // ignore this media in future, not available anymore
310  IGNORE_ID, // ignore wrong medium id
311  CHANGE_URL, // change media URL
312  EJECT // eject the medium
313  };
314 
315  enum Error {
317  NOT_FOUND, // the medie not found at all
318  IO, // error accessing the media
319  INVALID, // media is broken
320  WRONG, // wrong media, need a different one
321  IO_SOFT
322  };
323 
338  Url & /* url (I/O parameter) */
339  , unsigned /*mediumNr*/
340  , const std::string & /* label */
341  , Error /*error*/
342  , const std::string & /*description*/
343  , const std::vector<std::string> & /* devices */
344  , unsigned int & /* dev_current (I/O param) */
345  ) { return ABORT; }
346  };
347 
354  {
356  ScopedDisableMediaChangeReport( bool condition_r = true );
357  private:
358  shared_ptr<callback::TempConnect<media::MediaChangeReport> > _guard;
359  };
360 
361  // progress for downloading a file
363  {
364  enum Action {
365  ABORT, // abort and return error
366  RETRY, // retry
367  IGNORE // ignore the failure
368  };
369 
370  enum Error {
372  NOT_FOUND, // the requested Url was not found
373  IO, // IO error
374  ACCESS_DENIED, // user authent. failed while accessing restricted file
375  ERROR // other error
376  };
377 
378  virtual void start( const Url &/*file*/, Pathname /*localfile*/ ) {}
379 
388  virtual bool progress(int /*value*/, const Url &/*file*/,
389  double dbps_avg = -1,
390  double dbps_current = -1)
391  { return true; }
392 
393  virtual Action problem(
394  const Url &/*file*/
395  , Error /*error*/
396  , const std::string &/*description*/
397  ) { return ABORT; }
398 
399  virtual void finish(
400  const Url &/*file*/
401  , Error /*error*/
402  , const std::string &/*reason*/
403  ) {}
404  };
405 
406  // authentication issues report
408  {
423  virtual bool prompt(const Url & /* url */,
424  const std::string & /* msg */,
425  AuthData & /* auth_data */)
426  {
427  return false;
428  }
429  };
430 
432  } // namespace media
434 
436  namespace target
437  {
440  {
444  virtual bool show( Patch::constPtr & /*patch*/ )
445  { return true; }
446  };
447 
453  {
454  enum Notify { OUTPUT, PING };
455  enum Action {
456  ABORT, // abort commit and return error
457  RETRY, // (re)try to execute this script
458  IGNORE // ignore any failue and continue
459  };
460 
463  virtual void start( const Package::constPtr & /*package*/,
464  const Pathname & /*script path*/ )
465  {}
470  virtual bool progress( Notify /*OUTPUT or PING*/,
471  const std::string & /*output*/ = std::string() )
472  { return true; }
474  virtual Action problem( const std::string & /*description*/ )
475  { return ABORT; }
477  virtual void finish()
478  {}
479  };
480 
492  {
497  virtual bool start( const ProgressData & progress_r )
498  { return true; }
499 
505  virtual bool progress( const ProgressData & progress_r, const sat::Queue & noFilelist_r )
506  { return true; }
507 
514  virtual bool result( const ProgressData & progress_r, const sat::Queue & noFilelist_r, const sat::FileConflicts & conflicts_r )
515  { return true; }
516  };
517 
518 
520  namespace rpm
521  {
522 
523  // progress for installing a resolvable
525  {
526  enum Action {
527  ABORT, // abort and return error
528  RETRY, // retry
529  IGNORE // ignore the failure
530  };
531 
532  enum Error {
534  NOT_FOUND, // the requested Url was not found
535  IO, // IO error
536  INVALID // th resolvable is invalid
537  };
538 
539  // the level of RPM pushing
541  enum RpmLevel {
544  RPM_NODEPS_FORCE
545  };
546 
547  virtual void start(
548  Resolvable::constPtr /*resolvable*/
549  ) {}
550 
551  virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable*/)
552  { return true; }
553 
554  virtual Action problem(
555  Resolvable::constPtr /*resolvable*/
556  , Error /*error*/
557  , const std::string &/*description*/
558  , RpmLevel /*level*/
559  ) { return ABORT; }
560 
561  virtual void finish(
562  Resolvable::constPtr /*resolvable*/
563  , Error /*error*/
564  , const std::string &/*reason*/
565  , RpmLevel /*level*/
566  ) {}
567 
574  static const UserData::ContentType contentRpmout ZYPP_API;
575  };
576 
577  // progress for removing a resolvable
579  {
580  enum Action {
581  ABORT, // abort and return error
582  RETRY, // retry
583  IGNORE // ignore the failure
584  };
585 
586  enum Error {
588  NOT_FOUND, // the requested Url was not found
589  IO, // IO error
590  INVALID // th resolvable is invalid
591  };
592 
593  virtual void start(
594  Resolvable::constPtr /*resolvable*/
595  ) {}
596 
597  virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable*/)
598  { return true; }
599 
600  virtual Action problem(
601  Resolvable::constPtr /*resolvable*/
602  , Error /*error*/
603  , const std::string &/*description*/
604  ) { return ABORT; }
605 
606  virtual void finish(
607  Resolvable::constPtr /*resolvable*/
608  , Error /*error*/
609  , const std::string &/*reason*/
610  ) {}
611 
615  static const UserData::ContentType contentRpmout ZYPP_API;
616  };
617 
618  // progress for rebuilding the database
620  {
621  enum Action {
622  ABORT, // abort and return error
623  RETRY, // retry
624  IGNORE // ignore the failure
625  };
626 
627  enum Error {
629  FAILED // failed to rebuild
630  };
631 
632  virtual void start(Pathname /*path*/) {}
633 
634  virtual bool progress(int /*value*/, Pathname /*path*/)
635  { return true; }
636 
637  virtual Action problem(
638  Pathname /*path*/
639  , Error /*error*/
640  , const std::string &/*description*/
641  ) { return ABORT; }
642 
643  virtual void finish(
644  Pathname /*path*/
645  , Error /*error*/
646  , const std::string &/*reason*/
647  ) {}
648  };
649 
650 #if LEGACY(17)
651  // progress for converting the database
653  struct ZYPP_DEPRECATED ConvertDBReport : public callback::ReportBase
654  {
655  enum Action {
656  ABORT, // abort and return error
657  RETRY, // retry
658  IGNORE // ignore the failure
659  };
660 
661  enum Error {
662  NO_ERROR,
663  FAILED // conversion failed
664  };
665 
666  virtual void start( Pathname /*path*/ )
667  {}
668 
669  virtual bool progress( int/*value*/, Pathname/*path*/ )
670  { return true; }
671 
672  virtual Action problem( Pathname/*path*/, Error/*error*/, const std::string &/*description*/ )
673  { return ABORT; }
674 
675  virtual void finish( Pathname/*path*/, Error/*error*/, const std::string &/*reason*/ )
676  {}
677  };
678 #endif
679 
689  {
695  static const UserData::ContentType contentLogline ZYPP_API;
697  enum class loglevel { dbg, msg, war, err, crt };
699  static const char *const loglevelPrefix( loglevel level_r )
700  {
701  switch ( level_r ) {
702  case loglevel::crt: return "fatal error: ";
703  case loglevel::err: return "error: ";
704  case loglevel::war: return "warning: ";
705  case loglevel::msg: return "";
706  case loglevel::dbg: return "D: ";
707  }
708  return "";
709  }
710  };
711 
712  // Generic transaction reports, this is used for verifying and preparing tasks, the name param
713  // for the start function defines which report we are looking at
715  {
716  enum Error {
717  NO_ERROR, // everything went perfectly fine
718  FINISHED_WITH_ERRORS, // the transaction was finished, but some errors happened
719  FAILED // the transaction failed completely
720  };
721 
722  virtual void start(
723  const std::string &/*name*/,
724  const UserData & = UserData() /*userdata*/
725  ) {}
726 
727  virtual void progress(
728  int /*value*/,
729  const UserData & = UserData() /*userdata*/
730  ) { }
731 
732  virtual void finish(
733  Error /*error*/,
734  const UserData & = UserData() /*userdata*/
735  ) {}
736 
741  static const UserData::ContentType contentRpmout ZYPP_API;
742  };
743 
744 
745  // progress for installing a resolvable in single transaction mode
747  {
748  enum Error {
750  NOT_FOUND, // the requested Url was not found
751  IO, // IO error
752  INVALID // th resolvable is invalid
753  };
754 
755  virtual void start(
756  Resolvable::constPtr /*resolvable*/,
757  const UserData & = UserData() /*userdata*/
758  ) {}
759 
760  virtual void progress(
761  int /*value*/,
762  Resolvable::constPtr /*resolvable*/,
763  const UserData & = UserData() /*userdata*/
764  ) { return; }
765 
766  virtual void finish(
767  Resolvable::constPtr /*resolvable*/
768  , Error /*error*/,
769  const UserData & = UserData() /*userdata*/
770  ) {}
771 
777  static const UserData::ContentType contentRpmout ZYPP_API;
778  };
779 
780  // progress for removing a resolvable in single transaction mode
782  {
783  enum Error {
785  NOT_FOUND, // the requested Url was not found
786  IO, // IO error
787  INVALID // th resolvable is invalid
788  };
789 
790  virtual void start(
791  Resolvable::constPtr /*resolvable*/,
792  const UserData & = UserData() /*userdata*/
793  ) {}
794 
795  virtual void progress(
796  int /*value*/,
797  Resolvable::constPtr /*resolvable*/,
798  const UserData & = UserData() /*userdata*/
799  ) { return; }
800 
801  virtual void finish(
802  Resolvable::constPtr /*resolvable*/
803  , Error /*error*/
804  , const UserData & = UserData() /*userdata*/
805  ) {}
806 
810  static const UserData::ContentType contentRpmout ZYPP_API;
811  };
812 
813  // progress for cleaning up the old version of a package after it was upgraded to a new version
815  {
816  enum Error {
817  NO_ERROR
818  };
819 
820  virtual void start(
821  const std::string & /*nvra*/,
822  const UserData & = UserData() /*userdata*/
823  ) {}
824 
825  virtual void progress(
826  int /*value*/,
827  const UserData & = UserData() /*userdata*/
828  ) { return; }
829 
830  virtual void finish(
831  Error /*error*/,
832  const UserData & = UserData() /*userdata*/
833  ) {}
834 
838  static const UserData::ContentType contentRpmout ZYPP_API;
839  };
840 
841 
842  // progress for script thats executed during a commit transaction
843  // the resolvable can be null, for things like posttrans scripts
845  {
846  enum Error {
849  CRITICAL // the script failure prevented solvable installation
850  };
851 
852  virtual void start(
853  const std::string & /*scriptType*/,
854  const std::string & /*packageName ( can be empty )*/,
855  Resolvable::constPtr /*resolvable ( can be null )*/,
856  const UserData & = UserData() /*userdata*/
857  ) {}
858 
859  virtual void progress(
860  int /*value*/,
861  Resolvable::constPtr /*resolvable*/,
862  const UserData & = UserData() /*userdata*/
863  ) { return; }
864 
865  virtual void finish(
866  Resolvable::constPtr /*resolvable*/
867  , Error /*error*/,
868  const UserData & = UserData() /*userdata*/
869  ) {}
870 
876  static const UserData::ContentType contentRpmout ZYPP_API;
877  };
878 
880  } // namespace rpm
882 
884  } // namespace target
886 
887  class PoolQuery;
888 
896  {
900  enum Action {
903  IGNORE
904  };
905 
909  enum Error {
911  ABORTED
912  };
913 
917  virtual void start(
918  ) {}
919 
924  virtual bool progress(int /*value*/)
925  { return true; }
926 
931  virtual Action execute(
932  const PoolQuery& /*error*/
933  ) { return DELETE; }
934 
938  virtual void finish(
939  Error /*error*/
940  ) {}
941 
942  };
943 
948  {
953  enum Action {
956  IGNORE
957  };
958 
962  enum Error {
964  ABORTED
965  };
966 
972  INTERSECT
974  };
975 
976  virtual void start() {}
977 
982  virtual bool progress()
983  { return true; }
984 
988  virtual Action conflict(
989  const PoolQuery&,
991  ) { return DELETE; }
992 
993  virtual void finish(
994  Error /*error*/
995  ) {}
996  };
997 
1003  {
1004  public:
1006  struct EMsgTypeDef {
1007  enum Enum { debug, info, warning, error, important, data };
1008  };
1009  typedef base::EnumClass<EMsgTypeDef> MsgType;
1010 
1013 
1014  public:
1016  virtual bool message( MsgType type_r, const std::string & msg_r, const UserData & userData_r ) const
1017  { return true; }
1018 
1019 
1023  static callback::SendReport<JobReport> & instance(); // impl in ZYppImpl.cc
1024 
1026  static bool debug( const std::string & msg_r, const UserData & userData_r = UserData() )
1027  { return instance()->message( MsgType::debug, msg_r, userData_r ); }
1028 
1030  static bool info( const std::string & msg_r, const UserData & userData_r = UserData() )
1031  { return instance()->message( MsgType::info, msg_r, userData_r ); }
1032 
1034  static bool warning( const std::string & msg_r, const UserData & userData_r = UserData() )
1035  { return instance()->message( MsgType::warning, msg_r, userData_r ); }
1036 
1038  static bool error( const std::string & msg_r, const UserData & userData_r = UserData() )
1039  { return instance()->message( MsgType::error, msg_r, userData_r ); }
1040 
1042  static bool important( const std::string & msg_r, const UserData & userData_r = UserData() )
1043  { return instance()->message( MsgType::important, msg_r, userData_r ); }
1044 
1046  static bool data( const std::string & msg_r, const UserData & userData_r = UserData() )
1047  { return instance()->message( MsgType::data, msg_r, userData_r ); }
1049  };
1050 
1056  {
1058 
1059  bool debug( const std::string & msg_r ) { return JobReport::debug( msg_r, *this ); }
1060  bool info( const std::string & msg_r ) { return JobReport::info( msg_r, *this ); }
1061  bool warning( const std::string & msg_r ) { return JobReport::warning( msg_r, *this ); }
1062  bool error( const std::string & msg_r ) { return JobReport::error( msg_r, *this ); }
1063  bool important( const std::string & msg_r ) { return JobReport::important( msg_r, *this ); }
1064  bool data( const std::string & msg_r ) { return JobReport::data( msg_r, *this ); }
1065  };
1066 
1068 } // namespace zypp
1070 
1071 #endif // ZYPP_ZYPPCALLBACKS_H
bool operator()(const ProgressData &progress)
Definition: ZYppCallbacks.h:74
static const UserData::ContentType contentRpmout ZYPP_API
"zypp-rpm/installpkgsa": Additional rpm output (sent immediately).
TraitsType::constPtrType constPtr
Definition: Resolvable.h:59
virtual void start(Resolvable::constPtr, const Url &)
TraitsType::constPtrType constPtr
Definition: Package.h:39
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 const UserData::ContentType contentRpmout ZYPP_API
"zypp-rpm/scriptsa": Additional rpm output (sent immediately).
static bool error(const std::string &msg_r, const UserData &userData_r=UserData())
send error text
virtual void start(Resolvable::constPtr, const UserData &=UserData())
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:31
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())
static const UserData::ContentType contentRpmout ZYPP_API
"zypp-rpm/removepkgsa": Additional rpm output (sent immediately).
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
virtual bool progress(const ProgressData &)
virtual void start(const std::string &, const UserData &=UserData())
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 &)
bool debug(const std::string &msg_r)
delete conflicted lock
Error
result of merging
virtual bool result(const ProgressData &progress_r, const sat::Queue &noFilelist_r, const sat::FileConflicts &conflicts_r)
Indicate execution of a patch script.
virtual void progress(int, const UserData &=UserData())
static const UserData::ContentType contentLogline ZYPP_API
"zypp-rpm/logline" report a line suitable to be written to the screen.
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)
zypp::callback::UserData UserData
Definition: userrequest.h:18
Check for package file conflicts in commit (after download)
virtual bool progress(int, Pathname)
virtual void startDeltaDownload(const Pathname &, const ByteCount &)
static const UserData::ContentType contentRpmout ZYPP_API
"zypp-rpm/transactionsa": Additional rpm output (sent immediately).
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;)
static const UserData::ContentType contentRpmout ZYPP_API
"rpmout/removepkg": Additional rpm output (sent immediately).
virtual bool progress(const ProgressData &progress_r, const sat::Queue &noFilelist_r)
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Definition: ResTraits.h:93
virtual Action problem(Pathname, Error, const std::string &)
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
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 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:55
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:35
virtual void start(const ProgressData &, const RepoInfo)
static const UserData::ContentType contentRpmout ZYPP_API
"rpmout/installpkg": Additional rpm output (sent immediately).
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.
zypp::ContentType ContentType
Definition: userrequest.h:19
Report active throughout the whole rpm transaction.
Typesafe passing of user data via callbacks.
Definition: UserData.h:39
abort and return error
virtual void finish(Repository, const std::string &, Error, const std::string &)
virtual void progress(int, const UserData &=UserData())
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())
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())
virtual void finish(Resolvable::constPtr, Error, const UserData &=UserData())
Easy-to use interface to the ZYPP dependency resolver.
Definition: Application.cc:19
virtual void finish(Error, const UserData &=UserData())
static const UserData::ContentType contentRpmout ZYPP_API
"zypp-rpm/cleanupkgsa": Additional rpm output (sent immediately).
#define ZYPP_DEPRECATED
The ZYPP_DEPRECATED macro can be used to trigger compile-time warnings with gcc >= 3...
Definition: Globals.h:112
static const char *const loglevelPrefix(loglevel level_r)
Suggested prefix for log-lines to show.
Url manipulation class.
Definition: Url.h:92
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)