Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

data_movement_gass.hh File Reference

Gridlab File Service include file. More...

Go to the source code of this file.

Compounds

struct  Directory_entry
struct  List_response
struct  List_structured_file_response
struct  List_structured_response
struct  ns__FileTask
struct  ns__FileTask_array
struct  ns__string_vector
struct  Size_response
struct  Time_response
struct  tns__TcpOptions

Functions

int ns__DATACopyFile (xsd__string source_URL, xsd__string dest_URL, int use_parallel, int no_overwrite, int maintain_permissions, xsd__string *response)
 Copies a single file.

int ns__DATACopyFileDefaults (xsd__string source_URL, xsd__string dest_URL, xsd__string *response)
 Copies a file using default parameters.

int ns__DATAMoveFile (xsd__string source_URL, xsd__string dest_URL, int use_parallel, int no_overwrite, int maintain_permissions, xsd__string *response)
 Copies a file and then deletes the source.

int ns__DATAMoveFileDefaults (xsd__string source_URL, xsd__string dest_URL, xsd__string *response)
 Moves a file using default parameters.

int ns__DATADeleteFileDefaults (xsd__string in_URL, xsd__string *response)
 Deletes a file.

int ns__isAlive (int dump, int *response)
 Test method.

int ns__getServiceDescription (void *dump, xsd__string *description)
 Returns a string description of the service.

int ns__DATATransferFile (int operation, xsd__string source_URL, xsd__string dest_URL, int use_parallel, int no_overwrite, int maintain_permissions, xsd__string *response)
 Container method for Copy, Move and Delete.

int ns__DATAinit_CopyFile (xsd__string source_URL, xsd__string dest_URL, int use_parallel, int no_overwrite, int maintain_permissions, struct ns__FileTask *response)
 Starts a non-blocking copy operation.

int ns__DATAinit_MoveFile (xsd__string source_URL, xsd__string dest_URL, int use_parallel, int no_overwrite, int maintain_permissions, struct ns__FileTask *response)
 Starts a non-blocking move operation.

int ns__DATAinit_DeleteFile (xsd__string source_URL, struct ns__FileTask *response)
 Starts a non-blocking delete operation.

int ns__DATAinit_TransferFile (int operation, xsd__string source_URL, xsd__string dest_URL, int use_parallel, int no_overwrite, int maintain_permissions, struct ns__FileTask *response)
 container method for non-blocking Copy, Move and Delete.

int ns__DATArestartFileTask (xsd__long id, struct ns__FileTask *response)
 Restarts a stopped or otherwise interrupted copy or move operation.

int ns__DATAgetFileTask (xsd__long id, struct ns__FileTask *response)
 Returns information about the status of a transfer.

int ns__DATAwaitFileTask (xsd__long id, struct ns__FileTask *response)
 Blocks and waits for a transfer to complete.

int ns__DATAstopFileTask (xsd__long id, struct ns__FileTask *response)
 Stops a copy or move operation (blocking).

int ns__DATAdeleteFileTask (xsd__long id, int *response)
 Deletes information about a transfer.

int ns__DATAmultipleCopy (struct ns__string_vector in_URLs, xsd__string *response)
 Copies multiple gridftp files.

int ns__DATA_FTP_List (char *in_URL, int verbose, int cached, struct List_response *resp)
 Lists the content of a remote directory.

int ns__DATAConnectedList (char *in_URL, int verbose, struct List_response *resp)
 Lists the content of a directory and caches the connection to the GridFTP server.

int ns__DATA_FTP_SimpleList (char *in_URL, int cached, struct List_response *resp)
 Lists the content of a directory returning a list of entries in that directory.

int ns__DATA_FTP_VerboseList (char *in_URL, int cached, struct List_response *resp)
 Lists the content of a directory returning a detailed listing (ls -l) of entries in that directory.

int ns__DATA_FTP_MachineListDirectory (char *in_URL, int cached, struct List_response *resp)
 Lists the content of a directory using machine list (MLSD). Doesn't work for files (use ns__DATA_FTP_MachineListFile).

int ns__DATA_FTP_MachineListFile (char *in_URL, int cached, struct List_response *resp)
 Returns the facts for a directory entry using machine list (MLST).

int ns__DATA_FTP_StructuredMachineListDirectory (char *in_URL, int cached, struct List_structured_response *resp)
 Lists and parses the content of a directory.

int ns__DATA_FTP_StructuredMachineListFile (char *in_URL, int cached, struct List_structured_file_response *resp)
 Lists and parses the content of a directory entry listing.

int ns__DATA_FTP_Mkdir (char *in_URL, int cached, char **resp)
 Creates a directory on a remote site.

int ns__DATAConnectedMkdir (char *in_URL, char **resp)
 Creates a directory on a remote site.

int ns__DATA_FTP_ModTime (char *in_URL, int cached, struct Time_response *resp)
 Returns the modification time of a directory entry.

int ns__DATAConnectedModTime (char *in_URL, struct Time_response *resp)
 Returns the modification time of a directory entry.

int ns__DATA_FTP_Size (char *in_URL, int cached, struct Size_response *resp)
 Returns the size of a file.

int ns__DATAConnectedSize (char *in_URL, struct Size_response *resp)
 Returns the size of a file.

int ns__DATA_FTP_Delete (char *in_URL, int cached, char **resp)
 Deletes a remote file.

int ns__DATA_FTP_Exists (char *in_URL, int cached, char **resp)
 Checks if a remote file exists. If not, it will return an error. If yes, the return code will be 200 OK.

int ns__DATA_FTP_Chmod (char *in_URL, int mode, int cached, char **resp)
 Sets (if possible) the Unix file mode of a remote file.

int ns__DATAStopCache (void *dump, char **response)
 Destroys the data structure that was used to cache the GridFTP connections.


Variables

Directory_entry__ptr
int __size


Detailed Description

Gridlab File Service include file.

GridLab File Service include file used for generating server and client stubs with gsoap

Copyright (C) Andrei Hutanu, ZIB

This code is released under the GridLab license available from http://www.gridlab.org/Resources/GLlicense.pdf

Definition in file data_movement_gass.hh.


Function Documentation

int ns__DATA_FTP_Chmod char *    in_URL,
int    mode,
int    cached,
char **    resp
 

Sets (if possible) the Unix file mode of a remote file.

Parameters:
in_URL  the URL of the file
the  desider unix file mode
cached  true if the connection should be cached
resp  the return message
Returns:
an error code followed by the error message

int ns__DATA_FTP_Delete char *    in_URL,
int    cached,
char **    resp
 

Deletes a remote file.

Parameters:
in_URL  the URL of the file
cached  true if the connection should be cached
resp  the return message
Returns:
an error code followed by the error message

int ns__DATA_FTP_Exists char *    in_URL,
int    cached,
char **    resp
 

Checks if a remote file exists. If not, it will return an error. If yes, the return code will be 200 OK.

Parameters:
in_URL  the URL of the file
cached  true if the connection should be cached
resp  the return message
Returns:
an error code followed by the error message

int ns__DATA_FTP_List char *    in_URL,
int    verbose,
int    cached,
struct List_response   resp
 

Lists the content of a remote directory.

If caching is desired, when called for the first time, this method initiates a cached connection to the GridFTP server if possible. That connection will be used for all the following operations until the StopCache method is called. Also, the service will not cache more than a fixed number of connections at one time.

Parameters:
in_URL  the URL of the directory to be listed
verbose  when set to 1 will result in detailed listing of the given directory (ls -l). When set to 0, the method will return just a list of entries in that directory. Set to 2 will produce a machine listing of the directory (doesn't work for files). Set to 3 will produce a machine listing of the directory entry or file.
cached  set to true (1) if the connection should be cached for future calls
resp  the return parameter
Returns:
the unparsed directory listing and an error message
See also:
ns__DATAStopCache

int ns__DATA_FTP_MachineListDirectory char *    in_URL,
int    cached,
struct List_response   resp
 

Lists the content of a directory using machine list (MLSD). Doesn't work for files (use ns__DATA_FTP_MachineListFile).

Parameters:
cached  set to true (1) if the connection should be cached for future calls
Returns:
the unparsed directory listing and an error message
See also:
ns__DATA_FTP_List

int ns__DATA_FTP_MachineListFile char *    in_URL,
int    cached,
struct List_response   resp
 

Returns the facts for a directory entry using machine list (MLST).

Parameters:
cached  set to true (1) if the connection should be cached for future calls
Returns:
the unparsed directory listing and an error message
See also:
ns__DATA_FTP_List

int ns__DATA_FTP_Mkdir char *    in_URL,
int    cached,
char **    resp
 

Creates a directory on a remote site.

Returns the error message.

Parameters:
in_URL  the URL of the directory to be created
cached  set to true (1) if the connection should be cached
resp  the return parameter
Returns:
the error message
See also:
ns__DATAConnectedList , ns__DATAStopCache

int ns__DATA_FTP_ModTime char *    in_URL,
int    cached,
struct Time_response   resp
 

Returns the modification time of a directory entry.

Returns the time since the Epoch (00:00:00 UTC, January 1, 1970), measured in seconds.

Parameters:
in_URL  the URL of the directory entry
cached  true if the connection should be cached
resp  the return parameter
Returns:
the modification time and an error message
See also:
ns__DATAConnectedList , ns__DATAStopCache

int ns__DATA_FTP_SimpleList char *    in_URL,
int    cached,
struct List_response   resp
 

Lists the content of a directory returning a list of entries in that directory.

Parameters:
cached  set to true (1) if the connection should be cached for future calls
Returns:
the unparsed directory listing and an error message
See also:
ns__DATA_FTP_List

int ns__DATA_FTP_Size char *    in_URL,
int    cached,
struct Size_response   resp
 

Returns the size of a file.

Returns the file size in bytes.

Parameters:
in_URL  the URL of the directory entry
cached  true if the connection should be cached
resp  the return parameter
Returns:
the file size and an error message
See also:
ns__DATAConnectedList , ns__DATAStopCache

int ns__DATA_FTP_StructuredMachineListDirectory char *    in_URL,
int    cached,
struct List_structured_response   resp
 

Lists and parses the content of a directory.

This method provides a structured response to a machine directory listing. The text returned by the server is parsed and separated in directory entries. A cached connection will be used or initiated for this operation if cached is set to 1 Doesn't work for single files (use ns__DATA_FTP_StructuredMachineListFile)

Parameters:
in_URL  the URL of the directory to be listed
cached  set to 1 if you want the service to cache the connection to the server
resp  the return parameter
Returns:
the structured directory listing and an error message
See also:
ns__DATA_FTP_MachineListDirectory

int ns__DATA_FTP_StructuredMachineListFile char *    in_URL,
int    cached,
struct List_structured_file_response *    resp
 

Lists and parses the content of a directory entry listing.

This method provides a structured response to a machine listing of a file A cached connection will be used or initiated for this operation if cached is set to 1

Parameters:
in_URL  the URL of the directory to be listed
cached  set to 1 if you want the service to cache the connection to the server
resp  the return parameter
Returns:
the structured directory entry listing and an error message
See also:
ns__DATA_FTP_MachineListFile

int ns__DATA_FTP_VerboseList char *    in_URL,
int    cached,
struct List_response   resp
 

Lists the content of a directory returning a detailed listing (ls -l) of entries in that directory.

Parameters:
cached  set to true (1) if the connection should be cached for future calls
Returns:
the unparsed directory listing and an error message
See also:
ns__DATA_FTP_List

int ns__DATAConnectedList char *    in_URL,
int    verbose,
struct List_response   resp
 

Lists the content of a directory and caches the connection to the GridFTP server.

Parameters:
verbose  when set to 1 will result in detailed listing of the given directory (ls -l). When set to 0, the method will return just a list of entries in that directory. Set to 2 will produce a machine listing of the directory (doesn't work for files). Set to 3 will produce a machine listing of the directory entry or file.
Returns:
the unparsed directory listing and an error message
See also:
ns__DATA_FTP_List

int ns__DATAConnectedMkdir char *    in_URL,
char **    resp
 

Creates a directory on a remote site.

Returns the error message. A cached connection will be used or initiated for this operation.

Parameters:
in_URL  the URL of the directory to be created
resp  the return parameter
Returns:
the error message
See also:
ns__DATA_FTP_Mkdir

int ns__DATAConnectedModTime char *    in_URL,
struct Time_response   resp
 

Returns the modification time of a directory entry.

Returns the time since the Epoch (00:00:00 UTC, January 1, 1970), measured in seconds. A cached connection will be used or initiated for this operation.

Parameters:
in_URL  the URL of the directory entry
resp  the return parameter
Returns:
the modification time and an error message
See also:
ns__DATA_FTP_ModTime

int ns__DATAConnectedSize char *    in_URL,
struct Size_response   resp
 

Returns the size of a file.

Returns the file size in bytes. A cached connection will be used or initiated for this operation.

Parameters:
in_URL  the URL of the directory entry
resp  the return parameter
Returns:
the file size and an error message
See also:
ns__DATA_FTP_Size

int ns__DATACopyFile xsd__string    source_URL,
xsd__string    dest_URL,
int    use_parallel,
int    no_overwrite,
int    maintain_permissions,
xsd__string *    response
 

Copies a single file.

This method blocks until the operation is completed (with success or failure)

Parameters:
source_URL  the URL of the source file
dest_URL  the URL of the destination
use_parallel  set to true (1) if the usage of parallel streams is desired
no_overwrite  if set to true (1), the service will not overwrite the destination file if it exists
maintain_permissions  if set to true (1), the service will try to copy the permissions from the source to the destination file after the copy by doing an extra file listing on the source and a chmod on the destination internally
response  return parameter
Returns:
a string containing a numeric error code followed by a human-readable description

int ns__DATACopyFileDefaults xsd__string    source_URL,
xsd__string    dest_URL,
xsd__string *    response
 

Copies a file using default parameters.

This method blocks until the operation is completed (with success or failure) The defaults are : true for use_parallel, false for no_overwrite and true for maintain_permissions

Parameters:
source_URL  the URL of the source file
dest_URL  the URL of the destination
response  return parameter
See also:
ns__DATACopyFile
Returns:
a string containing a numeric error code followed by a human-readable description

int ns__DATADeleteFileDefaults xsd__string    in_URL,
xsd__string *    response
 

Deletes a file.

This method blocks until the operation is completed (with success or failure)

Parameters:
in_URL  the URL of the file
response  return parameter
Returns:
a string containing a numeric error code followed by a human-readable description

int ns__DATAdeleteFileTask xsd__long    id,
int *    response
 

Deletes information about a transfer.

The transfer should have been initiated with one of the init methods. This method stops the transfer if in prgress. After delete is called, the information about the transfer will be erased and the id will be reused. This method should always be called after the transfer is completed so that the memory on the machine that runs the service can be freed.

Parameters:
id  the transfer identifier
response  the return parameter
Returns:
integer containing error code

int ns__DATAgetFileTask xsd__long    id,
struct ns__FileTask   response
 

Returns information about the status of a transfer.

The transfer should have been initiated with one of the init methods. The method returns immediately.

Parameters:
id  the transfer identifier
response  the return parameter
Returns:
a handle containing data on the transfer status

int ns__DATAinit_CopyFile xsd__string    source_URL,
xsd__string    dest_URL,
int    use_parallel,
int    no_overwrite,
int    maintain_permissions,
struct ns__FileTask   response
 

Starts a non-blocking copy operation.

Non-blocking operations have similar parameters with the blocking versions. Every non-bocking operation is handled by a separate thread.

See also:
ns__DATACopyFile
Parameters:
response  the return parameter
Returns:
a handle containing the transfer id and other data on the transfer status

int ns__DATAinit_DeleteFile xsd__string    source_URL,
struct ns__FileTask   response
 

Starts a non-blocking delete operation.

See also:
ns__DATAinit_CopyFile
Parameters:
source_URL  the URL of the file
response  the return parameter
Returns:
a handle containing the transfer id and other data on the transfer status

int ns__DATAinit_MoveFile xsd__string    source_URL,
xsd__string    dest_URL,
int    use_parallel,
int    no_overwrite,
int    maintain_permissions,
struct ns__FileTask   response
 

Starts a non-blocking move operation.

See also:
ns__DATAMoveFile , ns__DATAinit_CopyFile
Parameters:
response  the return parameter
Returns:
a handle containing the transfer id and other data on the transfer status

int ns__DATAinit_TransferFile int    operation,
xsd__string    source_URL,
xsd__string    dest_URL,
int    use_parallel,
int    no_overwrite,
int    maintain_permissions,
struct ns__FileTask   response
 

container method for non-blocking Copy, Move and Delete.

Parameters:
operation  0 for copy, 1 for move and 2 for delete
source_URL  the URL of the source file
dest_URL  the URL of the destination (ignored for delete)
use_parallel  set to true (1) if the usage of parallel streams is desired at copy (ignored for delete)
no_overwrite  if set to true (1), the service will not overwrite the destination file if it exists (ignored for delete)
maintain_permissions  if set to true (1), the service will try to copy the permissions from the source to the destination file after the copy by doing an extra file listing on the source and a chmod on the destination internally (ignored for delete)
response  the return parameter
See also:
ns__DATATransferFile , ns__DATAinit_CopyFile
Returns:
a handle containing the transfer id and other data on the transfer status

int ns__DATAMoveFile xsd__string    source_URL,
xsd__string    dest_URL,
int    use_parallel,
int    no_overwrite,
int    maintain_permissions,
xsd__string *    response
 

Copies a file and then deletes the source.

This method blocks until the operation is completed (with success or failure)

Parameters:
source_URL  the URL of the source file
dest_URL  the URL of the destination
use_parallel  set to true (1) if the usage of parallel streams is desired
no_overwrite  if set to true (1), the service will not overwrite the destination file if it exists
maintain_permissions  if set to true (1), the service will try to copy the permissions from the source to the destination file after the copy by doing an extra file listing on the source and a chmod on the destination internally
response  return parameter
Returns:
a string containing a numeric error code followed by a human-readable description

int ns__DATAMoveFileDefaults xsd__string    source_URL,
xsd__string    dest_URL,
xsd__string *    response
 

Moves a file using default parameters.

This method blocks until the operation is completed (with success or failure) The defaults are currently true for use_parallel, false for no_overwrite and true for maintain_permissions

Parameters:
source_URL  the URL of the source file
dest_URL  the URL of the destination
response  return parameter
See also:
ns__DATAMoveFile
Returns:
a string containing a numeric error code followed by a human-readable description

int ns__DATAmultipleCopy struct ns__string_vector    in_URLs,
xsd__string *    response
 

Copies multiple gridftp files.

This method is useful for copying a large number of (small) gridftp files The service will cache the connections to the gridftp servers between he transfers so that the authentification overhead occurs only once.

Parameters:
in_URLs  vector containing the URLs stored in this order : source1, destination1, source2, destination2 ...
response  the return parameter
Returns:
a string containing a numeric error code followed by a human-readable description

int ns__DATArestartFileTask xsd__long    id,
struct ns__FileTask   response
 

Restarts a stopped or otherwise interrupted copy or move operation.

The transfer should have been initiated with one of the init methods. If the operation was interrupted with stopFileTask or by a transient network error and the service was able to save a restart marker before that, the operation is resumed using this call. If the transfer was not interupted (it failed from the beginning) or it was interrupted too early (no restart marker was saved) then the transfer cannot be resumed.

Parameters:
id  the transfer identifier
response  the return parameter
Returns:
a handle containing the transfer id and other data on the transfer status

int ns__DATAStopCache void *    dump,
char **    response
 

Destroys the data structure that was used to cache the GridFTP connections.

This method deletes the client handle, cached for the user connecting to the service. This removes all cached connections for that user. The method should be used when the user does not need to make any other cached operations to free the memory.

Parameters:
dump  not used
response  the return parameter
Returns:
error code (numeric) followed by human-readable text

int ns__DATAstopFileTask xsd__long    id,
struct ns__FileTask   response
 

Stops a copy or move operation (blocking).

The transfer should have been initiated with one of the init methods. This methods interrupts (if possible) the transfer. Useful for large file transfers. The operation may be resumed using restartFileTask

Parameters:
id  the transfer identifier
response  the return parameter
Returns:
a handle containing data on the transfer status

int ns__DATATransferFile int    operation,
xsd__string    source_URL,
xsd__string    dest_URL,
int    use_parallel,
int    no_overwrite,
int    maintain_permissions,
xsd__string *    response
 

Container method for Copy, Move and Delete.

This method makes calls to Copy, Move or Delete depending on the operation type. The other parameters are forwarded This method blocks until the operation is completed (with success or failure)

Parameters:
operation  use 0 for copy, 1 for move and 2 for delete
source_URL  the URL of the source file
dest_URL  the URL of the destination (ignored for delete)
use_parallel  true (1) if the usage of parallel streams is desired at copy (ignored for delete)
no_overwrite  if set to true (1), the service will not overwrite the destination file if it exists (ignored for delete)
maintain_permissions  if set to true (1), the service will try to copy the permissions from the source to the destination file after the copy by doing an extra file listing on the source and a chmod on the destination internally (ignored for delete)
response  return prameter
See also:
ns__DATACopyFile , ns__DATAMoveFile , ns__DATADeleteFileDefaults
Returns:
a string containing a numeric error code followed by a human-readable description

int ns__DATAwaitFileTask xsd__long    id,
struct ns__FileTask   response
 

Blocks and waits for a transfer to complete.

The transfer should have been initiated with one of the init methods. This method waits for that transfer to end or if the transfer was already finished it returns immediately.

Parameters:
id  the transfer identifier
response  the return parameter
Returns:
a handle containing data on the transfer status

int ns__getServiceDescription void *    dump,
xsd__string *    description
 

Returns a string description of the service.

Parameters:
dump  unused
description  return parameter

int ns__isAlive int    dump,
int *    response
 

Test method.

Returns 1 (used to see if the service is running)

Parameters:
dump  unused
response  return parameter


Variable Documentation

struct Directory_entry* __ptr
 

pointer to directory entries

int __size
 

vector size

Definition at line 541 of file data_movement_gass.hh.


Generated on Fri Aug 20 17:24:35 2004 for GridLab File Service by doxygen1.2.18