27b0c4f0d5b80afad6c4d6b12b0adfd857b074bc
[platform/upstream/libzypp.git] / zypp / ZYppCallbacks.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/ZYppCallbacks.h
10  *
11 */
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/ProgressData.h"
25 #include "zypp/media/MediaUserAuth.h"
26
27 ///////////////////////////////////////////////////////////////////
28 namespace zypp
29 { /////////////////////////////////////////////////////////////////
30
31   ///////////////////////////////////////////////////////////////////
32   namespace sat
33   {
34     class Queue;
35     class FileConflicts;
36   } // namespace sat
37   ///////////////////////////////////////////////////////////////////
38
39   struct ProgressReport : public callback::ReportBase
40   {
41     virtual void start( const ProgressData &/*task*/ )
42     {}
43
44     virtual bool progress( const ProgressData &/*task*/ )
45     { return true; }
46
47 //     virtual Action problem(
48 //         Repo /*source*/
49 //         , Error /*error*/
50 //         , const std::string &/*description*/ )
51 //     { return ABORT; }
52
53     virtual void finish( const ProgressData &/*task*/ )
54     {}
55
56   };
57
58   struct ProgressReportAdaptor
59   {
60
61     ProgressReportAdaptor( const ProgressData::ReceiverFnc &fnc,
62                            callback::SendReport<ProgressReport> &report )
63       : _fnc(fnc)
64       , _report(report)
65       , _first(true)
66     {
67     }
68
69     bool operator()( const ProgressData &progress )
70     {
71       if ( _first )
72       {
73         _report->start(progress);
74         _first = false;
75       }
76
77       _report->progress(progress);
78       bool value = true;
79       if ( _fnc )
80         value = _fnc(progress);
81
82
83       if ( progress.finalReport() )
84       {
85         _report->finish(progress);
86       }
87       return value;
88     }
89
90     ProgressData::ReceiverFnc _fnc;
91     callback::SendReport<ProgressReport> &_report;
92     bool _first;
93   };
94
95   ////////////////////////////////////////////////////////////////////////////
96
97   namespace repo
98   {
99     // progress for downloading a resolvable
100     struct DownloadResolvableReport : public callback::ReportBase
101     {
102       enum Action {
103         ABORT,  // abort and return error
104         RETRY,  // retry
105         IGNORE, // ignore this resolvable but continue
106       };
107
108       enum Error {
109         NO_ERROR,
110         NOT_FOUND,      // the requested Url was not found
111         IO,             // IO error
112         INVALID         // the downloaded file is invalid
113       };
114
115       /** Hint that package is available in the local cache (no download needed).
116        * This will be the only trigger for an already cached package.
117        */
118       virtual void infoInCache( Resolvable::constPtr res_r, const Pathname & localfile_r )
119       {}
120
121       virtual void start(
122         Resolvable::constPtr /*resolvable_ptr*/
123         , const Url &/*url*/
124       ) {}
125
126
127       // Dowmload delta rpm:
128       // - path below url reported on start()
129       // - expected download size (0 if unknown)
130       // - download is interruptable
131       // - problems are just informal
132       virtual void startDeltaDownload( const Pathname & /*filename*/, const ByteCount & /*downloadsize*/ )
133       {}
134
135       virtual bool progressDeltaDownload( int /*value*/ )
136       { return true; }
137
138       virtual void problemDeltaDownload( const std::string &/*description*/ )
139       {}
140
141       virtual void finishDeltaDownload()
142       {}
143
144       // Apply delta rpm:
145       // - local path of downloaded delta
146       // - aplpy is not interruptable
147       // - problems are just informal
148       virtual void startDeltaApply( const Pathname & /*filename*/ )
149       {}
150
151       virtual void progressDeltaApply( int /*value*/ )
152       {}
153
154       virtual void problemDeltaApply( const std::string &/*description*/ )
155       {}
156
157       virtual void finishDeltaApply()
158       {}
159
160       /** \deprecated Unused since 2008 */
161       virtual ZYPP_DEPRECATED void startPatchDownload( const Pathname & /*filename*/, const ByteCount & /*downloadsize*/ )
162       {}
163
164       /** \deprecated Unused since 2008 */
165       virtual ZYPP_DEPRECATED bool progressPatchDownload( int /*value*/ )
166       { return true; }
167
168       /** \deprecated Unused since 2008 */
169       virtual ZYPP_DEPRECATED void problemPatchDownload( const std::string &/*description*/ )
170       {}
171
172       /** \deprecated Unused since 2008 */
173       virtual ZYPP_DEPRECATED void finishPatchDownload()
174       {}
175
176
177       // return false if the download should be aborted right now
178       virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable_ptr*/)
179       { return true; }
180
181       virtual Action problem(
182         Resolvable::constPtr /*resolvable_ptr*/
183         , Error /*error*/
184         , const std::string &/*description*/
185       ) { return ABORT; }
186
187       virtual void finish(Resolvable::constPtr /*resolvable_ptr*/
188         , Error /*error*/
189         , const std::string &/*reason*/
190       ) {}
191     };
192
193     // progress for probing a source
194     struct ProbeRepoReport : public callback::ReportBase
195     {
196       enum Action {
197         ABORT,  // abort and return error
198         RETRY   // retry
199       };
200
201       enum Error {
202         NO_ERROR,
203         NOT_FOUND,      // the requested Url was not found
204         IO,             // IO error
205         INVALID,                // th source is invalid
206         UNKNOWN
207       };
208
209       virtual void start(const Url &/*url*/) {}
210       virtual void failedProbe( const Url &/*url*/, const std::string &/*type*/ ) {}
211       virtual void successProbe( const Url &/*url*/, const std::string &/*type*/ ) {}
212       virtual void finish(const Url &/*url*/, Error /*error*/, const std::string &/*reason*/ ) {}
213
214       virtual bool progress(const Url &/*url*/, int /*value*/)
215       { return true; }
216
217       virtual Action problem( const Url &/*url*/, Error /*error*/, const std::string &/*description*/ ) { return ABORT; }
218     };
219
220     struct RepoCreateReport : public callback::ReportBase
221     {
222       enum Action {
223         ABORT,  // abort and return error
224         RETRY,  // retry
225         IGNORE  // skip refresh, ignore failed refresh
226       };
227
228       enum Error {
229         NO_ERROR,
230         NOT_FOUND,      // the requested Url was not found
231         IO,             // IO error
232         REJECTED,
233         INVALID, // th source is invali
234         UNKNOWN
235       };
236
237       virtual void start( const zypp::Url &/*url*/ ) {}
238       virtual bool progress( int /*value*/ )
239       { return true; }
240
241       virtual Action problem(
242           const zypp::Url &/*url*/
243           , Error /*error*/
244           , const std::string &/*description*/ )
245       { return ABORT; }
246
247       virtual void finish(
248           const zypp::Url &/*url*/
249           , Error /*error*/
250           , const std::string &/*reason*/ )
251       {}
252     };
253
254     struct RepoReport : public callback::ReportBase
255     {
256       enum Action {
257         ABORT,  // abort and return error
258         RETRY,  // retry
259         IGNORE  // skip refresh, ignore failed refresh
260       };
261
262       enum Error {
263         NO_ERROR,
264         NOT_FOUND,      // the requested Url was not found
265         IO,             // IO error
266         INVALID         // th source is invalid
267       };
268
269       virtual void start( const ProgressData &/*task*/, const RepoInfo /*repo*/  ) {}
270       virtual bool progress( const ProgressData &/*task*/ )
271       { return true; }
272
273       virtual Action problem(
274           Repository /*source*/
275           , Error /*error*/
276           , const std::string &/*description*/ )
277       { return ABORT; }
278
279       virtual void finish(
280           Repository /*source*/
281           , const std::string &/*task*/
282           , Error /*error*/
283           , const std::string &/*reason*/ )
284       {}
285     };
286
287
288     /////////////////////////////////////////////////////////////////
289   } // namespace source
290   ///////////////////////////////////////////////////////////////////
291
292   ///////////////////////////////////////////////////////////////////
293   namespace media
294   {
295     // media change request callback
296     struct MediaChangeReport : public callback::ReportBase
297     {
298       enum Action {
299         ABORT,  // abort and return error
300         RETRY,  // retry
301         IGNORE, // ignore this media in future, not available anymore
302         IGNORE_ID,      // ignore wrong medium id
303         CHANGE_URL,     // change media URL
304         EJECT           // eject the medium
305       };
306
307       enum Error {
308         NO_ERROR,
309         NOT_FOUND,  // the medie not found at all
310         IO,     // error accessing the media
311         INVALID, // media is broken
312         WRONG,  // wrong media, need a different one
313         IO_SOFT       /**< IO error which can happen on worse connection like timeout exceed */
314       };
315
316       /**
317        *
318        * \param url         in: url for which the media is requested,
319        *                    out: url to use instead of the original one
320        * \param mediumNr    requested medium number
321        * \param label       label of requested medium
322        * \param error       type of error from \ref Error enum
323        * \param description error message (media not desired or error foo occured)
324        * \param devices     list of the available devices (for eject)
325        * \param dev_current in: index of the currently used device in the \a devices list
326        *                    out: index of the devices to be ejected in the \a devices list
327        * \return \ref Action (ABORT by default)
328        */
329       virtual Action requestMedia(
330         Url & /* url (I/O parameter) */
331         , unsigned /*mediumNr*/
332         , const std::string & /* label */
333         , Error /*error*/
334         , const std::string & /*description*/
335         , const std::vector<std::string> & /* devices */
336         , unsigned int & /* dev_current (I/O param) */
337       ) { return ABORT; }
338     };
339
340     ///////////////////////////////////////////////////////////////////
341     /// \class ScopedDisableMediaChangeReport
342     /// \brief Temporarily disable MediaChangeReport
343     /// Sometimes helpful to suppress interactive messages connected to
344     /// MediaChangeReport while fallback URLs are avaialble.
345     struct ScopedDisableMediaChangeReport
346     {
347       /** Disbale MediaChangeReport if \a condition_r is \c true.*/
348       ScopedDisableMediaChangeReport( bool condition_r = true );
349     private:
350       shared_ptr<callback::TempConnect<media::MediaChangeReport> > _guard;
351     };
352
353     // progress for downloading a file
354     struct DownloadProgressReport : public callback::ReportBase
355     {
356         enum Action {
357           ABORT,  // abort and return error
358           RETRY,        // retry
359           IGNORE        // ignore the failure
360         };
361
362         enum Error {
363           NO_ERROR,
364           NOT_FOUND,    // the requested Url was not found
365           IO,           // IO error
366           ACCESS_DENIED, // user authent. failed while accessing restricted file
367           ERROR // other error
368         };
369
370         virtual void start( const Url &/*file*/, Pathname /*localfile*/ ) {}
371
372         /**
373          * Download progress.
374          *
375          * \param value        Percentage value.
376          * \param file         File URI.
377          * \param dbps_avg     Average download rate so far. -1 if unknown.
378          * \param dbps_current Current download (cca last 1 sec). -1 if unknown.
379          */
380         virtual bool progress(int /*value*/, const Url &/*file*/,
381                               double dbps_avg = -1,
382                               double dbps_current = -1)
383         { return true; }
384
385         virtual Action problem(
386           const Url &/*file*/
387           , Error /*error*/
388           , const std::string &/*description*/
389         ) { return ABORT; }
390
391         virtual void finish(
392           const Url &/*file*/
393           , Error /*error*/
394           , const std::string &/*reason*/
395         ) {}
396     };
397
398     // authentication issues report
399     struct AuthenticationReport : public callback::ReportBase
400     {
401       /**
402        * Prompt for authentication data.
403        *
404        * \param url       URL which required the authentication
405        * \param msg       prompt text
406        * \param auth_data input/output object for handling authentication
407        *        data. As an input parameter auth_data can be prefilled with
408        *        username (from previous try) or auth_type (available
409        *        authentication methods aquired from server (only CurlAuthData)).
410        *        As an output parameter it serves for sending username, pasword
411        *        or other special data (derived AuthData objects).
412        * \return true if user chooses to continue with authentication,
413        *         false otherwise
414        */
415       virtual bool prompt(const Url & /* url */,
416         const std::string & /* msg */,
417         AuthData & /* auth_data */)
418       {
419         return false;
420       }
421     };
422
423     /////////////////////////////////////////////////////////////////
424   } // namespace media
425   ///////////////////////////////////////////////////////////////////
426
427   ///////////////////////////////////////////////////////////////////
428   namespace target
429   {
430     /** Request to display the pre commit message of a patch. */
431     struct PatchMessageReport : public callback::ReportBase
432     {
433       /** Display \c patch->message().
434        * Return \c true to continue, \c false to abort commit.
435       */
436       virtual bool show( Patch::constPtr & /*patch*/ )
437       { return true; }
438     };
439
440     /** Indicate execution of a patch script. This is a sort of
441      * \c %post script shipped by a package and to be executed
442      * after the package was installed.
443     */
444     struct PatchScriptReport : public callback::ReportBase
445     {
446       enum Notify { OUTPUT, PING };
447       enum Action {
448         ABORT,  // abort commit and return error
449         RETRY,  // (re)try to execute this script
450         IGNORE  // ignore any failue and continue
451       };
452
453       /** Start executing the script provided by package.
454       */
455       virtual void start( const Package::constPtr & /*package*/,
456                           const Pathname & /*script path*/ )
457       {}
458       /** Progress provides the script output. If the script is quiet,
459        * from time to time still-alive pings are sent to the ui. Returning \c FALSE
460        * aborts script execution.
461       */
462       virtual bool progress( Notify /*OUTPUT or PING*/,
463                              const std::string & /*output*/ = std::string() )
464       { return true; }
465       /** Report error. */
466       virtual Action problem( const std::string & /*description*/ )
467       { return ABORT; }
468       /** Report success. */
469       virtual void finish()
470       {}
471     };
472
473     ///////////////////////////////////////////////////////////////////
474     /// \class FindFileConflictstReport
475     /// \brief Check for package file conflicts in commit (after download)
476     ///
477     /// File conflict check requires that all packages are downloaded and
478     /// now available in the cache (need to access the filelists). Missing
479     /// packages are omitted from check and their number is reported in
480     /// \a noFilelist_r. This usually happens if download mode 'as-needed'
481     /// is used.
482     ///////////////////////////////////////////////////////////////////
483     struct FindFileConflictstReport : public callback::ReportBase
484     {
485       /**
486        * \param progress_r      Progress counter for packages to check.
487        * \return \c true to continue, \c false upon user abort request.
488        */
489       virtual bool start( const ProgressData & progress_r )
490       { return true; }
491
492       /**
493        * \param progress_r      Progress counter for packages to check.
494        * \param noFilelist_r    Queue of so far skipped solvables (no filelist/not yet downloaded).
495        * \return \c true to continue, \c false upon user abort request.
496        */
497       virtual bool progress( const ProgressData & progress_r, const sat::Queue & noFilelist_r )
498       { return true; }
499
500       /**
501        * \param progress_r      Progress counter for packages to check.
502        * \param noFilelist_r    Queue of skipped solvables (no filelist/not yet downloaded).
503        * \param conflicts_r     File conflits queue.
504        * \return \c true to continue, \c false upon user abort request.
505        */
506       virtual bool result( const ProgressData & progress_r, const sat::Queue & noFilelist_r, const sat::FileConflicts & conflicts_r )
507       { return true; }
508     };
509
510
511     ///////////////////////////////////////////////////////////////////
512     namespace rpm
513     {
514
515       // progress for installing a resolvable
516       struct InstallResolvableReport : public callback::ReportBase
517       {
518         enum Action {
519           ABORT,  // abort and return error
520           RETRY,        // retry
521           IGNORE        // ignore the failure
522         };
523
524         enum Error {
525           NO_ERROR,
526           NOT_FOUND,    // the requested Url was not found
527           IO,           // IO error
528           INVALID               // th resolvable is invalid
529         };
530
531         // the level of RPM pushing
532         /** \deprecated We fortunately no longer do 3 attempts. */
533         enum RpmLevel {
534             RPM,
535             RPM_NODEPS,
536             RPM_NODEPS_FORCE    //!< only this one used
537         };
538
539         virtual void start(
540           Resolvable::constPtr /*resolvable*/
541         ) {}
542
543         virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable*/)
544         { return true; }
545
546         virtual Action problem(
547           Resolvable::constPtr /*resolvable*/
548           , Error /*error*/
549           , const std::string &/*description*/
550           , RpmLevel /*level*/
551         ) { return ABORT; }
552
553         virtual void finish(
554           Resolvable::constPtr /*resolvable*/
555           , Error /*error*/
556           , const std::string &/*reason*/
557           , RpmLevel /*level*/
558         ) {}
559       };
560
561       // progress for removing a resolvable
562       struct RemoveResolvableReport : public callback::ReportBase
563       {
564         enum Action {
565           ABORT,  // abort and return error
566           RETRY,        // retry
567           IGNORE        // ignore the failure
568         };
569
570         enum Error {
571           NO_ERROR,
572           NOT_FOUND,    // the requested Url was not found
573           IO,           // IO error
574           INVALID               // th resolvable is invalid
575         };
576
577         virtual void start(
578           Resolvable::constPtr /*resolvable*/
579         ) {}
580
581         virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable*/)
582         { return true; }
583
584         virtual Action problem(
585           Resolvable::constPtr /*resolvable*/
586           , Error /*error*/
587           , const std::string &/*description*/
588         ) { return ABORT; }
589
590         virtual void finish(
591           Resolvable::constPtr /*resolvable*/
592           , Error /*error*/
593           , const std::string &/*reason*/
594         ) {}
595       };
596
597       // progress for rebuilding the database
598       struct RebuildDBReport : public callback::ReportBase
599       {
600         enum Action {
601           ABORT,  // abort and return error
602           RETRY,        // retry
603           IGNORE        // ignore the failure
604         };
605
606         enum Error {
607           NO_ERROR,
608           FAILED                // failed to rebuild
609         };
610
611         virtual void start(Pathname /*path*/) {}
612
613         virtual bool progress(int /*value*/, Pathname /*path*/)
614         { return true; }
615
616         virtual Action problem(
617           Pathname /*path*/
618          , Error /*error*/
619          , const std::string &/*description*/
620         ) { return ABORT; }
621
622         virtual void finish(
623           Pathname /*path*/
624           , Error /*error*/
625           , const std::string &/*reason*/
626         ) {}
627       };
628
629       // progress for converting the database
630       struct ConvertDBReport : public callback::ReportBase
631       {
632         enum Action {
633           ABORT,  // abort and return error
634           RETRY,        // retry
635           IGNORE        // ignore the failure
636         };
637
638         enum Error {
639           NO_ERROR,
640           FAILED                // conversion failed
641         };
642
643         virtual void start(
644           Pathname /*path*/
645         ) {}
646
647         virtual bool progress(int /*value*/, Pathname /*path*/)
648         { return true; }
649
650         virtual Action problem(
651           Pathname /*path*/
652           , Error /*error*/
653          , const std::string &/*description*/
654         ) { return ABORT; }
655
656         virtual void finish(
657           Pathname /*path*/
658           , Error /*error*/
659           , const std::string &/*reason*/
660         ) {}
661       };
662
663       /////////////////////////////////////////////////////////////////
664     } // namespace rpm
665     ///////////////////////////////////////////////////////////////////
666
667     /////////////////////////////////////////////////////////////////
668   } // namespace target
669   ///////////////////////////////////////////////////////////////////
670
671   class PoolQuery;
672
673   /** \name Locks */
674   //@{
675   /**
676    * Callback for cleaning locks which doesn't lock anything in pool.
677    */
678
679   struct CleanEmptyLocksReport : public callback::ReportBase
680   {
681     /**
682      * action performed by cleaning api to specific lock
683      */
684     enum Action {
685       ABORT,  /**< abort and return error */
686       DELETE, /**< delete empty lock    */
687       IGNORE  /**< skip empty lock */
688     };
689
690     /**
691      * result of cleaning
692      */
693     enum Error {
694       NO_ERROR, /**< no problem */
695       ABORTED /** cleaning aborted by user */
696     };
697
698     /**
699      * cleaning is started
700      */
701     virtual void start(
702     ) {}
703
704     /**
705      * progress of cleaning specifies in percents
706      * \return if continue
707      */
708     virtual bool progress(int /*value*/)
709     { return true; }
710
711     /**
712      * When find empty lock ask what to do with it
713      * \return action
714      */
715     virtual Action execute(
716         const PoolQuery& /*error*/
717      ) { return DELETE; }
718
719       /**
720        * cleaning is done
721        */
722      virtual void finish(
723        Error /*error*/
724       ) {}
725
726   };
727
728   /**
729    * this callback handles merging old locks with newly added or removed
730    */
731   struct SavingLocksReport : public callback::ReportBase
732   {
733     /**
734      * action for old lock which is in conflict
735      * \see ConflictState
736      */
737     enum Action {
738       ABORT,  /**< abort and return error*/
739       DELETE, /**< delete conflicted lock    */
740       IGNORE  /**< skip conflict lock */
741     };
742
743     /**
744      * result of merging
745      */
746     enum Error {
747       NO_ERROR, /**< no problem */
748       ABORTED  /**< cleaning aborted by user */
749     };
750
751     /**
752      * type of conflict of old and new lock
753      */
754     enum ConflictState{
755       SAME_RESULTS, /**< locks lock same item in pool but his parameters is different */
756       INTERSECT /**< locks lock some file and unlocking lock unlock only part
757       * of iti, so removing old lock can unlock more items in pool */
758     };
759
760     virtual void start() {}
761
762     /**
763      * merging still live
764      * \return if continue
765      */
766     virtual bool progress()
767     { return true; }
768
769     /**
770      * When user unlock something which is locked by non-identical query
771      */
772     virtual Action conflict(
773          const PoolQuery&, /**< problematic query*/
774        ConflictState
775      ) { return DELETE; }
776
777      virtual void finish(
778        Error /*error*/
779       ) {}
780   };
781
782   ///////////////////////////////////////////////////////////////////
783   /// \class JobReport
784   /// \brief Generic report for sending messages.
785   ///////////////////////////////////////////////////////////////////
786   struct JobReport : public callback::ReportBase
787   {
788   public:
789     /** message type (use like 'enum class \ref MsgType') */
790     struct _MsgTypeDef {
791       enum Enum { debug, info, warning, error, important, data };
792     };
793     typedef base::EnumClass<_MsgTypeDef> MsgType;       ///< 'enum class MsgType'
794
795     /** typsafe map of userdata */
796     typedef callback::UserData UserData;
797
798   public:
799     /** Send a ready to show message text. */
800     virtual bool message( MsgType type_r, const std::string & msg_r, const UserData & userData_r ) const
801     { return true; }
802
803
804     /** \name Static sender instance */
805     //@{
806     /** Singleton sender instance */
807     static callback::SendReport<JobReport> & instance();        // impl in ZYppImpl.cc
808
809     /** send debug message text */
810     static bool debug( const MessageString & msg_r, const UserData & userData_r = UserData() )
811     { return instance()->message( MsgType::debug, msg_r, userData_r ); }
812
813     /** send message text */
814     static bool info( const MessageString & msg_r, const UserData & userData_r = UserData() )
815     { return instance()->message( MsgType::info, msg_r, userData_r ); }
816
817     /** send warning text */
818     static bool warning( const MessageString & msg_r, const UserData & userData_r = UserData() )
819     { return instance()->message( MsgType::warning, msg_r, userData_r ); }
820
821     /** send error text */
822     static bool error( const MessageString & msg_r, const UserData & userData_r = UserData() )
823     { return instance()->message( MsgType::error, msg_r, userData_r ); }
824
825     /** send important message text */
826     static bool important( const MessageString & msg_r, const UserData & userData_r = UserData() )
827     { return instance()->message( MsgType::important, msg_r, userData_r ); }
828
829     /** send data message */
830     static bool data( const MessageString & msg_r, const UserData & userData_r = UserData() )
831     { return instance()->message( MsgType::data, msg_r, userData_r ); }
832     //@}
833   };
834
835
836   /////////////////////////////////////////////////////////////////
837 } // namespace zypp
838 ///////////////////////////////////////////////////////////////////
839
840 #endif // ZYPP_ZYPPCALLBACKS_H