ScriptingAgent.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 
00003 /*
00004  *  Authors:    Arvin Schnell <arvin@suse.de>
00005  *              Klaus Kaempf <kkaempf@suse.de>
00006  *              Stanislav Visnovsky <visnov@suse.cz>
00007  *  Maintainer: Arvin Schnell <arvin@suse.de>
00008  */
00009 
00010 
00011 #ifndef ScriptingAgent_h
00012 #define ScriptingAgent_h
00013 
00014 #include <y2/Y2Component.h>
00015 #include <scr/SCRAgent.h>
00016 #include "SCRSubAgent.h"
00017 
00021 class ScriptingAgent : public SCRAgent
00022 {
00023 
00024 public:
00025 
00029     ScriptingAgent ();
00030 
00036     ScriptingAgent (const string& file);
00037 
00041     ~ScriptingAgent ();
00042 
00048     virtual YCPValue Read (const YCPPath &path, const YCPValue &arg = YCPNull (), const YCPValue &opt = YCPNull ());
00049 
00053     virtual YCPBoolean Write (const YCPPath &path, const YCPValue &value,
00054                     const YCPValue &arg = YCPNull ());
00055 
00059     virtual YCPList Dir (const YCPPath &path);
00060 
00064     virtual YCPValue Execute (const YCPPath &path, const YCPValue &value =
00065                       YCPNull (), const YCPValue &arg = YCPNull ());
00066 
00070     virtual YCPMap Error (const YCPPath &path);
00071 
00077     YCPValue otherCommand (const YCPTerm &term);
00078 
00084     virtual YCPBoolean RegisterAgent (const YCPPath &path, const YCPValue &value);
00085 
00089     virtual YCPBoolean UnregisterAgent (const YCPPath &path);
00090 
00094     virtual YCPBoolean UnregisterAllAgents ();
00095 
00099     virtual YCPBoolean UnmountAgent (const YCPPath &path);
00100 
00101 private:
00102 
00106     typedef vector<SCRSubAgent*> SubAgents;
00107     SubAgents agents;
00108 
00109 
00114     YCPValue MountAgent (const YCPPath &path);
00115 
00119     YCPValue MountAllAgents ();
00120 
00124     YCPValue UnmountAllAgents ();
00125 
00129     YCPBoolean RegisterNewAgents ();
00130 
00141     YCPValue executeSubagentCommand (const char *command,
00142                                      const YCPPath &path,
00143                                      const YCPValue &arg = YCPNull (),
00144                                      const YCPValue &optpar = YCPNull ());
00145 
00150     SubAgents::iterator findByPath (const YCPPath &path);
00151 
00157     void parseConfigFiles (const string &directory);
00158 
00163     void parseSingleConfigFile (const string &file);
00164 
00165 };
00166 
00167 
00168 #endif // ScriptingAgent_h

Generated on Tue Nov 6 01:27:46 2007 for yast2-core by  doxygen 1.5.3