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