Garmin Fleet Management Controller  2.19.0
CFileConverterDlg.h
Go to the documentation of this file.
1 /*********************************************************************
2 *
3 * HEADER NAME:
4 * CFileConverterDlg.h
5 *
6 * Copyright 2008-2015 by Garmin Ltd. or its subsidiaries.
7 *---------------------------------------------------------------------
8 * $NoKeywords$
9 *********************************************************************/
10 #pragma once
11 
12 #include "FmiApplicationLayer.h"
13 
14 #if( FMI_SUPPORT_A622 )
15 //----------------------------------------------------------------------
18 //----------------------------------------------------------------------
19 class CFileConverterDlg : public CDialog
20 {
21  DECLARE_DYNAMIC( CFileConverterDlg )
22 
23 public:
25  (
26  CWnd * aParent,
27  FmiApplicationLayer & aCom
28  );
29  virtual ~CFileConverterDlg();
30 
32  typedef struct
33  {
35  CString text;
36  CString extension;
37  CString newExtension;
38  CString filter;
40 
41  // Dialog Data
42  enum { IDD = IDD_FILECONVERTER };
43 
44 protected:
45 
46  DECLARE_MESSAGE_MAP()
47 
48  virtual void DoDataExchange
49  (
50  CDataExchange* aDataExchange
51  );
52 
53  BOOL OnInitDialog();
54  afx_msg void OnEnChangeFile();
55  afx_msg void OnBnClickedFind();
56  afx_msg void OnBnClickedChoose();
57  afx_msg void OnBnClickedOk();
58  afx_msg void OnComboChanged();
59 
60  CString FormatArguments( CString dstFilePath );
61  void ReadFromPipe(void);
62  BOOL CreateChildProcess(CString dstFilePath);
63 
66 
69  CString mSrcFilePath;
70 
73 
76 
79  CString mDstFileName;
80 
83  CString mDstFolder;
84 
86  CString mStopId;
87 
89  CString mRouteName;
90 
92  BOOL mSrcCoords;
93  BOOL mDstCoords;
94 
95 
99 
100 };
101 #endif
FmiApplicationLayer & mCom
Reference to the FMI communication controller.
BOOL CreateChildProcess(CString dstFilePath)
Create a child process to execute the file conversion.
CString mDstFileName
File name of the converted file specified by the user. Defaults as the same name as Src file with new...
virtual ~CFileConverterDlg()
Destructor.
BOOL OnInitDialog()
Initialize the dialog.
afx_msg void OnBnClickedOk()
Click handler for OK button.
BOOL mSrcCoords
Flags identify the format of the the source and destination files coords.
Serial communication controller for Garmin and FMI packets.
afx_msg void OnBnClickedFind()
Click handler for Find (file to convert) button.
afx_msg void OnBnClickedChoose()
Click handler for Choose (destination folder) button.
afx_msg void OnEnChangeFile()
Edit Change handler for all text boxes.
File conversion tool to support various GPS file formats.
int mConversionType
Type of file conversion to be attempted, as specified by the user.
CString mStopId
Unique Stop ID for the PSR.
CFileConverterDlg(CWnd *aParent, FmiApplicationLayer &aCom)
Constructor.
CString mDstFolder
Destination folder for the converted file. Defaults to the same folder as Src file.
HANDLE hChildStd_OUT_Rd
Handles for the redirection of the child process stdout.
int mConversionIndex
Index of the chosen combo box item.
unsigned char uint8
8-bit unsigned integer
Definition: garmin_types.h:62
CString mSrcFilePath
Path and file name of the file to be converted, as specified by the user.
afx_msg void OnComboChanged()
Change Handler for the combo box.
virtual void DoDataExchange(CDataExchange *aDataExchange)
Perform dialog data exchange and validation.
CString FormatArguments(CString dstFilePath)
Helper function to format the command line arguments.
#define IDD_FILECONVERTER
Definition: resource.h:66
CString mRouteName
Route name (Stop Text) of the PSR (limited to 200 bytes)
void ReadFromPipe(void)
Read output from the child process's pipe for STDOUT.