Location Class Referenceabstract

A class representing a transfer end point. More...

Public Member Functions

FASP_MANAGER_API void SetByteRange (u_int64_t start, u_int64_t end)
 
FASP_MANAGER_API void Destroy ()
 Destroys this FASP location.
 
FASP_MANAGER_API Location (const Location &loc)
 
virtual FASP_MANAGER_API bool IsRemote () const =0
 
virtual FASP_MANAGER_API char * GetHostname () const =0
 
virtual FASP_MANAGER_API char * GetUsername () const =0
 
virtual FASP_MANAGER_API char * GetPassword () const =0
 
virtual FASP_MANAGER_API char * GetIdentity () const =0
 Gets the path to the private key.
 
virtual FASP_MANAGER_API void AddFilepath (char const *path)=0
 
virtual FASP_MANAGER_API void AddFilepath (char const *source, char const *destination)=0
 

Static Public Member Functions

static FASP_MANAGER_API LocationCreateLocal ()
 Create this local FASP location.
 
static FASP_MANAGER_API LocationCreateRemote (const char *host, const char *user, const char *passwd)
 
static FASP_MANAGER_API LocationCreateRemote (const char *host, const char *user, const char *identity, const char *passphrase)
 

Protected Member Functions

FASP_MANAGER_API Location ()
 Constructs this FASP location.
 
virtual FASP_MANAGER_API ~Location ()=0
 Destructs this FASP location.
 

Detailed Description

A class representing a transfer end point.

This class holds the information about the paths to source and destination files, authentication information etc.

Constructor & Destructor Documentation

FASP_MANAGER_API Location ( const Location loc)

Copy constructs this FASP location.

Parameters
locthe FASP location to be copy constructed

Member Function Documentation

virtual FASP_MANAGER_API void AddFilepath ( char const *  path)
pure virtual

Adds a filepath to the list of paths associated with this FASP location.

Deprecated feature. Use AddFilepath(source, destination) - two argument method

Parameters
paththe filepath to be added to the list
Deprecated:
use AddFilepath(source, destination)
virtual FASP_MANAGER_API void AddFilepath ( char const *  source,
char const *  destination 
)
pure virtual

Adds a filepath pair (source/destination) to the list of paths associated with this FASP location.

Parameters
paththe filepath to be added to the list
static FASP_MANAGER_API Location* CreateRemote ( const char *  host,
const char *  user,
const char *  passwd 
)
static

Create this remote FASP location (password authentication).

Parameters
hostthe location hostname
userthe location username
passwdthe location password
static FASP_MANAGER_API Location* CreateRemote ( const char *  host,
const char *  user,
const char *  identity,
const char *  passphrase 
)
static

Create this remote FASP location (public key authentication).

Parameters
hostthe location hostname
userthe location username
identitythe path to local file containing the SSH identity (private key)
passphrasethe passphrase used to secure the private key (may be empty)
virtual FASP_MANAGER_API char* GetHostname ( ) const
pure virtual

Gets the hostname associated with this remote FASP location.

Returns
the hostname associated with this FASP location, or NULL if local endpoint
virtual FASP_MANAGER_API char* GetPassword ( ) const
pure virtual

Gets the password associated with this remote FASP location.

Returns
the password associated with this FASP location or NULL if local endpoint
virtual FASP_MANAGER_API char* GetUsername ( ) const
pure virtual

Gets the username associated with this remote FASP location.

Returns
the username associated with this FASP location or NULL if local endpoint
virtual FASP_MANAGER_API bool IsRemote ( ) const
pure virtual

Returns true iff this is a remote FASP location.

Returns
true iff this is a remote FASP location
FASP_MANAGER_API void SetByteRange ( u_int64_t  start,
u_int64_t  end 
)

Specify the range of bytes to be downloaded. Byte range is to be specified on the source Location object. This currently works for downloads only. Use -1 to indicate end of file. Throws ValidationException if used on destination object.

Parameters
startthe byte position at which the transfer begins (inclusive)
endthe byte position at which the transfer ends (inclusive)

Copyright © 2005 - 2016 Aspera, an IBM company. | asperasoft.com