Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

FTP_Application Class Reference

CPLAT::FTP_Application. More...

List of all members.

Public Member Functions

Constructor / Destructor
 FTP_Application ()
 Constructor.
virtual ~FTP_Application () throw ()
 Destructor.

Protected Member Functions

AboutBox
virtual CPLAT::CP_String GetAboutBoxDescription () const
Commands
virtual void HandleOpenApplication ()

Protected Attributes

CPLAT::CP_Window * fFTPDisplayWindow
CPLAT::CP_Socket * fFTPSocket
CPLAT::CP_FTP * fFTPProtocol
CPLAT::CP_Strings_Array fDirectoryListingData
CPLAT::CP_DataSource_Strings * fDataSource

Private Types

typedef CPLAT::CP_Application<
CPLAT::CP_DocumentPolicy_Multi,
CPLAT::CP_PrintPolicy_None,
CPLAT::CP_UndoPolicy_None > 
inherited

Private Member Functions

Commands
virtual void HandleNewUpdateCommandStatusCommand (CPLAT::CP_CommandStatus &inOutCommandStatus, bool &, CPLAT::CP_CommandNo &)
virtual void HandleNewCommand (CPLAT::OSStatus &inOutStatus, CPLAT::CP_CommandNo &inCommandNo)
Main Window
void Connect (const CPLAT::CP_String &inHostURL, const CPLAT::CP_String &inUser, const CPLAT::CP_String &inPassword)
void MainWindow ()
void UpdateDisplayedDirectoryLabel (const CPLAT::CP_String &inDirectory)
void GetSiteDialog ()
void UpdateDirectoryListing ()
bool ChangeDirectory (const CPLAT::CP_String &inDirectory)
Slots
void HandleDismiss (CPLAT::CP_DataValueHolder &inValue, CPLAT::OSStatus &inOutStatus)
void HandleCancel (CPLAT::CP_DataValueHolder &inValue, CPLAT::OSStatus &inOutStatus)
void RootDirectoryClicked (CPLAT::CP_DataValueHolder &inValue, CPLAT::OSStatus &inOutStatus)
void UpDirectoryClicked (CPLAT::CP_DataValueHolder &inValue, CPLAT::OSStatus &inOutStatus)
void UpdateProgress (CPLAT::CP_DataValueHolder &inDataValue, CPLAT::OSStatus &inOutStatus)
void DirectoryListingDoubleClick (CPLAT::CP_DataValueHolder &inValue, CPLAT::OSStatus &)


Detailed Description

Application class for the CPLAT::Internet demo.


Member Typedef Documentation

typedef CPLAT::CP_Application<CPLAT::CP_DocumentPolicy_Multi, CPLAT::CP_PrintPolicy_None, CPLAT::CP_UndoPolicy_None> FTP_Application::inherited [private]
 


Constructor & Destructor Documentation

FTP_Application::FTP_Application  ) 
 

Constructor.

Exceptions:
none 

FTP_Application::~FTP_Application  )  throw () [virtual]
 

Destructor.

Exceptions:
none 


Member Function Documentation

CPLAT::CP_String FTP_Application::GetAboutBoxDescription  )  const [protected, virtual]
 

Return the string that describes the purpose of the application in the AboutBox.

Exceptions:
none 
Returns:
CP_String const The description, displayed in the about box.

void FTP_Application::HandleOpenApplication  )  [protected, virtual]
 

Called when the application is starting up. We take this opportunity to create our initial window and views. In this demo, we create a the main window, and display the go to site dialog.

Exceptions:
none 
Returns:
void

virtual void FTP_Application::HandleNewUpdateCommandStatusCommand CPLAT::CP_CommandStatus &  inOutCommandStatus,
bool &  ,
CPLAT::CP_CommandNo
[private, virtual]
 

Handles the menu/command update status handler for the CP_CMD_New command. We always enable the command, so many windows can be created if desired.

Parameters:
inOutCommandStatuss Loccation to return the enabled status result in.
inOutWasHandled Not used.
inCommandNo Not used.
Exceptions:
none 
Returns:
void

void FTP_Application::HandleNewCommand CPLAT::OSStatus &  inOutStatus,
CPLAT::CP_CommandNo inCommandNo
[private, virtual]
 

Override the New command handler to create new windows. Since this application is using a NULL document policy, we don't normally have the New menu item enabled.

Returns:
inOutStatus Return the OSStatus of this operation here.

inCommandNo The command being executed, in this case CP_CMD_New/

Exceptions:
none 
Returns:
void

void FTP_Application::Connect const CPLAT::CP_String &  inHostURL,
const CPLAT::CP_String &  inUser,
const CPLAT::CP_String &  inPassword
[private]
 

Establish a connection with our FTP server.

Parameters:
inHostURL The host URL to connect to.
inUser The username.
inPassword The password for the site.
Exceptions:
none 
Returns:
void

void FTP_Application::MainWindow  )  [private]
 

Displays the main window.

Exceptions:
none 
Returns:
void

void FTP_Application::UpdateDisplayedDirectoryLabel const CPLAT::CP_String &  inDirectory  )  [private]
 

Called when the directory being displayed changes. We update the static text field here with the new directory.

Parameters:
inDirectory String containing the new directory to be displayed.
Exceptions:
none 
Returns:
void

void FTP_Application::GetSiteDialog  )  [private]
 

Present the user with a dialog to specify the ftp site to log onto.

Exceptions:
none 
Returns:
void

void FTP_Application::UpdateDirectoryListing  )  [private]
 

Updates the current directory listing.

Exceptions:
none 
Returns:
void

bool FTP_Application::ChangeDirectory const CPLAT::CP_String &  inDirectory  )  [private]
 

Changes directory to that of the passed in directory.

Parameters:
inDirectory The directory to change to.
Exceptions:
none 
Returns:
bool Returns true if the change was successful.

void FTP_Application::HandleDismiss CPLAT::CP_DataValueHolder &  inValue,
CPLAT::OSStatus &  inOutStatus
[private]
 

Slot to handle the dismiss button from the GoToFTP site dialog.

Parameters:
inValue Contains the sending dialog.
inOutStatus Returns the status of the dismiss action. We return CP_noErr to allow the dialog to be dismissed.
Exceptions:
none 
Returns:
void

void FTP_Application::HandleCancel CPLAT::CP_DataValueHolder &  inValue,
CPLAT::OSStatus &  inOutStatus
[private]
 

Slot to handle the cancel button from the GoToFTP site dialog. This will just cause the dialog to go away.

Parameters:
inValue Not used.
inOutStatus Returns the status of the cancel action. We return CP_noErr to allow the dialog to be dismissed.
Exceptions:
none 
Returns:
void

void FTP_Application::RootDirectoryClicked CPLAT::CP_DataValueHolder &  inValue,
CPLAT::OSStatus &  inOutStatus
[private]
 

Slot called when the user clicks on a root directory in the main windows list of displayed directories.

Parameters:
inValue Not used.
inOutStatus Not used.
Exceptions:
none 
Returns:
void

void FTP_Application::UpDirectoryClicked CPLAT::CP_DataValueHolder &  inValue,
CPLAT::OSStatus &  inOutStatus
[private]
 

Slot called when the user clicks on the up directory button to go to a higher directory.

Parameters:
inValue Not used.
inOutStatus Not used.
Exceptions:
none 
Returns:
void

void FTP_Application::UpdateProgress CPLAT::CP_DataValueHolder &  inValue,
CPLAT::OSStatus &  inOutStatus
[private]
 

Updates the progress dispayed to indicate what the FTP class is doing.

Parameters:
inValue Contains the CP_InternetProtocolProgress that indicates the progress that is occurring.
inOutStatus Not used.
Exceptions:
none 
Returns:
void

void FTP_Application::DirectoryListingDoubleClick CPLAT::CP_DataValueHolder &  inValue,
CPLAT::OSStatus & 
[private]
 

Called when the user double clicks on one of the directory listing items in the main table displaying the contents of a directory.

Parameters:
inValue Contains the row that the user clicked on.
inOutStatus Not used.
Exceptions:
none 
Returns:
void


Member Data Documentation

CPLAT::CP_Window* FTP_Application::fFTPDisplayWindow [protected]
 

CPLAT::CP_Socket* FTP_Application::fFTPSocket [protected]
 

CPLAT::CP_FTP* FTP_Application::fFTPProtocol [protected]
 

CPLAT::CP_Strings_Array FTP_Application::fDirectoryListingData [protected]
 

CPLAT::CP_DataSource_Strings* FTP_Application::fDataSource [protected]
 


The documentation for this class was generated from the following files:
Generated on Tue Sep 20 20:24:11 2005 for CPLAT_MacOS by  doxygen 1.4.0