Back to index

nordugrid-arc-nox  1.1.0~rc6
SecHandler.h
Go to the documentation of this file.
00001 #ifndef __ARC_SEC_SECHANDLER_H__
00002 #define __ARC_SEC_SECHANDLER_H__
00003 
00004 #include <arc/ArcConfig.h>
00005 #include <arc/message/Message.h>
00006 #include <arc/loader/Plugin.h>
00007 #include <arc/Logger.h>
00008 
00009 namespace Arc {
00010 class ChainContext;
00011 }
00012 
00013 namespace ArcSec {
00014 
00016 
00024   class SecHandler: public Arc::Plugin {
00025    public:
00026     SecHandler(Arc::Config*) {};
00027     virtual ~SecHandler() {};
00028     virtual bool Handle(Arc::Message *msg) const = 0;
00029 
00030    protected:
00031     static Arc::Logger logger;
00032   };
00033 
00034   #define SecHandlerPluginKind ("HED:SHC")
00035 
00036   class SecHandlerPluginArgument: public Arc::PluginArgument {
00037    private:
00038     Arc::Config* config_;
00039     Arc::ChainContext* context_;
00040    public:
00041     SecHandlerPluginArgument(Arc::Config* config,Arc::ChainContext* context):config_(config),context_(context) { };
00042     virtual ~SecHandlerPluginArgument(void) { };
00043     operator Arc::Config* (void) { return config_; };
00044     operator Arc::ChainContext* (void) { return context_; };
00045   };
00046 
00048   class SecHandlerConfig: public Arc::XMLNode {
00049    public:
00050     SecHandlerConfig(const std::string& name,const std::string& event = "",const std::string& id = "");
00051   };
00052 
00053 } // namespace ArcSec
00054 
00055 #endif /* __ARC_SEC_SECHANDLER_H__ */