Aspera Developer Documentation

Location Class Reference

List of all members.


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.

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.


Constructor & Destructor Documentation

FASP_MANAGER_API Location ( const Location loc  ) 

Copy constructs this FASP location.

Parameters:
loc the FASP location to be copy constructed


Member Function Documentation

static FASP_MANAGER_API Location* CreateRemote ( const char *  host,
const char *  user,
const char *  passwd 
) [static]

Create this _remote_ FASP location (password authentication).

Parameters:
host the location hostname
user the location username
passwd the 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:
host the location hostname
user the location username
identity the path to local file containing the SSH identity (private key)
passphrase the passphrase used to secure the private key (may be empty)

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:
start the byte position at which the transfer begins (inclusive)
end the byte position at which the transfer ends (inclusive)

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

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* 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 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 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:
path the 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:
path the filepath to be added to the list


Copyright © 2005 - 2008 Aspera, Inc. | asperasoft.com