libzypp 17.37.17
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
29namespace 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
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
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
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
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
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
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
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 // progress for concurrently preloading a entire commit
408 {
409 enum Error {
411 NOT_FOUND, // the requested Url was not found
412 IO, // IO error
413 ACCESS_DENIED, // user authent. failed while accessing restricted file
414 ERROR // other error
415 };
416
420 virtual void start( const UserData &userData = UserData() ) {}
421
433 virtual bool progress( int value, const UserData &userData = UserData() )
434 { return true; }
435
442
443 virtual void fileStart(
444 const Pathname &localfile,
445 const UserData &userData = UserData()
446 ) {}
447
456 virtual void fileDone(
457 const Pathname &localfile,
458 Error error,
459 const UserData &userData = UserData()
460 ) {}
461
462 enum Result {
463 SUCCESS, //< everything was fetched as expected
464 MISS //< some files are missing
465 };
466
470 virtual void finish( Result res, const UserData &userData = UserData() ) {}
471 };
472
473 // authentication issues report
475 {
490 virtual bool prompt(const Url & /* url */,
491 const std::string & /* msg */,
492 AuthData & /* auth_data */)
493 {
494 return false;
495 }
496 };
497
499 } // namespace media
501
503 namespace target
504 {
507 {
511 virtual bool show( Patch::constPtr & /*patch*/ )
512 { return true; }
513 };
514
520 {
521 enum Notify { OUTPUT, PING };
522 enum Action {
523 ABORT, // abort commit and return error
524 RETRY, // (re)try to execute this script
525 IGNORE // ignore any failue and continue
526 };
527
530 virtual void start( const Package::constPtr & /*package*/,
531 const Pathname & /*script path*/ )
532 {}
533
537 virtual bool progress( Notify /*OUTPUT or PING*/,
538 const std::string & /*output*/ = std::string() )
539 { return true; }
540
541 virtual Action problem( const std::string & /*description*/ )
542 { return ABORT; }
543
544 virtual void finish()
545 {}
546 };
547
559 {
564 virtual bool start( const ProgressData & progress_r )
565 { return true; }
566
572 virtual bool progress( const ProgressData & progress_r, const sat::Queue & noFilelist_r )
573 { return true; }
574
581 virtual bool result( const ProgressData & progress_r, const sat::Queue & noFilelist_r, const sat::FileConflicts & conflicts_r )
582 { return true; }
583 };
584
585
587 namespace rpm
588 {
589
590 // progress for installing a resolvable
592 {
593 enum Action {
594 ABORT, // abort and return error
595 RETRY, // retry
596 IGNORE // ignore the failure
597 };
598
599 enum Error {
601 NOT_FOUND, // the requested Url was not found
602 IO, // IO error
603 INVALID // th resolvable is invalid
604 };
605
606 // the level of RPM pushing
613
614 virtual void start(
615 Resolvable::constPtr /*resolvable*/
616 ) {}
617
618 virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable*/)
619 { return true; }
620
622 Resolvable::constPtr /*resolvable*/
623 , Error /*error*/
624 , const std::string &/*description*/
625 , RpmLevel /*level*/
626 ) { return ABORT; }
627
628 virtual void finish(
629 Resolvable::constPtr /*resolvable*/
630 , Error /*error*/
631 , const std::string &/*reason*/
632 , RpmLevel /*level*/
633 ) {}
634
641 static const UserData::ContentType contentRpmout ZYPP_API;
642 };
643
644 // progress for removing a resolvable
646 {
647 enum Action {
648 ABORT, // abort and return error
649 RETRY, // retry
650 IGNORE // ignore the failure
651 };
652
653 enum Error {
655 NOT_FOUND, // the requested Url was not found
656 IO, // IO error
657 INVALID // th resolvable is invalid
658 };
659
660 virtual void start(
661 Resolvable::constPtr /*resolvable*/
662 ) {}
663
664 virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable*/)
665 { return true; }
666
668 Resolvable::constPtr /*resolvable*/
669 , Error /*error*/
670 , const std::string &/*description*/
671 ) { return ABORT; }
672
673 virtual void finish(
674 Resolvable::constPtr /*resolvable*/
675 , Error /*error*/
676 , const std::string &/*reason*/
677 ) {}
678
682 static const UserData::ContentType contentRpmout ZYPP_API;
683 };
684
685 // progress for rebuilding the database
687 {
688 enum Action {
689 ABORT, // abort and return error
690 RETRY, // retry
691 IGNORE // ignore the failure
692 };
693
694 enum Error {
696 FAILED // failed to rebuild
697 };
698
699 virtual void start(Pathname /*path*/) {}
700
701 virtual bool progress(int /*value*/, Pathname /*path*/)
702 { return true; }
703
705 Pathname /*path*/
706 , Error /*error*/
707 , const std::string &/*description*/
708 ) { return ABORT; }
709
710 virtual void finish(
711 Pathname /*path*/
712 , Error /*error*/
713 , const std::string &/*reason*/
714 ) {}
715 };
716
717#if LEGACY(17)
718 // progress for converting the database
720 struct ZYPP_DEPRECATED ConvertDBReport : public callback::ReportBase
721 {
722 enum Action {
723 ABORT, // abort and return error
724 RETRY, // retry
725 IGNORE // ignore the failure
726 };
727
728 enum Error {
729 NO_ERROR,
730 FAILED // conversion failed
731 };
732
733 virtual void start( Pathname /*path*/ )
734 {}
735
736 virtual bool progress( int/*value*/, Pathname/*path*/ )
737 { return true; }
738
739 virtual Action problem( Pathname/*path*/, Error/*error*/, const std::string &/*description*/ )
740 { return ABORT; }
741
742 virtual void finish( Pathname/*path*/, Error/*error*/, const std::string &/*reason*/ )
743 {}
744 };
745#endif
746
756 {
762 static const UserData::ContentType contentLogline ZYPP_API;
764 enum class loglevel { dbg, msg, war, err, crt };
766 static const char *const loglevelPrefix( loglevel level_r )
767 {
768 switch ( level_r ) {
769 case loglevel::crt: return "fatal error: ";
770 case loglevel::err: return "error: ";
771 case loglevel::war: return "warning: ";
772 case loglevel::msg: return "";
773 case loglevel::dbg: return "D: ";
774 }
775 return "";
776 }
777 };
778
779 // Generic transaction reports, this is used for verifying and preparing tasks, the name param
780 // for the start function defines which report we are looking at
782 {
783 enum Error {
784 NO_ERROR, // everything went perfectly fine
785 FINISHED_WITH_ERRORS, // the transaction was finished, but some errors happened
786 FAILED // the transaction failed completely
787 };
788
789 virtual void start(
790 const std::string &/*name*/,
791 const UserData & = UserData() /*userdata*/
792 ) {}
793
794 virtual void progress(
795 int /*value*/,
796 const UserData & = UserData() /*userdata*/
797 ) { }
798
799 virtual void finish(
800 Error /*error*/,
801 const UserData & = UserData() /*userdata*/
802 ) {}
803
808 static const UserData::ContentType contentRpmout ZYPP_API;
809 };
810
811
812 // progress for installing a resolvable in single transaction mode
814 {
815 enum Error {
817 NOT_FOUND, // the requested Url was not found
818 IO, // IO error
819 INVALID // th resolvable is invalid
820 };
821
822 virtual void start(
823 Resolvable::constPtr /*resolvable*/,
824 const UserData & = UserData() /*userdata*/
825 ) {}
826
827 virtual void progress(
828 int /*value*/,
829 Resolvable::constPtr /*resolvable*/,
830 const UserData & = UserData() /*userdata*/
831 ) { return; }
832
833 virtual void finish(
834 Resolvable::constPtr /*resolvable*/
835 , Error /*error*/,
836 const UserData & = UserData() /*userdata*/
837 ) {}
838
844 static const UserData::ContentType contentRpmout ZYPP_API;
845 };
846
847 // progress for removing a resolvable in single transaction mode
849 {
850 enum Error {
852 NOT_FOUND, // the requested Url was not found
853 IO, // IO error
854 INVALID // th resolvable is invalid
855 };
856
857 virtual void start(
858 Resolvable::constPtr /*resolvable*/,
859 const UserData & = UserData() /*userdata*/
860 ) {}
861
862 virtual void progress(
863 int /*value*/,
864 Resolvable::constPtr /*resolvable*/,
865 const UserData & = UserData() /*userdata*/
866 ) { return; }
867
868 virtual void finish(
869 Resolvable::constPtr /*resolvable*/
870 , Error /*error*/
871 , const UserData & = UserData() /*userdata*/
872 ) {}
873
877 static const UserData::ContentType contentRpmout ZYPP_API;
878 };
879
880 // progress for cleaning up the old version of a package after it was upgraded to a new version
882 {
883 enum Error {
885 };
886
887 virtual void start(
888 const std::string & /*nvra*/,
889 const UserData & = UserData() /*userdata*/
890 ) {}
891
892 virtual void progress(
893 int /*value*/,
894 const UserData & = UserData() /*userdata*/
895 ) { return; }
896
897 virtual void finish(
898 Error /*error*/,
899 const UserData & = UserData() /*userdata*/
900 ) {}
901
905 static const UserData::ContentType contentRpmout ZYPP_API;
906 };
907
908
909 // progress for script thats executed during a commit transaction
910 // the resolvable can be null, for things like posttrans scripts
912 {
913 enum Error {
916 CRITICAL // the script failure prevented solvable installation
917 };
918
919 virtual void start(
920 const std::string & /*scriptType*/,
921 const std::string & /*packageName ( can be empty )*/,
922 Resolvable::constPtr /*resolvable ( can be null )*/,
923 const UserData & = UserData() /*userdata*/
924 ) {}
925
926 virtual void progress(
927 int /*value*/,
928 Resolvable::constPtr /*resolvable*/,
929 const UserData & = UserData() /*userdata*/
930 ) { return; }
931
932 virtual void finish(
933 Resolvable::constPtr /*resolvable*/
934 , Error /*error*/,
935 const UserData & = UserData() /*userdata*/
936 ) {}
937
943 static const UserData::ContentType contentRpmout ZYPP_API;
944 };
945
947 } // namespace rpm
949
951 } // namespace target
953
954 class PoolQuery;
955
958
961
963 {
972
980
984 virtual void start(
985 ) {}
986
991 virtual bool progress(int /*value*/)
992 { return true; }
993
999 const PoolQuery& /*error*/
1000 ) { return DELETE; }
1001
1005 virtual void finish(
1006 Error /*error*/
1007 ) {}
1008
1009 };
1010
1015 {
1025
1033
1042
1043 virtual void start() {}
1044
1049 virtual bool progress()
1050 { return true; }
1051
1056 const PoolQuery&,
1058 ) { return DELETE; }
1059
1060 virtual void finish(
1061 Error /*error*/
1062 ) {}
1063 };
1064
1070 {
1071 public:
1075 };
1076 typedef base::EnumClass<EMsgTypeDef> MsgType;
1077
1080
1082
1083 public:
1085 virtual bool message( MsgType type_r, const std::string & msg_r, const UserData & userData_r ) const
1086 { return true; }
1087
1088
1091
1092 static callback::SendReport<JobReport> & instance(); // impl in ZYppImpl.cc
1093
1095 static bool debug( const std::string & msg_r, const UserData & userData_r = UserData() )
1096 { return instance()->message( MsgType::debug, msg_r, userData_r ); }
1097
1099 static bool info( const std::string & msg_r, const UserData & userData_r = UserData() )
1100 { return instance()->message( MsgType::info, msg_r, userData_r ); }
1101
1103 static bool warning( const std::string & msg_r, const UserData & userData_r = UserData() )
1104 { return instance()->message( MsgType::warning, msg_r, userData_r ); }
1105
1107 static bool error( const std::string & msg_r, const UserData & userData_r = UserData() )
1108 { return instance()->message( MsgType::error, msg_r, userData_r ); }
1109
1111 static bool important( const std::string & msg_r, const UserData & userData_r = UserData() )
1112 { return instance()->message( MsgType::important, msg_r, userData_r ); }
1113
1115 static bool data( const std::string & msg_r, const UserData & userData_r = UserData() )
1116 { return instance()->message( MsgType::data, msg_r, userData_r ); }
1117
1118 };
1119
1125 {
1127
1128 bool debug( const std::string & msg_r ) { return JobReport::debug( msg_r, *this ); }
1129 bool info( const std::string & msg_r ) { return JobReport::info( msg_r, *this ); }
1130 bool warning( const std::string & msg_r ) { return JobReport::warning( msg_r, *this ); }
1131 bool error( const std::string & msg_r ) { return JobReport::error( msg_r, *this ); }
1132 bool important( const std::string & msg_r ) { return JobReport::important( msg_r, *this ); }
1133 bool data( const std::string & msg_r ) { return JobReport::data( msg_r, *this ); }
1134 };
1135
1137} // namespace zypp
1139
1140#endif // ZYPP_ZYPPCALLBACKS_H
Store and operate with byte count.
Definition ByteCount.h:32
TraitsType::constPtrType constPtr
Definition Package.h:39
TraitsType::constPtrType constPtr
Definition Patch.h:43
Meta-data query API.
Definition PoolQuery.h:91
Maintain [min,max] and counter (value) for progress counting.
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
bool finalReport() const
What is known about a repository.
Definition RepoInfo.h:72
TraitsType::constPtrType constPtr
Definition Resolvable.h:59
Url manipulation class.
Definition Url.h:93
Typesafe passing of user data via callbacks.
Definition UserData.h:40
UserData()
Default ctor.
Definition UserData.h:55
Class for handling media authentication data.
Definition authdata.h:31
Libsolv queue representing file conflicts.
Libsolv Id queue wrapper.
Definition Queue.h:36
Libsolv interface
Easy-to use interface to the ZYPP dependency resolver.
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Definition Arch.h:247
Callback for cleaning locks which doesn't lock anything in pool.
@ ABORTED
cleaning aborted by user
Action
action performed by cleaning api to specific lock
@ ABORT
abort and return error
@ DELETE
delete empty lock
virtual void start()
cleaning is started
virtual Action execute(const PoolQuery &)
When find empty lock ask what to do with it.
virtual bool progress(int)
progress of cleaning specifies in percents
virtual void finish(Error)
cleaning is done
message type (use like 'enum class MsgType')
Generic report for sending messages.
static bool debug(const std::string &msg_r, const UserData &userData_r=UserData())
send debug message text
base::EnumClass< EMsgTypeDef > MsgType
'enum class MsgType'
static bool warning(const std::string &msg_r, const UserData &userData_r=UserData())
send warning text
static bool error(const std::string &msg_r, const UserData &userData_r=UserData())
send error text
virtual bool message(MsgType type_r, const std::string &msg_r, const UserData &userData_r) const
Send a ready to show message text.
static bool data(const std::string &msg_r, const UserData &userData_r=UserData())
send data message
callback::UserData UserData
typsafe map of userdata
static bool important(const std::string &msg_r, const UserData &userData_r=UserData())
send important message text
static const ContentType repoRefreshMirrorlist
static callback::SendReport< JobReport > & instance()
Singleton sender instance.
Definition ZYppImpl.cc:100
static bool info(const std::string &msg_r, const UserData &userData_r=UserData())
send message text
ProgressReportAdaptor(callback::SendReport< ProgressReport > &report)
ProgressData::ReceiverFnc _fnc
callback::SendReport< ProgressReport > & _report
ProgressReportAdaptor(const ProgressData::ReceiverFnc &fnc, callback::SendReport< ProgressReport > &report)
bool operator()(const ProgressData &progress)
virtual void start(const ProgressData &)
virtual void finish(const ProgressData &)
virtual bool progress(const ProgressData &)
this callback handles merging old locks with newly added or removed
Action
action for old lock which is in conflict
@ DELETE
delete conflicted lock
@ IGNORE
skip conflict lock
@ ABORT
abort and return error
virtual bool progress()
merging still live
virtual void finish(Error)
ConflictState
type of conflict of old and new lock
@ INTERSECT
locks lock some file and unlocking lock unlock only part of iti, so removing old lock can unlock more...
@ SAME_RESULTS
locks lock same item in pool but its parameters are different
@ ABORTED
cleaning aborted by user
virtual Action conflict(const PoolQuery &, ConflictState)
When user unlock something which is locked by non-identical query.
JobReport convenience sending this instance of UserData with each message.
bool error(const std::string &msg_r)
bool data(const std::string &msg_r)
bool info(const std::string &msg_r)
bool debug(const std::string &msg_r)
bool important(const std::string &msg_r)
bool warning(const std::string &msg_r)
UserData::ContentType ContentType
Definition Callback.h:152
callback::UserData UserData
Definition Callback.h:151
virtual bool prompt(const Url &, const std::string &, AuthData &)
Prompt for authentication data.
virtual void fileDone(const Pathname &localfile, Error error, const UserData &userData=UserData())
File finished to download, Error indicated if it was successful for not.
virtual bool progress(int value, const UserData &userData=UserData())
Overall Download progress.
virtual void start(const UserData &userData=UserData())
virtual void finish(Result res, const UserData &userData=UserData())
virtual void fileStart(const Pathname &localfile, const UserData &userData=UserData())
File just started to download.
virtual void finish(const Url &, Error, const std::string &)
virtual bool progress(int, const Url &, double dbps_avg=-1, double dbps_current=-1)
Download progress.
virtual void start(const Url &, Pathname)
virtual Action problem(const Url &, Error, const std::string &)
@ IO_SOFT
IO error which can happen on worse connection like timeout exceed.
virtual Action requestMedia(Url &, unsigned, const std::string &, Error, const std::string &, const std::vector< std::string > &, unsigned int &)
ScopedDisableMediaChangeReport(bool condition_r=true)
Disbale MediaChangeReport if condition_r is true.
Definition ZYppImpl.cc:87
shared_ptr< callback::TempConnect< media::MediaChangeReport > > _guard
virtual void pkgGpgCheck(const UserData &userData_r=UserData())
Detail information about the result of a performed pkgGpgCheck.
virtual void problemDeltaApply(const std::string &)
virtual void finish(Resolvable::constPtr, Error, const std::string &)
virtual void startDeltaApply(const Pathname &)
virtual void infoInCache(Resolvable::constPtr res_r, const Pathname &localfile_r)
Hint that package is available in the local cache (no download needed).
virtual Action problem(Resolvable::constPtr, Error, const std::string &)
virtual void problemDeltaDownload(const std::string &)
virtual void startDeltaDownload(const Pathname &, const ByteCount &)
virtual bool progress(int, Resolvable::constPtr)
virtual void start(Resolvable::constPtr, const Url &)
virtual Action problem(const Url &, Error, const std::string &)
virtual void start(const Url &)
virtual void failedProbe(const Url &, const std::string &)
virtual void finish(const Url &, Error, const std::string &)
virtual bool progress(const Url &, int)
virtual void successProbe(const Url &, const std::string &)
virtual void finish(const zypp::Url &, Error, const std::string &)
virtual void start(const zypp::Url &)
virtual Action problem(const zypp::Url &, Error, const std::string &)
virtual void start(const ProgressData &, const RepoInfo)
virtual void finish(Repository, const std::string &, Error, const std::string &)
virtual bool progress(const ProgressData &)
virtual Action problem(Repository, Error, const std::string &)
Check for package file conflicts in commit (after download)
virtual bool start(const ProgressData &progress_r)
virtual bool result(const ProgressData &progress_r, const sat::Queue &noFilelist_r, const sat::FileConflicts &conflicts_r)
virtual bool progress(const ProgressData &progress_r, const sat::Queue &noFilelist_r)
Request to display the pre commit message of a patch.
virtual bool show(Patch::constPtr &)
Display patch->message().
Indicate execution of a patch script.
virtual bool progress(Notify, const std::string &=std::string())
Progress provides the script output.
virtual Action problem(const std::string &)
Report error.
virtual void finish()
Report success.
virtual void start(const Package::constPtr &, const Pathname &)
Start executing the script provided by package.
virtual void start(const std::string &, const UserData &=UserData())
virtual void progress(int, const UserData &=UserData())
virtual void finish(Error, const UserData &=UserData())
static const UserData::ContentType contentRpmout ZYPP_API
"zypp-rpm/cleanupkgsa": Additional rpm output (sent immediately).
virtual void finish(Resolvable::constPtr, Error, const UserData &=UserData())
virtual void progress(int, Resolvable::constPtr, const UserData &=UserData())
static const UserData::ContentType contentRpmout ZYPP_API
"zypp-rpm/scriptsa": Additional rpm output (sent immediately).
virtual void start(const std::string &, const std::string &, Resolvable::constPtr, const UserData &=UserData())
virtual void finish(Resolvable::constPtr, Error, const UserData &=UserData())
static const UserData::ContentType contentRpmout ZYPP_API
"zypp-rpm/installpkgsa": Additional rpm output (sent immediately).
virtual void start(Resolvable::constPtr, const UserData &=UserData())
virtual void progress(int, Resolvable::constPtr, const UserData &=UserData())
static const UserData::ContentType contentRpmout ZYPP_API
"rpmout/installpkg": Additional rpm output (sent immediately).
virtual bool progress(int, Resolvable::constPtr)
virtual Action problem(Resolvable::constPtr, Error, const std::string &, RpmLevel)
virtual void start(Resolvable::constPtr)
virtual void finish(Resolvable::constPtr, Error, const std::string &, RpmLevel)
virtual bool progress(int, Pathname)
virtual void finish(Pathname, Error, const std::string &)
virtual Action problem(Pathname, Error, const std::string &)
virtual void finish(Resolvable::constPtr, Error, const UserData &=UserData())
virtual void start(Resolvable::constPtr, const UserData &=UserData())
static const UserData::ContentType contentRpmout ZYPP_API
"zypp-rpm/removepkgsa": Additional rpm output (sent immediately).
virtual void progress(int, Resolvable::constPtr, const UserData &=UserData())
virtual void start(Resolvable::constPtr)
virtual Action problem(Resolvable::constPtr, Error, const std::string &)
static const UserData::ContentType contentRpmout ZYPP_API
"rpmout/removepkg": Additional rpm output (sent immediately).
virtual void finish(Resolvable::constPtr, Error, const std::string &)
virtual bool progress(int, Resolvable::constPtr)
Report active throughout the whole rpm transaction.
static const char *const loglevelPrefix(loglevel level_r)
Suggested prefix for log-lines to show.
loglevel
Rendering hint for log-lines to show.
static const UserData::ContentType contentLogline ZYPP_API
"zypp-rpm/logline" report a line suitable to be written to the screen.
virtual void progress(int, const UserData &=UserData())
virtual void finish(Error, const UserData &=UserData())
virtual void start(const std::string &, const UserData &=UserData())
static const UserData::ContentType contentRpmout ZYPP_API
"zypp-rpm/transactionsa": 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