Garmin Fleet Management Controller  2.19.0
CFileTransferDlg Class Reference

Modal dialog allowing the user to select a file to transfer to the client. More...

#include <CFileTransferDlg.h>

+ Inheritance diagram for CFileTransferDlg:

Classes

struct  file_type
 Defines file type for a supported file type. More...
 

Public Member Functions

 CFileTransferDlg (CWnd *aParent, FmiApplicationLayer &aCom)
 Constructor. More...
 
virtual ~CFileTransferDlg ()
 Destructor. More...
 

Private Member Functions

void AddPSRtoStopList (char *file, uint32 &itemId)
 Adds the transferred PSR to the stop list. More...
 
virtual void DoDataExchange (CDataExchange *aDataExchange)
 Perform dialog data exchange and validation. More...
 
afx_msg void OnBnClickedFind ()
 Click handler for Find (file to send) button. More...
 
afx_msg void OnBnClickedOk ()
 Click handler for OK button. More...
 
afx_msg void OnEnChangeFile ()
 Edit Change handler for all text boxes. More...
 
BOOL OnInitDialog ()
 Initialize the dialog. More...
 

Private Attributes

FmiApplicationLayermCom
 Reference to the FMI communication controller. More...
 
CString mFilePath
 Path and file name of the file to transfer, as specified by the user. More...
 
int mFileType
 File type to be transferred, as specified by the user. More...
 
int mFileTypeIndex
 Index into the file_types array. More...
 
StopListItem mOldListItem
 
CString mVersion
 File string specified by the user. More...
 

Detailed Description

Modal dialog allowing the user to select a file to transfer to the client.

Since
Protocol A604

Definition at line 20 of file CFileTransferDlg.h.

Constructor & Destructor Documentation

CFileTransferDlg::CFileTransferDlg ( CWnd *  aParent,
FmiApplicationLayer aCom 
)

Constructor.

Parameters
aParentThe parent of this dialog
aComReference to the FMI communication controller

Definition at line 53 of file CFileTransferDlg.cpp.

References FALSE.

CFileTransferDlg::~CFileTransferDlg ( )
virtual

Destructor.

Definition at line 72 of file CFileTransferDlg.cpp.

References DoDataExchange().

Member Function Documentation

void CFileTransferDlg::AddPSRtoStopList ( char *  file,
uint32 itemId 
)
private

Adds the transferred PSR to the stop list.

This allows the route to be managed from the stop list.

Definition at line 286 of file CFileTransferDlg.cpp.

References FALSE, INVALID32, ClientListItem::isValid(), StopListItem::setCurrentName(), StopListItem::setStopStatus(), ClientListItem::setValid(), and STOP_STATUS_UNREAD.

void CFileTransferDlg::DoDataExchange ( CDataExchange *  aDataExchange)
privatevirtual

Perform dialog data exchange and validation.

Parameters
aDataExchangeThe DDX context

Definition at line 81 of file CFileTransferDlg.cpp.

References file_types, IDC_FILE_XFER_CBO_FILE_TYPE, IDC_FILE_XFER_EDIT_FILE_VERSION, IDC_FILE_XFER_EDIT_FILENAME, and CFileTransferDlg::file_type::index.

Referenced by ~CFileTransferDlg().

void CFileTransferDlg::OnBnClickedFind ( )
private

Click handler for Find (file to send) button.

Displays a File..Open dialog allowing the user to select the file to send.

Definition at line 160 of file CFileTransferDlg.cpp.

References FALSE, file_types, FMI_FILE_TYPE_PATH_SPECIFIC_ROUTE, and TRUE.

void CFileTransferDlg::OnBnClickedOk ( )
private

Click handler for OK button.

Initiates the file transfer process. Actual packets are sent by the mCom itself, but the file entered is checked before sending the message. If the file exists, a File Progress dialog box will appear that will not let the user continue until the file transfer completes or the user cancels it. If the file doesn't exist, an error dialog will appear.

Definition at line 214 of file CFileTransferDlg.cpp.

References FMI_FILE_TYPE_PATH_SPECIFIC_ROUTE, INVALID32, minval, TRUE, and UTIL_hex_to_uint8().

void CFileTransferDlg::OnEnChangeFile ( )
private

Edit Change handler for all text boxes.

Enables the OK button if both a file name and mVersion are specified, and the mVersion is of the appropriate length

Definition at line 123 of file CFileTransferDlg.cpp.

References FALSE, and TRUE.

BOOL CFileTransferDlg::OnInitDialog ( )
private

Initialize the dialog.

This function is called when the window is created. It sets up the parent, so it can get info from and send a message to FmiApplicationLayer.

Returns
TRUE, since this function does not set focus to a control

Definition at line 102 of file CFileTransferDlg.cpp.

References cnt_of_array, file_types, IDC_FILE_XFER_CBO_FILE_TYPE, and TRUE.

Member Data Documentation

FmiApplicationLayer& CFileTransferDlg::mCom
private

Reference to the FMI communication controller.

Definition at line 59 of file CFileTransferDlg.h.

CString CFileTransferDlg::mFilePath
private

Path and file name of the file to transfer, as specified by the user.

Definition at line 63 of file CFileTransferDlg.h.

int CFileTransferDlg::mFileType
private

File type to be transferred, as specified by the user.

Definition at line 66 of file CFileTransferDlg.h.

int CFileTransferDlg::mFileTypeIndex
private

Index into the file_types array.

Definition at line 69 of file CFileTransferDlg.h.

StopListItem CFileTransferDlg::mOldListItem
private

Definition at line 55 of file CFileTransferDlg.h.

CString CFileTransferDlg::mVersion
private

File string specified by the user.

Definition at line 72 of file CFileTransferDlg.h.


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