-
Notifications
You must be signed in to change notification settings - Fork 29
/
CreateDownloadDlg.h
155 lines (114 loc) · 3.86 KB
/
CreateDownloadDlg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/*
Free Download Manager Copyright (c) 2003-2016 FreeDownloadManager.ORG
*/
#if !defined(AFX_CREATEDOWNLOADDLG_H__03F2DDF0_42A2_447A_A6F5_59C47F718201__INCLUDED_)
#define AFX_CREATEDOWNLOADDLG_H__03F2DDF0_42A2_447A_A6F5_59C47F718201__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif
#include "DownloadsWnd.h"
#include "fsScheduleMgr.h"
#include "DownloadsGroupsComboBox.h"
#define ID_DLNOTADDED_EXISTS (IDCANCEL+100)
#define ID_DLNOTADDED_NEEDSPECIFICCREATION (IDCANCEL+101)
namespace DownloadType {
enum DownloadType {
UNKNOWN,
YOUTUBE_DOWNLOAD
};
ENUM_STREAM_SUPPORT_BEGIN (DownloadType)
ENUM_STREAM_SUPPORT_ENTRY (YOUTUBE_DOWNLOAD, L"YtDownload")
ENUM_STREAM_SUPPORT_END (DownloadType)
}
class CCreateDownloadDlg : public CDialog
{
public:
static BOOL _CheckFolderName(CDialog *pdlg, UINT nIdCtrl);
static BOOL _CheckFileName (CDialog* pdlg, UINT nIdCtrl);
static BOOL _SetDownloadOutputFolderAsDefault (CWnd* pwndParent, LPCTSTR pszFolder, vmsDownloadsGroupSmartPtr pGroup);
LPCSTR m_pszPostData;
LPCTSTR m_pszCookies;
bool m_bPlaceAtTop;
bool m_bSetFocusToOKBtn;
vmsDownloadsGroupSmartPtr m_pGroup;
static fsSiteInfo* _SavePassword (vmsDownloadSmartPtr dld);
static fsSiteInfo* _SavePassword(LPCTSTR pszServer, fsNetworkProtocol np, LPCTSTR pszUser, LPCTSTR pszPwd);
static int _CheckDownloadAlrExists (
vmsDownloadSmartPtr dld, BOOL bNeedTopMost = FALSE, BOOL bShowUI = TRUE, CCreateDownloadDlg* const cddlg = NULL);
BOOL m_bReqTopMostDialog;
fsScheduleEx m_schScheduleParam;
BOOL m_bScheduled;
BOOL m_bAuthorization;
CString m_strUrl;
class CFdmUiWindow *m_pUiWindow;
BOOL m_useSpecificCreationMethodIfApplicable;
CCreateDownloadDlg(vmsDownloadSmartPtr dld, CWnd* pParent = NULL);
//{{AFX_DATA(CCreateDownloadDlg)
enum { IDD = IDD_CREATEDOWNLOAD };
CButton m_btnOutFolderSetDefault;
CComboBox m_wndDldType;
CButton m_btnSetTime;
CButton m_btnCreateGroup;
CButton m_btnChooseFolder;
//}}AFX_DATA
//{{AFX_VIRTUAL(CCreateDownloadDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX);
//}}AFX_VIRTUAL
protected:
BOOL m_bUrlChanged;
CString m_strComment;
volatile BOOL m_bNeedExit;
volatile BOOL m_bThread;
static DWORD WINAPI _threadQSize (LPVOID lp);
void PrepareCHMgr(CPoint point);
int m_iAutostart;
void ReadAutostart();
void ApplyLanguage();
void OnChangeGroups();
BOOL m_bGroupChanged;
BOOL m_bAuthChanged;
void UrlChanged();
void Update_User_Password();
BOOL ReadDNP();
void WrongUserName();
void WrongURL();
CDownloadsGroupsComboBox m_wndGroups;
vmsDownloadSmartPtr m_dld;
void UpdateEnabled();
//{{AFX_MSG(CCreateDownloadDlg)
virtual void OnOK();
virtual BOOL OnInitDialog();
afx_msg void OnChangeSaveas();
afx_msg void OnAuthorization();
afx_msg void OnSelchangeGroups();
afx_msg void OnStartnow();
afx_msg void OnStartmanual();
afx_msg void OnStartschedule();
afx_msg void OnCreategroup();
afx_msg void OnAdvanced();
afx_msg void OnChoosefolder();
afx_msg void OnSettime();
afx_msg void OnEditchangeUrl();
afx_msg void OnSelchangeUrl();
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
afx_msg void OnWhatisthis();
afx_msg void OnChangeUser();
afx_msg void OnChangePassword();
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
afx_msg void OnQsize();
virtual void OnCancel();
afx_msg void OnFileauto();
afx_msg void OnMirrors();
afx_msg void OnSelchangeDldtype();
afx_msg void OnMalicious();
afx_msg void OnOutfolderSetdefault();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
static bool AskUserToUseSpecificCreationMethod(CWnd *parentWindow,
DownloadType::DownloadType type, bool topmostUi);
static DownloadType::DownloadType GetDownloadType(LPCTSTR url);
};
//{{AFX_INSERT_LOCATION}}
#endif