1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/Source.h
12 #ifndef ZYPP_ZYPPCALLBACKS_H
13 #define ZYPP_ZYPPCALLBACKS_H
18 #include "zypp/Callback.h"
20 ///////////////////////////////////////////////////////////////////
22 { /////////////////////////////////////////////////////////////////
25 // progress for downloading a resolvable
26 struct DownloadResolvableReport : public callback::ReportBase
28 virtual void start() {}
29 virtual void progress(int value) {]
30 virtual void finish() {}
33 // progress for downloading a specific file
34 struct DownloadFileReport : public callback::ReportBase
36 virtual void start() {}
37 virtual void progress(int value) {]
38 virtual void finish() {}
41 // progress for refreshing a source data
42 struct RefreshSourceReport : public callback::ReportBase
44 virtual void start() {}
45 virtual void progress(int value) {]
46 virtual void finish() {}
49 // progress for downloading a resolvable
50 struct CreateSourceReport : public callback::ReportBase
52 virtual void start() {}
53 virtual void progress(int value) {]
54 virtual void finish() {}
57 // progress for downloading a resolvable
58 struct RefreshSourceReport : public callback::ReportBase
60 virtual void start() {}
61 virtual void progress(int value) {]
62 virtual void finish() {}
65 /////////////////////////////////////////////////////////////////
67 ///////////////////////////////////////////////////////////////////
69 ///////////////////////////////////////////////////////////////////
73 // media change request callback
74 struct MediaChangeReport : public callback::ReportBase
77 ABORT, // abort and return error
81 virtual Action userAction() { return ABORT; }
84 /////////////////////////////////////////////////////////////////
86 ///////////////////////////////////////////////////////////////////
88 ///////////////////////////////////////////////////////////////////
90 { ///////////////////////////////////////////////////////////////////
94 // progress for installing a resolvable
95 struct InstallResolvableReport : public callback::ReportBase
98 ABORT, // abort and return error
103 virtual void start() {}
104 virtual void progress(int value) {]
105 virtual Action error () { return ABORT; }
106 virtual void finish() {}
109 // progress for removing a resolvable
110 struct RemoveResolvableReport : public callback::ReportBase
113 ABORT, // abort and return error
118 virtual void start() {}
119 virtual void progress(int value) {]
120 virtual Action error () { return ABORT; }
121 virtual void finish() {}
124 // progress for rebuilding the database
125 struct RebuildDBReport : public callback::ReportBase
127 virtual void start() {}
128 virtual void progress(int value) {]
129 virtual void finish() {}
132 // progress for converting the database
133 struct ConvertDBReport : public callback::ReportBase
135 virtual void start() {}
136 virtual void progress(int value) {]
137 virtual void finish() {}
140 /////////////////////////////////////////////////////////////////
142 ///////////////////////////////////////////////////////////////////
144 /////////////////////////////////////////////////////////////////
145 } // namespace target
146 ///////////////////////////////////////////////////////////////////
148 /////////////////////////////////////////////////////////////////
150 ///////////////////////////////////////////////////////////////////
152 #endif // ZYPP_ZYPPCALLBACKS_H