Raspberry Cloud
Public Member Functions | Public Attributes | List of all members
CloudAccessLayer Class Reference

#include <CloudAccessLayer.h>

Public Member Functions

bool upload (FileDescriptor *fileDescriptor)
 
bool upload (LockFile lockFile)
 
FileDescriptordownload (FileDescriptor fileDescriptor)
 
bool download (LockFile lockFile)
 
bool deleteFile (FileDescriptor fileDescriptor)
 
bool deleteFile (LockFile lockFile)
 
long getSize (FileDescriptor fileDescriptor)
 
bool checkExists (FileDescriptor fileDescriptor)
 
bool checkExists (LockFile lockFile)
 

Public Attributes

Applicationapp
 

Detailed Description

CloudAccessLayer class it makes connecting to multiple clouds an easy job, and hides it from the rest of the software.

Member Function Documentation

bool CloudAccessLayer::checkExists ( FileDescriptor  fileDescriptor)

Checks if all the the fragments exist in the cloud

Parameters
fileDescriptordescriptor of the file to check
Returns
true if the all the the fragments exist, false otherwise
bool CloudAccessLayer::checkExists ( LockFile  lockFile)

Checks if the LockFile exists

Parameters
lockFilethe lockFile to check
Returns
true if the LockFile exists, false otherwise
bool CloudAccessLayer::deleteFile ( FileDescriptor  fileDescriptor)

Deletes the file from the corresponding adapters

Parameters
fileDescriptordescriptor of the file to delete
Returns
successful
bool CloudAccessLayer::deleteFile ( LockFile  lockFile)

Deletes the lockfile from the corresponding adapter

Parameters
lockFilethe lockfile to delete
Returns
successful
FileDescriptor * CloudAccessLayer::download ( FileDescriptor  fileDescriptor)

Downloads the file from the corresponding adapters

Parameters
fileDescriptordescriptor of the file to download
Returns
the new filedescriptor or null
bool CloudAccessLayer::download ( LockFile  lockFile)

Downloads the lockfile from the corresponding adapter

Parameters
lockFilethe lockfile to download
Returns
successful
long CloudAccessLayer::getSize ( FileDescriptor  fileDescriptor)

Returns the size of a file

Parameters
fileDescriptordescriptor of the file to measure
Returns
the length of the file
bool CloudAccessLayer::upload ( FileDescriptor fileDescriptor)

Uploads the file to the corresponding adapters

Parameters
fileDescriptordescriptor of the file to upload
Returns
successful

CloudAccessLayer implementation

bool CloudAccessLayer::upload ( LockFile  lockFile)

Uploads the lockfile to the corresponding adapter

Parameters
lockFilethe lockfile to upload
Returns
successful

The documentation for this class was generated from the following files: