My Project
SallyAPI::File::CFileActionController Class Reference

File action controller. More...

#include <FileActionController.h>

List of all members.

Public Member Functions

 CFileActionController (FILE_ACTION fileAction)
 Constructor.
virtual ~CFileActionController ()
 Destructor.
int GetCurrentFileSize ()
 Gets the current file size.
int GetCurrentFileSizeTransferred ()
 Gets the current file size transferred.
void SetCurrentFileSize (int fileSize)
 Sets a current file size.
void SetCurrentFileSizeTransferred (int fileSize)
 Sets a current file size transferred.
int GetProcessedCount ()
 Gets the processed count.
void SetProcessedCount (int processed)
 Sets a processed count.
std::string GetCurrentFile ()
 Gets the current file.
void SetCurrentFile (const std::string &currentFile)
 Sets a current file.
FILE_ACTION GetFileAction ()
 Gets the file action.
void Cancel ()
 Cancels this object.
bool ShouldCancel ()
 Queries if we should cancel.
bool CopyFile (const std::string &sourceFile, const std::string &destinationFile)
 Copies a file.
bool MoveFile (const std::string &sourceFile, const std::string &destinationFile)
 Move file.
void RequestUserAction (const std::string &message, const std::string &filename)
 Request user action. Called by FileHelper::FileAction.
int GetRequestAnswer ()
 Gets the request answer. Called by FileHelper::FileAction.
void ResetRequestAnswer ()
 Resets a request answer. Called by FileHelper::FileAction.
bool IsRequestWaiting ()
 Query if this object is request waiting.
std::string GetRequestMessage ()
 Gets the request message.
std::string GetRequestFilename ()
 Gets the request filename.
void SetRequestAnswer (bool value)
 Sets a request answer.

Protected Attributes

FILE_ACTION m_eFileAction
int m_iProcessed
std::string m_strCurrentFile
bool m_bCancel
int m_iCurrentFileSize
int m_iCurrentFileSizeTransferred
std::string m_strRequestMessage
std::string m_strRequestFilename
int m_iRequestAnswer

Detailed Description

File action controller.

Author:
Christian Knobloch
Date:
22.12.2011

Constructor & Destructor Documentation

Constructor.

Author:
Christian Knobloch
Date:
23.12.2011
Parameters:
fileActionThe file action.

Destructor.

Author:
Christian Knobloch
Date:
23.12.2011

Member Function Documentation

Cancels this object.

Author:
Christian Knobloch
Date:
23.12.2011
bool CFileActionController::CopyFile ( const std::string &  sourceFile,
const std::string &  destinationFile 
)

Copies a file.

Author:
Christian Knobloch
Date:
23.12.2011
Parameters:
sourceFileSource file.
destinationFileDestination file.
Returns:
true if it succeeds, false if it fails.

Gets the current file.

Author:
Christian Knobloch
Date:
23.12.2011
Returns:
The current file.

Gets the current file size.

Author:
Christian Knobloch
Date:
23.12.2011
Returns:
The current file size.

Gets the current file size transferred.

Author:
Christian Knobloch
Date:
23.12.2011
Returns:
The current file size transferred.

Gets the file action.

Author:
Christian Knobloch
Date:
23.12.2011
Returns:
The file action.

Gets the processed count.

Author:
Christian Knobloch
Date:
23.12.2011
Returns:
The processed count.

Gets the request answer. Called by FileHelper::FileAction.

Author:
Christian Knobloch
Date:
23.12.2011
Returns:
The request answer.

Gets the request filename.

Author:
Christian Knobloch
Date:
23.12.2011
Returns:
The request filename.

Gets the request message.

Author:
Christian Knobloch
Date:
23.12.2011
Returns:
The request message.

Query if this object is request waiting.

Author:
Christian Knobloch
Date:
23.12.2011
Returns:
true if request waiting, false if not.
bool CFileActionController::MoveFile ( const std::string &  sourceFile,
const std::string &  destinationFile 
)

Move file.

Author:
Christian Knobloch
Date:
23.12.2011
Parameters:
sourceFileSource file.
destinationFileDestination file.
Returns:
true if it succeeds, false if it fails.
void CFileActionController::RequestUserAction ( const std::string &  message,
const std::string &  filename 
)

Request user action. Called by FileHelper::FileAction.

Author:
Christian Knobloch
Date:
23.12.2011
Parameters:
messageThe message.
filenameFilename of the file.

Resets a request answer. Called by FileHelper::FileAction.

Author:
Christian Knobloch
Date:
23.12.2011
void CFileActionController::SetCurrentFile ( const std::string &  currentFile)

Sets a current file.

Author:
Christian Knobloch
Date:
23.12.2011
Parameters:
currentFileThe current file.

Sets a current file size.

Author:
Christian Knobloch
Date:
23.12.2011
Parameters:
fileSizeSize of the file.

Sets a current file size transferred.

Author:
Christian Knobloch
Date:
23.12.2011
Parameters:
fileSizeSize of the file.

Sets a processed count.

Author:
Christian Knobloch
Date:
23.12.2011
Parameters:
processedThe processed.

Sets a request answer.

Author:
Christian Knobloch
Date:
23.12.2011
Parameters:
valuetrue to value.

Queries if we should cancel.

Author:
Christian Knobloch
Date:
23.12.2011
Returns:
true if it succeeds, false if it fails.

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines