/builddir/build/BUILD/gfal2-2.0.0/src/transfer/gfal_transfer_types_internal.h

00001 #pragma once
00002 #ifndef _GFAL2_TRANSFER_TYPES_INTERNAL_
00003 #define _GFAL2_TRANSFER_TYPES_INTERNAL_
00004 
00005 /*
00006  * Copyright (c) Members of the EGEE Collaboration. 2004.
00007  * See http://www.eu-egee.org/partners/ for details on the copyright holders.
00008  *
00009  * Licensed under the Apache License, Version 2.0 (the "License");
00010  * you may not use this file except in compliance with the License.
00011  * You may obtain a copy of the License at
00012  * 
00013  *     http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing, software
00016  * distributed under the License is distributed on an "AS IS" BASIS,
00017  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00018  * See the License for the specific language governing permissions and
00019  * limitations under the License.
00020  */
00021 
00022 #include <iostream>
00023 #include <string>
00024 
00025 
00026 #include <libcpp/cpp_to_gerror.hpp>
00027 
00028 #include <exceptions/gfalcoreexception.hpp>
00029 
00030 #include <common/gfal_constants.h>
00031 #include <common/gfal_types.h>
00032 #include <common/gfal_common_errverbose.h>
00033 
00034 #include <global/gfal_global.h>
00035 
00036 #include <transfer/gfal_transfer.h>
00037 #include <transfer/gfal_transfer_plugins.h>
00038 #include <transfer/gfalmaindecorator.h>
00039 #include <transfer/params_interface.hpp>
00040 #include <transfer/params_plugin_interface.hpp>
00041 
00042 
00043 namespace Gfal{
00044         
00045 namespace Transfer{
00046 
00047 class Params : public Params_interface, public Params_plugin_interface{
00048 public:
00049                 Params();
00050                 virtual ~Params();
00051                 
00052                 // setters
00053                 virtual void lock();
00054                 virtual void unlock();
00055                 virtual void set_timeout(long timeout);
00056                 virtual void replace_existing(bool replace);
00057                 virtual void set_offset(off_t offset);
00058                 virtual void set_nbstream(unsigned long nbstream);
00059                 virtual void set_user_data(void* user_data);
00060                 virtual void set_monitor(gfalt_monitor_tfr callback);
00061                 
00062                 virtual long get_timeout();
00063                 virtual unsigned long get_nbstream();
00064                 virtual void* get_user_data();
00065                 
00066                                 
00067 private:
00068         bool _lock; // lock enabled after the start of the transfer
00069         uuid_t _uuid; // unique id of the transfer
00070         long _timeout; 
00071         gboolean _replace_existing;
00072         off_t _start_offset;
00073         unsigned long _nbstream;
00074         gpointer _user_data;
00075         gfalt_monitor_tfr _callback;
00076         size_t buffer_size; // internal buffer size per flow for non-third party transfer
00077         
00078         void _check_params();
00079 }; 
00080 
00081 
00082 class FileCopy : public MainDecorator {
00083 public:
00084         FileCopy(PluginFactory* wrap);
00085         virtual ~FileCopy();
00086         
00087         void start_copy(Params* p, const std::string & src, const std::string & dst);
00088         
00089 protected:
00090         const plugin_filecopy_call find_copy_plugin(const std::string & src, const std::string & dst, void** plugin_data);
00091         
00092 }; 
00093 
00094 }; // end Transfer
00095 
00096 };//end Gfal
00097 
00098 
00099 
00100 #endif //_GFAL2_TRANSFER_TYPES_INTERNAL_
00101 

Generated on Wed May 16 16:46:34 2012 for CERN org.glite.Gfal by  doxygen 1.4.7