CERN org.glite.Gfal  2.0.1
/builddir/build/BUILD/gfal2-2.0.0/src/transfer/corelayer.h
00001 #pragma once
00002 #ifndef CORELAYER_H
00003 #define CORELAYER_H
00004 /*
00005  * Copyright (c) Members of the EGEE Collaboration. 2004.
00006  * See http://www.eu-egee.org/partners/ for details on the copyright holders.
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  * 
00012  *     http://www.apache.org/licenses/LICENSE-2.0
00013  * 
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  */
00020 
00021 #include <transfer/gfal_transfer_internal.h> 
00022 #include <transfer/plugininterface.h>
00023 
00024 
00025 namespace Gfal{
00026 
00031 class PluginItem : public PluginLink{
00032         
00033         public:
00034                 PluginItem(void* dlhandle, void*  data) : _dl(dlhandle), _data(data) {};
00035                 virtual ~PluginItem(){};
00036                 
00037                 virtual void* get_sym(const std::string & str) const;   
00038                 
00039                 virtual void* plugin_data();
00040         private:
00041                 void* _dl;
00042                 void* _data;
00043 };
00044 
00045 class CoreLayer: public PluginFactory
00046 {
00047         public:
00048                 CoreLayer(gfal_handle handle);
00049                 CoreLayer();
00050                 virtual ~CoreLayer();
00051 
00052                 virtual const VectorPlugin & get_plugin_links();
00053         private:
00054                 void _init(gfal_handle handle);
00055         
00056                 bool _internal_handle;
00057                 gfal_handle _handle;
00058                 VectorPlugin _plugins;
00059                 /* add your private declarations */
00060 };
00061 
00062 
00063 }
00064 
00065 #endif /* CORELAYER_H */