home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / root / usr / share / YaST2 / modules / PackageCallbacksInit.ycp < prev    next >
Text File  |  2006-11-29  |  4KB  |  104 lines

  1. /**
  2.  * File:    modules/PackageCallbacksInit.ycp
  3.  * Package:    yast2
  4.  * Summary:    Initialize packager callbacks
  5.  * Authors:    Jiri Srain <jsrain@suse.cz>
  6.  *
  7.  * $Id: PackageCallbacksInit.ycp 33643 2006-10-24 13:51:46Z lslezak $
  8.  *
  9.  * This module is used to initialize package manager callbacks
  10.  */
  11.  
  12. {
  13.  
  14. module "PackageCallbacksInit";
  15. textdomain "base";
  16.  
  17. import "Mode";
  18.  
  19. /**
  20.  * Register callbacks for media change
  21.  */
  22. global define void SetMediaCallbacks () {
  23.     Pkg::CallbackMediaChange ("PackageCallbacks::MediaChange");
  24.     Pkg::CallbackSourceChange ("PackageCallbacks::SourceChange");
  25. }
  26.  
  27. global void SetScriptCallbacks()
  28. {
  29.     Pkg::CallbackScriptStart("PackageCallbacks::ScriptStart");
  30.     Pkg::CallbackScriptProgress("PackageCallbacks::ScriptProgress");
  31.     Pkg::CallbackScriptProblem("PackageCallbacks::ScriptProblem");
  32.     Pkg::CallbackScriptFinish("PackageCallbacks::ScriptFinish");
  33.  
  34.     Pkg::CallbackMessage("PackageCallbacks::Message");
  35. }
  36.  
  37. /**
  38.  * Register package manager callbacks
  39.  */
  40. global define void InitPackageCallbacks() {
  41.     Pkg::CallbackStartProvide ("PackageCallbacks::StartProvide");
  42.     Pkg::CallbackProgressProvide ("PackageCallbacks::ProgressProvide");
  43.     Pkg::CallbackDoneProvide ("PackageCallbacks::DoneProvide");
  44.     Pkg::CallbackStartPackage ("PackageCallbacks::StartPackage");
  45.     Pkg::CallbackProgressPackage ("PackageCallbacks::ProgressPackage");
  46.     Pkg::CallbackDonePackage ("PackageCallbacks::DonePackage");
  47.  
  48.     Pkg::CallbackStartDeltaDownload ("PackageCallbacks::StartDeltaProvide");
  49.     Pkg::CallbackProgressDeltaDownload ("PackageCallbacks::ProgressProvide");
  50.     Pkg::CallbackProblemDeltaDownload ("PackageCallbacks::ProblemDeltaDownload");
  51.     Pkg::CallbackFinishDeltaDownload ("PackageCallbacks::FinishPatchDeltaProvide");
  52.  
  53.     Pkg::CallbackStartDeltaApply ("PackageCallbacks::StartDeltaApply");
  54.     Pkg::CallbackProgressDeltaApply ("PackageCallbacks::ProgressProvide");
  55.     Pkg::CallbackProblemDeltaApply ("PackageCallbacks::ProblemDeltaApply");
  56.     Pkg::CallbackFinishDeltaApply ("PackageCallbacks::FinishPatchDeltaProvide");
  57.  
  58.     Pkg::CallbackStartPatchDownload ("PackageCallbacks::StartPatchProvide");
  59.     Pkg::CallbackProgressPatchDownload ("PackageCallbacks::ProgressProvide");
  60.     Pkg::CallbackProblemPatchDownload ("PackageCallbacks::ProblemPatchDownload");
  61.     Pkg::CallbackFinishPatchDownload ("PackageCallbacks::FinishPatchDeltaProvide");
  62.  
  63.     // source create callbacks
  64.     Pkg::CallbackSourceCreateStart("PackageCallbacks::SourceCreateStart");
  65.     Pkg::CallbackSourceCreateProgress("PackageCallbacks::SourceCreateProgress");
  66.     Pkg::CallbackSourceCreateError("PackageCallbacks::SourceCreateError");
  67.     Pkg::CallbackSourceCreateEnd("PackageCallbacks::SourceCreateEnd");
  68.  
  69.     // source probing callbacks
  70.     Pkg::CallbackSourceProbeStart("PackageCallbacks::SourceProbeStart");
  71.     Pkg::CallbackSourceProbeFailed("PackageCallbacks::SourceProbeFailed");
  72.     Pkg::CallbackSourceProbeSucceeded("PackageCallbacks::SourceProbeSucceeded");
  73.     Pkg::CallbackSourceProbeProgress("PackageCallbacks::SourceProbeProgress");
  74.     Pkg::CallbackSourceProbeError("PackageCallbacks::SourceProbeError");
  75.     Pkg::CallbackSourceProbeEnd("PackageCallbacks::SourceProbeEnd");
  76.  
  77.     // source report callbacks
  78.     Pkg::CallbackSourceReportStart("PackageCallbacks::SourceReportStart");
  79.     Pkg::CallbackSourceReportProgress("PackageCallbacks::SourceReportProgress");
  80.     Pkg::CallbackSourceReportError("PackageCallbacks::SourceReportError");
  81.     Pkg::CallbackSourceReportEnd("PackageCallbacks::SourceReportEnd");
  82.  
  83.  
  84.     // @see bugzilla #183821
  85.     // Do not register these callbacks in case of AutoInstallation
  86.     if (Mode::autoinst() != true) {
  87.     // Signature-related callbacks
  88.     Pkg::CallbackAcceptUnsignedFile        ("SignatureCheckCallbacks::AcceptUnsignedFile");
  89.     Pkg::CallbackAcceptUnknownGpgKey    ("SignatureCheckCallbacks::AcceptUnknownGpgKey");
  90.     Pkg::CallbackImportGpgKey        ("SignatureCheckCallbacks::ImportGpgKey");
  91.     Pkg::CallbackAcceptVerificationFailed    ("SignatureCheckCallbacks::AcceptVerificationFailed");
  92.     Pkg::CallbackTrustedKeyAdded        ("SignatureCheckCallbacks::TrustedKeyAdded");
  93.     Pkg::CallbackTrustedKeyRemoved        ("SignatureCheckCallbacks::TrustedKeyRemoved");
  94.     Pkg::CallbackAcceptFileWithoutChecksum    ("SignatureCheckCallbacks::AcceptFileWithoutChecksum");
  95.     }
  96.  
  97.     SetMediaCallbacks ();
  98.  
  99.     SetScriptCallbacks();
  100. }
  101.  
  102. /* EOF */
  103. }
  104.