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

CupsAgent.h

Go to the documentation of this file.
00001 /*
00002  * YaST2: Core system
00003  *
00004  * Description:
00005  *   YaST2 SCR: Cups agent implementation
00006  *
00007  * Authors:
00008  *   Petr Blahos <pblahos@suse.cz>
00009  *
00010  * $Id: CupsAgent.h,v 1.4 2004/01/16 17:55:03 jsrain Exp $
00011  */
00012 
00013 #ifndef _CupsAgent_h
00014 #define _CupsAgent_h
00015 
00016 #include <Y2.h>
00017 #include <scr/SCRAgent.h>
00018 //#include <scr/SCRInterpreter.h>
00019 
00020 #include "PrintersConf.h"
00021 #include "ClassesConf.h"
00022 #include "DefaultDest.h"
00023 
00027 class CupsAgent : public SCRAgent {
00028 
00029 private:
00033   PrintersConf printers;
00034   ClassesConf classes;
00035   DefaultDest defaultdest;
00036 
00037 public:
00041     CupsAgent();
00045     virtual ~CupsAgent();
00046 
00052     virtual YCPValue Read(const YCPPath &path, const YCPValue& arg = YCPNull(), const YCPValue& opt = YCPNull());
00053 
00057     virtual YCPBoolean Write(const YCPPath &path, const YCPValue& value, const YCPValue& arg = YCPNull());
00058 
00062     virtual YCPList Dir(const YCPPath& path);
00063 
00067     virtual YCPValue otherCommand(const YCPTerm& term);
00068 };
00069 
00070 #if 0
00071 
00074 class Y2CupsAgentComponent : public Y2Component
00075 {
00076     CupsAgent *agent;
00077     SCRInterpreter *interpreter;
00078 
00079 public:
00080 
00084     Y2CupsAgentComponent() : Y2Component(), agent(0), interpreter(0) {}
00085 
00089     ~Y2CupsAgentComponent() {
00090         if (interpreter) {
00091             delete agent;
00092             delete interpreter;
00093         }
00094     }
00095 
00099     virtual string name() const { return "ag_cups"; };
00100 
00109     virtual YCPValue evaluate(const YCPValue& command);
00110 };
00111 
00115 class Y2CCCupsAgent : public Y2ComponentCreator {
00116 public:
00117 
00121     Y2CCCupsAgent() : Y2ComponentCreator(Y2ComponentBroker::BUILTIN) {};
00122 
00126     virtual bool isServerCreator() const { return true; };
00127 
00131     virtual Y2Component *create(const char *name) const;
00132 };
00133 #endif//0
00134 
00135 #endif /* _CupsAgent_h */

Generated on Thu Nov 17 21:25:17 2005 for yast2-printer by doxygen 1.3.6