Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Examples

PkgModuleFunctions.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013    File:        PkgModuleFunctions.h
00014 
00015    Author:      Klaus Kaempf <kkaempf@suse.de>
00016    Maintainer:  Klaus Kaempf <kkaempf@suse.de>
00017 
00018    Purpose:     Access to packagemanager
00019                 Handles Pkg::function (list_of_arguments) calls
00020                 from WFMInterpreter.
00021 /-*/
00022 
00023 #ifndef PkgModuleFunctions_h
00024 #define PkgModuleFunctions_h
00025 
00026 #include <string>
00027 #include <ycpTools.h>
00028 #include <PkgModuleError.h>
00029 
00030 #include <Y2PM.h>
00031 
00032 #include <ycp/YCPBoolean.h>
00033 #include <ycp/YCPValue.h>
00034 #include <ycp/YCPList.h>
00035 #include <ycp/YCPMap.h>
00036 #include <ycp/YCPSymbol.h>
00037 #include <ycp/YCPString.h>
00038 #include <ycp/YCPInteger.h>
00039 #include <ycp/YCPVoid.h>
00040 #include <ycp/YBlock.h>
00041 
00042 #include <y2/Y2Namespace.h>
00043 #include <y2/Y2NamespaceCPP.h>
00044 
00045 #include <y2pm/PMSelectablePtr.h>
00046 #include <y2pm/InstSrcDescrPtr.h>
00047 #include <y2pm/PMYouServers.h>
00048 #include <y2pm/PMYouPatchPtr.h>
00049 
00050 #define Y2REFFUNCTIONCALL1(namespace, name, signature, param1type, impl_class, impl_func)  \
00051 class namespace##name##Function1 : public Y2CPPFunctionCall <impl_class> {      \
00052 public:                                                 \
00053     namespace##name##Function1(impl_class* instance) :  \
00054         Y2CPPFunctionCall <impl_class> (signature, instance)    \
00055     {}                                                  \
00056     virtual void registerParameters (YBlockPtr decl)    \
00057     {                                                   \
00058         TypePtr t = Type::Const##param1type->clone ();  \
00059         t->asReference();                               \
00060         newParameter (decl, 1, t );                     \
00061     }                                                   \
00062     virtual YCPValue evaluate (bool cse=false)          \
00063     {                                                   \
00064         if (cse) return YCPNull ();                     \
00065         return m_instance->impl_func (m_param1->value ()->asReference ());   \
00066     }                                                   \
00067 }
00068 
00069 
00073 class PkgModuleFunctions : public Y2Namespace
00074 {
00075   public:
00076 
00080     typedef PkgModuleError Error;
00081 
00086     class CallbackHandler;
00087 
00088   protected:
00092        Y2PM _y2pm;
00093 
00097         PMError _last_error;
00098 
00102         YCPValue pkgError( PMError err_r, const YCPValue & ret_r = YCPVoid() );
00103 
00104         int _solve_errors;
00105 
00106     protected:
00107 
00108         PMSelectablePtr getPackageSelectable (const std::string& name);
00109         PMSelectablePtr getSelectionSelectable (const std::string& name);
00110         PMSelectablePtr getPatchSelectable (const std::string& name);
00111 
00112         bool SetSelectionString (std::string name, bool recursive = false);
00113         PMSelectablePtr WhoProvidesString (std::string tag);
00114         bool DoProvideString (std::string name);
00115         bool DoRemoveString (std::string name);
00116 
00117         YCPMap Descr2Map (constInstSrcDescrPtr descr);
00118 
00119     private: // source related
00120 
00121       bool sourceStartManager( bool autoEnable );
00122       void registerFunctions ();
00123 
00124     private:
00125 
00130       CallbackHandler & _callbackHandler;
00131 
00132 
00133     public:
00134         // general
00135         YCPValue InstSysMode ();
00136         YCPValue SetLocale (const YCPString& locale);
00137         YCPValue GetLocale ();
00138         YCPValue SetAdditionalLocales (YCPList args);
00139         YCPValue GetAdditionalLocales ();
00140         YCPValue LastError ();
00141         YCPValue LastErrorDetails ();
00142         YCPValue LastErrorId ();
00143 
00144         // callbacks
00145         YCPValue CallbackStartProvide (const YCPString& func);
00146         YCPValue CallbackProgressProvide (const YCPString& func);
00147         YCPValue CallbackDoneProvide (const YCPString& func);
00148         YCPValue CallbackStartPackage (const YCPString& func);
00149         YCPValue CallbackProgressPackage (const YCPString& func);
00150         YCPValue CallbackDonePackage (const YCPString& func);
00151         YCPValue CallbackStartDownload (const YCPString& func);
00152         YCPValue CallbackProgressDownload (const YCPString& func);
00153         YCPValue CallbackDoneDownload (const YCPString& func);
00154         YCPValue CallbackMediaChange (const YCPString& func);
00155         YCPValue CallbackSourceChange (const YCPString& func);
00156         YCPValue CallbackYouProgress (const YCPString& func);
00157         YCPValue CallbackYouPatchProgress (const YCPString& func);
00158         YCPValue CallbackYouError (const YCPString& func);
00159         YCPValue CallbackYouMessage (const YCPString& func);
00160         YCPValue CallbackYouLog (const YCPString& func);
00161         YCPValue CallbackYouExecuteYcpScript (const YCPString& func);
00162         YCPValue CallbackYouScriptProgress (const YCPString& func);
00163         YCPValue CallbackStartRebuildDb (const YCPString& func);
00164         YCPValue CallbackProgressRebuildDb (const YCPString& func);
00165         YCPValue CallbackNotifyRebuildDb (const YCPString& func);
00166         YCPValue CallbackStopRebuildDb (const YCPString& func);
00167         YCPValue CallbackStartConvertDb (const YCPString& func);
00168         YCPValue CallbackProgressConvertDb (const YCPString& func);
00169         YCPValue CallbackNotifyConvertDb (const YCPString& func);
00170         YCPValue CallbackStopConvertDb (const YCPString& func);
00171         void SetMediaCallback (PM::ISrcId source_id);
00172 
00173 
00174         // source related
00175         YCPValue SourceStartManager (const YCPBoolean&);
00176         YCPValue SourceCreate (const YCPString&, const YCPString&);
00177         YCPValue SourceStartCache (const YCPBoolean&);
00178         YCPValue SourceGetCurrent (const YCPBoolean& enabled);
00179         YCPValue SourceFinish (const YCPInteger&);
00180         YCPValue SourceFinishAll ();
00181         YCPValue SourceGeneralData (const YCPInteger&);
00182         YCPValue SourceMediaData (const YCPInteger&);
00183         YCPValue SourceProductData (const YCPInteger&);
00184         YCPValue SourceProvideFile (const YCPInteger&, const YCPInteger&, const YCPString&);
00185         YCPValue SourceProvideDir (const YCPInteger&, const YCPInteger&, const YCPString&);
00186         YCPValue SourceCacheCopyTo (const YCPString&);
00187         YCPValue SourceSetRamCache (const YCPBoolean&);
00188         YCPValue SourceProduct (const YCPInteger&);
00189         YCPValue SourceSetEnabled (const YCPInteger&, const YCPBoolean&);
00190         YCPValue SourceDelete (const YCPInteger&);
00191         YCPValue SourceRaisePriority (const YCPInteger&);
00192         YCPValue SourceLowerPriority (const YCPInteger&);
00193         YCPValue SourceSaveRanks ();
00194         YCPValue SourceChangeUrl (const YCPInteger&, const YCPString&);
00195         YCPValue SourceInstallOrder (const YCPMap&);
00196         YCPValue SourceEditGet ();
00197         YCPValue SourceEditSet (const YCPList& args);
00198         YCPValue SourceScan (const YCPString& media, const YCPString& product_dir);
00199 
00200         // target related
00201         YCPValue TargetInit (const YCPString& root, const YCPBoolean& n);
00202         YCPBoolean TargetFinish ();
00203         YCPBoolean TargetLogfile (const YCPString&);
00204         YCPInteger TargetCapacity (const YCPString&);
00205         YCPInteger TargetUsed (const YCPString&);
00206         YCPInteger TargetBlockSize (const YCPString&);
00207         YCPValue TargetUpdateInf (const YCPString&);
00208         YCPBoolean TargetInstall (const YCPString&);
00209         YCPBoolean TargetRemove (const YCPString&);
00210         YCPList TargetProducts ();
00211         YCPBoolean TargetRebuildDB ();
00212         YCPValue TargetInitDU (const YCPList&);
00213         YCPValue TargetGetDU ();
00214         YCPBoolean TargetFileHasOwner (const YCPString&);
00215 
00216         // selection related
00217         YCPValue GetSelections (const YCPSymbol& stat, const YCPString& cat);
00218         YCPValue GetBackupPath ();
00219         YCPValue SetBackupPath (const YCPString& path);
00220         YCPValue CreateBackups (const YCPBoolean& flag);
00221         YCPValue SelectionData (const YCPString& cat);
00222         YCPValue SelectionContent (const YCPString&, const YCPBoolean&, const YCPString&);
00223         YCPBoolean SetSelection (const YCPString&);
00224         YCPValue ClearSelection (const YCPString&);
00225         YCPBoolean ActivateSelections ();
00226 
00227         // package related
00228         YCPValue GetPackages (const YCPSymbol& which, const YCPBoolean& names_only);
00229         YCPValue FilterPackages (const YCPBoolean& byAuto, const YCPBoolean& byApp, const YCPBoolean& byUser, const YCPBoolean& names_only);
00230         YCPValue IsProvided (const YCPString& tag);
00231         YCPValue IsSelected (const YCPString& tag);
00232         YCPValue IsAvailable (const YCPString& tag);
00233         YCPValue DoProvide (const YCPList& args);
00234         YCPValue DoRemove (const YCPList& args);
00235         YCPValue PkgSummary (const YCPString& package);
00236         YCPValue PkgVersion (const YCPString& package);
00237         YCPValue PkgSize (const YCPString& package);
00238         YCPValue PkgGroup (const YCPString& package);
00239         YCPValue PkgLocation (const YCPString& package);
00240         YCPValue PkgProperties (const YCPString& package);
00241         YCPList  PkgGetFilelist (const YCPString& package, const YCPSymbol& which);
00242         YCPValue IsManualSelection ();
00243         YCPValue ClearSaveState ();
00244         YCPValue SaveState ();
00245         YCPValue RestoreState (const YCPBoolean&);
00246         YCPValue PkgUpdateAll (const YCPBoolean& del);
00247         YCPValue PkgAnyToDelete ();
00248         YCPValue PkgAnyToInstall ();
00249         YCPValue PkgFileHasOwner (YCPList args);
00250 
00251         YCPValue PkgInstall (const YCPString& p);
00252         YCPValue PkgSrcInstall (const YCPString& p);
00253         YCPValue PkgDelete (const YCPString& p);
00254         YCPValue PkgNeutral (const YCPString& p);
00255         YCPValue PkgReset ();
00256         YCPBoolean PkgSolve (const YCPBoolean& filter);
00257         YCPBoolean PkgSolveCheckTargetOnly ();
00258         YCPValue PkgSolveErrors ();
00259         YCPValue PkgCommit (const YCPInteger& medianr);
00260 
00261         YCPValue PkgPrepareOrder (YCPList args);
00262         YCPValue PkgMediaSizes ();
00263         YCPValue PkgMediaNames ();
00264 
00265         YCPString PkgGetLicenseToConfirm( const YCPString & package );
00266         YCPMap    PkgGetLicensesToConfirm( const YCPList & packages );
00267 
00268         // you patch related
00269         YCPMap YouStatus ();
00270         YCPString YouGetServers (YCPReference strings);
00271         YCPValue YouSetServer (const YCPMap& strings);
00272         YCPValue YouGetUserPassword ();
00273         YCPValue YouSetUserPassword (const YCPString& user, const YCPString& passwd, const YCPBoolean& persistent);
00274         YCPValue YouRetrievePatchInfo (const YCPBoolean& download, const YCPBoolean& sign);
00275         YCPValue YouProcessPatches ();
00276         YCPValue YouGetDirectory ();
00277         YCPValue YouSelectPatches ();
00278         YCPValue YouRemovePackages ();
00279         YCPValue YouUpdatesAvailable ();
00280         YCPValue YouSecurityUpdatesAvailable ();
00281 
00282         // function call definitions
00283         Y2FUNCTIONCALL  ( Pkg, InstSysMode,             "void ()",              PkgModuleFunctions, InstSysMode);
00284         Y2FUNCTIONCALL1 ( Pkg, SetLocale,               "void (string)",String,         PkgModuleFunctions, SetLocale);
00285         Y2FUNCTIONCALL  ( Pkg, GetLocale,               "string ()",            PkgModuleFunctions, GetLocale);
00286         Y2FUNCTIONCALL1 ( Pkg, SetAdditionalLocales,    "void (list<string>)",List,             PkgModuleFunctions, SetAdditionalLocales);
00287         Y2FUNCTIONCALL  ( Pkg, GetAdditionalLocales,    "list<string> ()",              PkgModuleFunctions, GetAdditionalLocales);
00288         Y2FUNCTIONCALL  ( Pkg, LastError,               "string ()",            PkgModuleFunctions, LastError);
00289         Y2FUNCTIONCALL  ( Pkg, LastErrorDetails,        "string ()",            PkgModuleFunctions, LastErrorDetails);
00290         Y2FUNCTIONCALL  ( Pkg, LastErrorId,             "string ()",            PkgModuleFunctions, LastErrorId);
00291 
00292         // callbacks
00293         Y2FUNCTIONCALL1 ( Pkg, CallbackStartProvide,    "void (string)",String,         PkgModuleFunctions, CallbackStartProvide);
00294         Y2FUNCTIONCALL1 ( Pkg, CallbackProgressProvide, "void (string)",String,         PkgModuleFunctions, CallbackProgressProvide);
00295         Y2FUNCTIONCALL1 ( Pkg, CallbackDoneProvide,     "void (string)",String,         PkgModuleFunctions, CallbackDoneProvide);
00296         Y2FUNCTIONCALL1 ( Pkg, CallbackStartPackage,    "void (string)",String,         PkgModuleFunctions, CallbackStartPackage);
00297         Y2FUNCTIONCALL1 ( Pkg, CallbackProgressPackage, "void (string)",String,         PkgModuleFunctions, CallbackProgressPackage);
00298         Y2FUNCTIONCALL1 ( Pkg, CallbackDonePackage,     "void (string)",String,         PkgModuleFunctions, CallbackDonePackage);
00299         Y2FUNCTIONCALL1 ( Pkg, CallbackStartDownload,   "void (string)",String,         PkgModuleFunctions, CallbackStartDownload);
00300         Y2FUNCTIONCALL1 ( Pkg, CallbackProgressDownload,"void (string)",String,         PkgModuleFunctions, CallbackProgressDownload);
00301         Y2FUNCTIONCALL1 ( Pkg, CallbackDoneDownload,    "void (string)",String,         PkgModuleFunctions, CallbackDoneDownload);
00302         Y2FUNCTIONCALL1 ( Pkg, CallbackMediaChange,     "void (string)",String,         PkgModuleFunctions, CallbackMediaChange);
00303         Y2FUNCTIONCALL1 ( Pkg, CallbackSourceChange,    "void (string)",String,         PkgModuleFunctions, CallbackSourceChange);
00304         Y2FUNCTIONCALL1 ( Pkg, CallbackYouProgress,     "void (string)",String,         PkgModuleFunctions, CallbackYouProgress);
00305         Y2FUNCTIONCALL1 ( Pkg, CallbackYouPatchProgress, "void (string)",String,        PkgModuleFunctions, CallbackYouPatchProgress);
00306         Y2FUNCTIONCALL1 ( Pkg, CallbackYouError,        "void (string)",String,         PkgModuleFunctions, CallbackYouError);
00307         Y2FUNCTIONCALL1 ( Pkg, CallbackYouMessage,      "void (string)",String,         PkgModuleFunctions, CallbackYouMessage);
00308         Y2FUNCTIONCALL1 ( Pkg, CallbackYouLog,          "void (string)",String,         PkgModuleFunctions, CallbackYouLog);
00309         Y2FUNCTIONCALL1 ( Pkg, CallbackYouExecuteYcpScript, "void (string)",String,     PkgModuleFunctions, CallbackYouExecuteYcpScript);
00310         Y2FUNCTIONCALL1 ( Pkg, CallbackYouScriptProgress, "void (string)",String,       PkgModuleFunctions, CallbackYouScriptProgress);
00311         Y2FUNCTIONCALL1 ( Pkg, CallbackStartRebuildDb,  "void (string)",String,         PkgModuleFunctions, CallbackStartRebuildDb);
00312         Y2FUNCTIONCALL1 ( Pkg, CallbackProgressRebuildDb, "void (string)",String,       PkgModuleFunctions, CallbackProgressRebuildDb);
00313         Y2FUNCTIONCALL1 ( Pkg, CallbackNotifyRebuildDb, "void (string)",String,         PkgModuleFunctions, CallbackNotifyRebuildDb);
00314         Y2FUNCTIONCALL1 ( Pkg, CallbackStopRebuildDb,   "void (string)",String,         PkgModuleFunctions, CallbackStopRebuildDb);
00315         Y2FUNCTIONCALL1 ( Pkg, CallbackStartConvertDb,  "void (string)",String,         PkgModuleFunctions, CallbackStartConvertDb);
00316         Y2FUNCTIONCALL1 ( Pkg, CallbackProgressConvertDb, "void (string)",String,       PkgModuleFunctions, CallbackProgressConvertDb);
00317         Y2FUNCTIONCALL1 ( Pkg, CallbackNotifyConvertDb, "void (string)",String,         PkgModuleFunctions, CallbackNotifyConvertDb);
00318         Y2FUNCTIONCALL1 ( Pkg, CallbackStopConvertDb,   "void (string)",String,         PkgModuleFunctions, CallbackStopConvertDb);
00319 
00320         // source related
00321         Y2FUNCTIONCALL1 ( Pkg, SourceStartManager,      "boolean (boolean)",Boolean,    PkgModuleFunctions, SourceStartManager);
00322         Y2FUNCTIONCALL2 ( Pkg, SourceCreate,            "integer (string, string)",String, String,      PkgModuleFunctions, SourceCreate);
00323         Y2FUNCTIONCALL1 ( Pkg, SourceStartCache,        "list<integer> (boolean)",Boolean,      PkgModuleFunctions, SourceStartCache);
00324         Y2FUNCTIONCALL1 ( Pkg, SourceGetCurrent,        "list<integer> (boolean)",Boolean,      PkgModuleFunctions, SourceGetCurrent);
00325         Y2FUNCTIONCALL1 ( Pkg, SourceFinish,            "boolean (integer)",Integer,    PkgModuleFunctions, SourceFinish);
00326         Y2FUNCTIONCALL  ( Pkg, SourceFinishAll,         "boolean ()",           PkgModuleFunctions, SourceFinishAll);
00327         Y2FUNCTIONCALL1 ( Pkg, SourceGeneralData,       "map<string,any> (integer)",Integer,    PkgModuleFunctions, SourceGeneralData);
00328         Y2FUNCTIONCALL1 ( Pkg, SourceMediaData,         "map<string,any> (integer)",Integer,    PkgModuleFunctions, SourceMediaData);
00329         Y2FUNCTIONCALL1 ( Pkg, SourceProductData,       "map<string,any> (integer)",Integer,    PkgModuleFunctions, SourceProductData);
00330         Y2FUNCTIONCALL3 ( Pkg, SourceProvideFile,       "string (integer, integer, string)",Integer, Integer, String, PkgModuleFunctions, SourceProvideFile);
00331         Y2FUNCTIONCALL3 ( Pkg, SourceProvideDir,        "string (integer, integer, string)",Integer, Integer, String, PkgModuleFunctions, SourceProvideDir);
00332         Y2FUNCTIONCALL1 ( Pkg, SourceCacheCopyTo,       "boolean (string)",String,              PkgModuleFunctions, SourceCacheCopyTo);
00333         Y2FUNCTIONCALL1 ( Pkg, SourceSetRamCache,       "boolean (boolean)",Boolean,    PkgModuleFunctions, SourceSetRamCache);
00334         Y2FUNCTIONCALL1 ( Pkg, SourceProduct,           "map<string,string> (integer)",Integer, PkgModuleFunctions, SourceProduct);
00335         Y2FUNCTIONCALL2 ( Pkg, SourceSetEnabled,        "boolean (integer, boolean)",Integer, Boolean, PkgModuleFunctions, SourceSetEnabled);
00336         Y2FUNCTIONCALL1 ( Pkg, SourceDelete,            "boolean (integer)",Integer,    PkgModuleFunctions, SourceDelete);
00337         Y2FUNCTIONCALL1 ( Pkg, SourceRaisePriority,     "void (integer)",Integer,       PkgModuleFunctions, SourceRaisePriority);
00338         Y2FUNCTIONCALL1 ( Pkg, SourceLowerPriority,     "void (integer)",Integer,       PkgModuleFunctions, SourceLowerPriority);
00339         Y2FUNCTIONCALL  ( Pkg, SourceSaveRanks,         "boolean ()",           PkgModuleFunctions, SourceSaveRanks);
00340         Y2FUNCTIONCALL2 ( Pkg, SourceChangeUrl,         "boolean (integer, string)",Integer, String,PkgModuleFunctions, SourceChangeUrl);
00341         Y2FUNCTIONCALL1 ( Pkg, SourceInstallOrder,      "boolean (map<integer,integer>)",Map,           PkgModuleFunctions, SourceInstallOrder);
00342         Y2FUNCTIONCALL  ( Pkg, SourceEditGet,           "list<map<string,any>> ()",             PkgModuleFunctions, SourceEditGet);
00343         Y2FUNCTIONCALL1 ( Pkg, SourceEditSet,           "boolean (list<map<string,any>>)",List,                 PkgModuleFunctions, SourceEditSet);
00344         Y2FUNCTIONCALL2 ( Pkg, SourceScan,              "list<integer> (string, string)",String, String, PkgModuleFunctions, SourceScan);
00345 
00346         // target related
00347         Y2FUNCTIONCALL2 ( Pkg, TargetInit,              "boolean (string, boolean)",String, Boolean,PkgModuleFunctions, TargetInit);
00348         Y2FUNCTIONCALL  ( Pkg, TargetFinish,            "boolean ()",           PkgModuleFunctions, TargetFinish);
00349         Y2FUNCTIONCALL1 ( Pkg, TargetLogfile,           "boolean (string)",String,              PkgModuleFunctions, TargetLogfile);
00350         Y2FUNCTIONCALL1 ( Pkg, TargetCapacity,          "integer (string)",String,              PkgModuleFunctions, TargetCapacity);
00351         Y2FUNCTIONCALL1 ( Pkg, TargetUsed,              "integer (string)",String,              PkgModuleFunctions, TargetUsed);
00352         Y2FUNCTIONCALL1 ( Pkg, TargetBlockSize,         "integer (string)",String,              PkgModuleFunctions, TargetBlockSize);
00353         Y2FUNCTIONCALL1 ( Pkg, TargetUpdateInf,         "map<string,string> (string)",String,           PkgModuleFunctions, TargetUpdateInf);
00354         Y2FUNCTIONCALL1 ( Pkg, TargetInstall,           "boolean (string)",String,              PkgModuleFunctions, TargetInstall);
00355         Y2FUNCTIONCALL1 ( Pkg, TargetRemove,            "boolean (string)",String,              PkgModuleFunctions, TargetRemove);
00356         Y2FUNCTIONCALL  ( Pkg, TargetProducts,          "list<any> ()",         PkgModuleFunctions, TargetProducts);
00357         Y2FUNCTIONCALL  ( Pkg, TargetRebuildDB,         "boolean ()",           PkgModuleFunctions, TargetRebuildDB);
00358         Y2FUNCTIONCALL1 ( Pkg, TargetInitDU,            "void (list<map<any,any> >)",List,              PkgModuleFunctions, TargetInitDU);
00359         Y2FUNCTIONCALL  ( Pkg, TargetGetDU,             "map<string,list<integer>> ()",         PkgModuleFunctions, TargetGetDU);
00360         Y2FUNCTIONCALL1 ( Pkg, TargetFileHasOwner,      "boolean (string)",String,      PkgModuleFunctions, TargetFileHasOwner);
00361 
00362         // selection related
00363         Y2FUNCTIONCALL2 ( Pkg, GetSelections,           "list<string> (symbol, string)",Symbol, String, PkgModuleFunctions, GetSelections);
00364         Y2FUNCTIONCALL  ( Pkg, GetBackupPath,           "string ()",            PkgModuleFunctions, GetBackupPath);
00365         Y2FUNCTIONCALL1 ( Pkg, SetBackupPath,           "void (string)",String,         PkgModuleFunctions, SetBackupPath);
00366         Y2FUNCTIONCALL1 ( Pkg, CreateBackups,           "void (boolean)",Boolean,       PkgModuleFunctions, CreateBackups);
00367         Y2FUNCTIONCALL1 ( Pkg, SelectionData,           "map<string,any> (string)",String,              PkgModuleFunctions, SelectionData);
00368         Y2FUNCTIONCALL3 ( Pkg, SelectionContent,        "list<string> (string, boolean, string)",String, Boolean, String, PkgModuleFunctions, SelectionContent);
00369         Y2FUNCTIONCALL1 ( Pkg, SetSelection,            "boolean (string)",String,              PkgModuleFunctions, SetSelection);
00370         Y2FUNCTIONCALL1 ( Pkg, ClearSelection,          "boolean (string)",String,      PkgModuleFunctions, ClearSelection);
00371         Y2FUNCTIONCALL  ( Pkg, ActivateSelections,      "boolean ()",           PkgModuleFunctions, ActivateSelections);
00372 
00373         // package related
00374         Y2FUNCTIONCALL2 ( Pkg, GetPackages,             "list<string> (symbol, boolean)",Symbol, Boolean, PkgModuleFunctions, GetPackages);
00375         Y2FUNCTIONCALL4 ( Pkg, FilterPackages,          "list<string> (boolean, boolean, boolean, boolean)",Boolean, Boolean, Boolean, Boolean, PkgModuleFunctions, FilterPackages);
00376         Y2FUNCTIONCALL1 ( Pkg, IsProvided,              "boolean (string)",String,              PkgModuleFunctions, IsProvided);
00377         Y2FUNCTIONCALL1 ( Pkg, IsSelected,              "boolean (string)",String,              PkgModuleFunctions, IsSelected);
00378         Y2FUNCTIONCALL1 ( Pkg, IsAvailable,             "boolean (string)",String,              PkgModuleFunctions, IsAvailable);
00379         Y2FUNCTIONCALL1 ( Pkg, DoProvide,               "map<string,any> (list<string>)",List,          PkgModuleFunctions, DoProvide);
00380         Y2FUNCTIONCALL1 ( Pkg, DoRemove,                "map<string,any> (list<string>)",List,          PkgModuleFunctions, DoRemove);
00381         Y2FUNCTIONCALL1 ( Pkg, PkgSummary,              "string (string)",String,       PkgModuleFunctions, PkgSummary);
00382         Y2FUNCTIONCALL1 ( Pkg, PkgVersion,              "string (string)",String,               PkgModuleFunctions, PkgVersion);
00383         Y2FUNCTIONCALL1 ( Pkg, PkgSize,                 "integer (string)",String,              PkgModuleFunctions, PkgSize);
00384         Y2FUNCTIONCALL1 ( Pkg, PkgGroup,                "string (string)",String,               PkgModuleFunctions, PkgGroup);
00385         Y2FUNCTIONCALL1 ( Pkg, PkgLocation,             "string (string)",String,               PkgModuleFunctions, PkgLocation);
00386         Y2FUNCTIONCALL1 ( Pkg, PkgProperties,           "map<string,any> (string)",String,              PkgModuleFunctions, PkgProperties);
00387         Y2FUNCTIONCALL2 ( Pkg, PkgGetFilelist,          "list<string> (string,symbol)",String,Symbol,           PkgModuleFunctions, PkgGetFilelist);
00388         Y2FUNCTIONCALL  ( Pkg, IsManualSelection,       "boolean ()",           PkgModuleFunctions, IsManualSelection);
00389         Y2FUNCTIONCALL  ( Pkg, ClearSaveState,          "boolean ()",           PkgModuleFunctions, ClearSaveState);
00390         Y2FUNCTIONCALL  ( Pkg, SaveState,               "boolean ()",           PkgModuleFunctions, SaveState);
00391         Y2FUNCTIONCALL1 ( Pkg, RestoreState,            "boolean (boolean)",Boolean,    PkgModuleFunctions, RestoreState);
00392         Y2FUNCTIONCALL1 ( Pkg, PkgUpdateAll,            "list<integer> (boolean)",Boolean,      PkgModuleFunctions, PkgUpdateAll);
00393         Y2FUNCTIONCALL  ( Pkg, PkgAnyToDelete,          "boolean ()",           PkgModuleFunctions, PkgAnyToDelete);
00394         Y2FUNCTIONCALL  ( Pkg, AnyToInstall,            "boolean ()",           PkgModuleFunctions, PkgAnyToInstall);
00395 
00396         Y2FUNCTIONCALL1 ( Pkg, PkgInstall,              "boolean (string)",String,              PkgModuleFunctions, PkgInstall);
00397         Y2FUNCTIONCALL1 ( Pkg, PkgSrcInstall,           "boolean (string)",String,              PkgModuleFunctions, PkgSrcInstall);
00398         Y2FUNCTIONCALL1 ( Pkg, PkgDelete,               "boolean (string)",String,              PkgModuleFunctions, PkgDelete);
00399         Y2FUNCTIONCALL1 ( Pkg, PkgNeutral,              "boolean (string)",String,              PkgModuleFunctions, PkgNeutral);
00400         Y2FUNCTIONCALL  ( Pkg, PkgReset,                "boolean ()",           PkgModuleFunctions, PkgReset);
00401         Y2FUNCTIONCALL1 ( Pkg, PkgSolve,                "boolean (boolean)",Boolean,    PkgModuleFunctions, PkgSolve);
00402         Y2FUNCTIONCALL  ( Pkg, PkgSolveCheckTargetOnly, "boolean ()",                   PkgModuleFunctions, PkgSolveCheckTargetOnly);
00403         Y2FUNCTIONCALL  ( Pkg, PkgSolveErrors,          "integer ()",                   PkgModuleFunctions, PkgSolveErrors);
00404         Y2FUNCTIONCALL1 ( Pkg, PkgCommit,               "list<any> (integer)",Integer,  PkgModuleFunctions, PkgCommit);
00405 
00406         Y2FUNCTIONCALL  ( Pkg, PkgMediaSizes,           "list<list<integer>> ()",               PkgModuleFunctions, PkgMediaSizes);
00407         Y2FUNCTIONCALL  ( Pkg, PkgMediaNames,           "list<string> ()",              PkgModuleFunctions, PkgMediaNames);
00408 
00409         Y2FUNCTIONCALL1 ( Pkg, PkgGetLicenseToConfirm,  "string (string)",                   String, PkgModuleFunctions, PkgGetLicenseToConfirm );
00410         Y2FUNCTIONCALL1 ( Pkg, PkgGetLicensesToConfirm, "map<string,string> (list<string>)", List,   PkgModuleFunctions, PkgGetLicensesToConfirm );
00411 
00412         // you patch related
00413         Y2FUNCTIONCALL  ( Pkg, YouStatus,               "map<any,any> ()",              PkgModuleFunctions, YouStatus);
00414         Y2REFFUNCTIONCALL1 ( Pkg, YouGetServers,        "string (list<any>&)",  List,   PkgModuleFunctions, YouGetServers);
00415         Y2FUNCTIONCALL1 ( Pkg, YouSetServer,            "string (map<any,any>)",Map, PkgModuleFunctions, YouSetServer);
00416         Y2FUNCTIONCALL  ( Pkg, YouGetUserPassword,      "map<any,any> ()",      PkgModuleFunctions, YouGetUserPassword);
00417         Y2FUNCTIONCALL3 ( Pkg, YouSetUserPassword,      "string (string, string, boolean)", String, String, Boolean, PkgModuleFunctions, YouSetUserPassword);
00418         Y2FUNCTIONCALL2 ( Pkg, YouRetrievePatchInfo,    "string (boolean, boolean)",Boolean, Boolean, PkgModuleFunctions, YouRetrievePatchInfo);
00419         Y2FUNCTIONCALL  ( Pkg, YouProcessPatches,       "boolean ()",           PkgModuleFunctions, YouProcessPatches);
00420         Y2FUNCTIONCALL  ( Pkg, YouGetDirectory,         "string ()",            PkgModuleFunctions, YouGetDirectory);
00421         Y2FUNCTIONCALL  ( Pkg, YouSelectPatches,        "void ()",              PkgModuleFunctions, YouSelectPatches);
00422         Y2FUNCTIONCALL  ( Pkg, YouRemovePackages,       "boolean ()",           PkgModuleFunctions, YouRemovePackages);
00423         Y2FUNCTIONCALL  ( Pkg, YouUpdatesAvailable,     "boolean ()",           PkgModuleFunctions, YouUpdatesAvailable);
00424         Y2FUNCTIONCALL  ( Pkg, YouSecurityUpdatesAvailable, "boolean ()",       PkgModuleFunctions, YouSecurityUpdatesAvailable);
00425 
00426 
00430         PkgModuleFunctions ();
00431 
00435         virtual ~PkgModuleFunctions ();
00436 
00437         virtual const string name () const
00438         {
00439             return "Pkg";
00440         }
00441 
00442         virtual const string filename () const
00443         {
00444             return "Pkg";
00445         }
00446 
00447         virtual string toString () const
00448         {
00449             return "// not possible toString";
00450         }
00451 
00452         virtual YCPValue evaluate (bool cse = false )
00453         {
00454             if (cse) return YCPNull ();
00455             else return YCPVoid ();
00456         }
00457 
00458         virtual Y2Function* createFunctionCall (const string name);
00459 
00460         static YCPMap YouPatch( const PMYouPatchPtr &patch );
00461 
00462     protected:
00463         PMYouServer convertServerObject( const YCPMap &serverMap );
00464 
00465 };
00466 #endif // PkgModuleFunctions_h

Generated on Fri Nov 9 18:15:22 2007 for yast2-core by doxygen 1.3.6