diff --git a/src/PyXRootDCopyProcess.cc b/src/PyXRootDCopyProcess.cc index df0223ac9e6..442d88dff2a 100755 --- a/src/PyXRootDCopyProcess.cc +++ b/src/PyXRootDCopyProcess.cc @@ -21,6 +21,9 @@ namespace PyXRootD { + //---------------------------------------------------------------------------- + // Add a job to the copy process + //---------------------------------------------------------------------------- PyObject* CopyProcess::AddJob( CopyProcess *self, PyObject *args, PyObject *kwds ) { static char *kwlist[] = { "source", "target", "sourcelimit", "force", @@ -56,12 +59,18 @@ namespace PyXRootD Py_RETURN_NONE; } + //---------------------------------------------------------------------------- + // Prepare the copy jobs + //---------------------------------------------------------------------------- PyObject* CopyProcess::Prepare( CopyProcess *self, PyObject *args, PyObject *kwds ) { XrdCl::XRootDStatus status = self->process->Prepare(); return ConvertType( &status ); } + //---------------------------------------------------------------------------- + // Run the copy jobs + //---------------------------------------------------------------------------- PyObject* CopyProcess::Run( CopyProcess *self, PyObject *args, PyObject *kwds ) { XrdCl::CopyProgressHandler *handler = new PyCopyProgressHandler(); diff --git a/src/PyXRootDCopyProcess.hh b/src/PyXRootDCopyProcess.hh index 297357af471..ddd3cd9abf9 100755 --- a/src/PyXRootDCopyProcess.hh +++ b/src/PyXRootDCopyProcess.hh @@ -26,18 +26,33 @@ namespace PyXRootD { + //---------------------------------------------------------------------------- + //! Interface for copy progress notification (not really used here) + //---------------------------------------------------------------------------- class PyCopyProgressHandler : public XrdCl::CopyProgressHandler { public: + //------------------------------------------------------------------------ + //! Notify when a new job is about to start + //------------------------------------------------------------------------ void BeginJob( uint16_t jobNum, uint16_t jobTotal, const XrdCl::URL *source, const XrdCl::URL *destination ) {} + //------------------------------------------------------------------------ + //! Notify when the previous job has finished + //------------------------------------------------------------------------ void EndJob( const XrdCl::XRootDStatus &status ) {} + //------------------------------------------------------------------------ + //! Notify about the progress of the current job + //------------------------------------------------------------------------ void JobProgress( uint64_t bytesProcessed, uint64_t bytesTotal ) {} }; + //---------------------------------------------------------------------------- + //! Copy the data from one point to another + //---------------------------------------------------------------------------- class CopyProcess { public: @@ -53,7 +68,7 @@ namespace PyXRootD PyDoc_STRVAR(copyprocess_type_doc, "CopyProcess object (internal)"); //---------------------------------------------------------------------------- - //! __init__() equivalent + //! __init__() //---------------------------------------------------------------------------- static int CopyProcess_init( CopyProcess *self, PyObject *args ) {