Back to index

nordugrid-arc-nox  1.1.0~rc6
PythonBroker.h
Go to the documentation of this file.
00001 // -*- indent-tabs-mode: nil -*-
00002 
00003 #ifndef __ARC_PYTHON_BROKER_H__
00004 #define __ARC_PYTHON_BROKER_H__
00005 
00006 #include <Python.h>
00007 #include <arc/UserConfig.h>
00008 #include <arc/client/Broker.h>
00009 
00010 namespace Arc {
00011 
00012   class PythonBroker
00013     : public Broker {
00014 
00015   public:
00016     PythonBroker(const UserConfig& usercfg);
00017     virtual ~PythonBroker();
00018     static Plugin* Instance(PluginArgument *arg);
00019 
00020   protected:
00021     virtual void SortTargets();
00022 
00023   private:
00024     PyObject *arc_module;
00025     PyObject *arc_userconfig_klass;
00026     PyObject *arc_jobrepr_klass;
00027     PyObject *arc_xtarget_klass;
00028     PyObject *module;
00029     PyObject *klass;
00030     PyObject *object;
00031 
00032     static Logger logger;
00033     static PyThreadState *tstate;
00034     static int refcount;
00035     static Glib::Mutex lock;
00036   };
00037 
00038 } // namespace Arc
00039 
00040 #endif // __ARC_PYTHON_BROKER_H__