diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-11 13:52:01 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-11 13:52:01 +0000 |
commit | a15cd68f0412e1b211e746a2e4d5682e96f5a113 (patch) | |
tree | d09d41832621cfc07957dbbcd60077fdf96b7e66 /plugins/YAMN/src/proto/pop3 | |
parent | 85bd008c039eb1d93894e94fba9d158a42a71a12 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14911 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAMN/src/proto/pop3')
-rw-r--r-- | plugins/YAMN/src/proto/pop3/pop3comm.cpp | 12 | ||||
-rw-r--r-- | plugins/YAMN/src/proto/pop3/pop3opt.cpp | 117 |
2 files changed, 58 insertions, 71 deletions
diff --git a/plugins/YAMN/src/proto/pop3/pop3comm.cpp b/plugins/YAMN/src/proto/pop3/pop3comm.cpp index 593f5238de..febfae336b 100644 --- a/plugins/YAMN/src/proto/pop3/pop3comm.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3comm.cpp @@ -71,7 +71,7 @@ void WINAPI DeleteErrorString(LPVOID String); // len- length of source string
// mboxsize- adreess to integer, that receives size of mailbox
// mails- adreess to integer, that receives number of mails
-void ExtractStat(char *stream, int len, int *mboxsize, int *mails);
+void ExtractStat(char *stream, int *mboxsize, int *mails);
//Extracts mail ID on mailbox
// stream- source string
@@ -156,7 +156,7 @@ CPOP3Account::~CPOP3Account() delete InternetQueries;
}
-HACCOUNT WINAPI CreatePOP3Account(HYAMNPROTOPLUGIN Plugin, DWORD CAccountVersion)
+HACCOUNT WINAPI CreatePOP3Account(HYAMNPROTOPLUGIN, DWORD)
{
//First, we should check whether CAccountVersion matches.
//But this is internal plugin, so YAMN's CAccount structure and our CAccount structure are
@@ -386,7 +386,7 @@ DWORD WINAPI ReadPOP3Options(HACCOUNT Which, char **Parser, char *End) return 0;
}
-HYAMNMAIL WINAPI CreatePOP3Mail(HACCOUNT Account, DWORD MailDataVersion)
+HYAMNMAIL WINAPI CreatePOP3Mail(HACCOUNT Account, DWORD)
{
HYAMNMAIL NewMail;
//First, we should check whether MAILDATA matches.
@@ -642,7 +642,7 @@ DWORD WINAPI SynchroPOP3(struct CheckParam * WhichTemp) DebugLog(DecodeFile,"<--------Account checking-------->\n");
DebugLog(DecodeFile,"<Extracting stat>\n");
#endif
- ExtractStat(DataRX, MyClient->NetClient->Rcv, &mboxsize, &msgs);
+ ExtractStat(DataRX, &mboxsize, &msgs);
#ifdef DEBUG_DECODE
DebugLog(DecodeFile,"<MailBoxSize>%d</MailBoxSize>\n",mboxsize);
DebugLog(DecodeFile,"<Msgs>%d</Msgs>\n",msgs);
@@ -1141,7 +1141,7 @@ void __cdecl DeleteMailsPOP3(void *param) #ifdef DEBUG_DECODE
DebugLog(DecodeFile,"<Extracting stat>\n");
#endif
- ExtractStat(DataRX, MyClient->NetClient->Rcv, &mboxsize, &msgs);
+ ExtractStat(DataRX, &mboxsize, &msgs);
#ifdef DEBUG_DECODE
DebugLog(DecodeFile,"<MailBoxSize>%d</MailBoxSize>\n",mboxsize);
DebugLog(DecodeFile,"<Msgs>%d</Msgs>\n",msgs);
@@ -1357,7 +1357,7 @@ void __cdecl DeleteMailsPOP3(void *param) return;
}
-void ExtractStat(char *stream, int len, int *mboxsize, int *mails)
+void ExtractStat(char *stream, int *mboxsize, int *mails)
{
char *finder = stream;
while (WS(finder) || ENDLINE(finder)) finder++;
diff --git a/plugins/YAMN/src/proto/pop3/pop3opt.cpp b/plugins/YAMN/src/proto/pop3/pop3opt.cpp index 6b6393a022..73aa051d53 100644 --- a/plugins/YAMN/src/proto/pop3/pop3opt.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3opt.cpp @@ -69,7 +69,7 @@ INT_PTR CALLBACK DlgProcYAMNOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lParam) return FALSE;
}
-INT_PTR CALLBACK DlgProcPluginOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lParam)
+INT_PTR CALLBACK DlgProcPluginOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM)
{
switch(msg) {
case WM_INITDIALOG:
@@ -160,7 +160,7 @@ INT_PTR CALLBACK DlgProcPluginOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lParam }
-int YAMNOptInitSvc(WPARAM wParam,LPARAM lParam)
+int YAMNOptInitSvc(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = YAMNVar.hInst;
@@ -195,7 +195,7 @@ int YAMNOptInitSvc(WPARAM wParam,LPARAM lParam) //--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
-BOOL DlgEnableAccountStatus(HWND hDlg,WPARAM wParam,LPARAM lParam)
+BOOL DlgEnableAccountStatus(HWND hDlg, WPARAM wParam, LPARAM)
{
EnableWindow(GetDlgItem(hDlg,IDC_CHECKST0),(BOOL)wParam);
EnableWindow(GetDlgItem(hDlg,IDC_CHECKST1),(BOOL)wParam);
@@ -210,7 +210,8 @@ BOOL DlgEnableAccountStatus(HWND hDlg,WPARAM wParam,LPARAM lParam) EnableWindow(GetDlgItem(hDlg,IDC_CHECKST9),(BOOL)wParam);
return TRUE;
}
-BOOL DlgEnableAccountPopup(HWND hDlg,WPARAM wParam,LPARAM lParam)
+
+BOOL DlgEnableAccountPopup(HWND hDlg, WPARAM wParam, LPARAM)
{
EnableWindow(GetDlgItem(hDlg,IDC_CHECKPOP),(BOOL)wParam);
EnableWindow(GetDlgItem(hDlg,IDC_EDITPOPS),(IsDlgButtonChecked(hDlg,IDC_CHECKPOP)==BST_CHECKED) && wParam);
@@ -233,7 +234,7 @@ BOOL DlgEnableAccountPopup(HWND hDlg,WPARAM wParam,LPARAM lParam) return TRUE;
}
-BOOL DlgEnableAccount(HWND hDlg,WPARAM wParam,LPARAM lParam)
+BOOL DlgEnableAccount(HWND hDlg, WPARAM wParam, LPARAM)
{
EnableWindow(GetDlgItem(hDlg,IDC_CHECK),(BOOL)wParam);
EnableWindow(GetDlgItem(hDlg,IDC_EDITSERVER),wParam);
@@ -511,7 +512,7 @@ BOOL DlgShowAccount(HWND hDlg,WPARAM wParam,LPARAM lParam) return TRUE;
}
-BOOL DlgShowAccountColors(HWND hDlg,WPARAM wParam,LPARAM lParam)
+BOOL DlgShowAccountColors(HWND hDlg, WPARAM, LPARAM lParam)
{
HPOP3ACCOUNT ActualAccount=(HPOP3ACCOUNT)lParam;
#ifdef DEBUG_SYNCHRO
@@ -576,75 +577,61 @@ BOOL DlgSetItemTextW(HWND hDlg,WPARAM wParam,const WCHAR* str) return TRUE;
}
-INT_PTR CALLBACK DlgProcPOP3AccStatusOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lParam)
+INT_PTR CALLBACK DlgProcPOP3AccStatusOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM)
{
static HPOP3ACCOUNT ActualAccount;
- switch(msg)
- {
- case WM_INITDIALOG:
+ switch(msg) {
+ case WM_INITDIALOG:
+ ActualAccount=(HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)DlgInput);
+ if (ActualAccount != NULL)
{
- ActualAccount=(HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)DlgInput);
- if (ActualAccount != NULL)
- {
- DlgShowAccountStatus(hDlg,(WPARAM)M_SHOWACTUAL,(LPARAM)ActualAccount);
- DlgEnableAccountStatus(hDlg,TRUE,TRUE);
- }
- else
- {
- CheckDlgButton(hDlg,IDC_CHECKST0,BST_CHECKED);
- CheckDlgButton(hDlg,IDC_CHECKST1,BST_CHECKED);
- CheckDlgButton(hDlg,IDC_CHECKST2,BST_CHECKED);
- CheckDlgButton(hDlg,IDC_CHECKST3,BST_CHECKED);
- CheckDlgButton(hDlg,IDC_CHECKST4,BST_CHECKED);
- CheckDlgButton(hDlg,IDC_CHECKST5,BST_CHECKED);
- CheckDlgButton(hDlg,IDC_CHECKST6,BST_CHECKED);
- CheckDlgButton(hDlg,IDC_CHECKST7,BST_CHECKED);
- CheckDlgButton(hDlg,IDC_CHECKST8,BST_CHECKED);
- CheckDlgButton(hDlg,IDC_CHECKST9,BST_CHECKED);
- }
- TranslateDialogDefault(hDlg);
- SendMessage(GetParent(hDlg),PSM_UNCHANGED,(WPARAM)hDlg,0);
- return TRUE;
- break;
+ DlgShowAccountStatus(hDlg,(WPARAM)M_SHOWACTUAL,(LPARAM)ActualAccount);
+ DlgEnableAccountStatus(hDlg,TRUE,TRUE);
}
- case WM_COMMAND:
+ else
{
-
- WORD wNotifyCode = HIWORD(wParam);
- switch(LOWORD(wParam))
- {
- case IDOK:
- Check0 = (IsDlgButtonChecked(hDlg,IDC_CHECKST0)==BST_CHECKED);
- Check1 = (IsDlgButtonChecked(hDlg,IDC_CHECKST1)==BST_CHECKED);
- Check2 = (IsDlgButtonChecked(hDlg,IDC_CHECKST2)==BST_CHECKED);
- Check3 = (IsDlgButtonChecked(hDlg,IDC_CHECKST3)==BST_CHECKED);
- Check4 = (IsDlgButtonChecked(hDlg,IDC_CHECKST4)==BST_CHECKED);
- Check5 = (IsDlgButtonChecked(hDlg,IDC_CHECKST5)==BST_CHECKED);
- Check6 = (IsDlgButtonChecked(hDlg,IDC_CHECKST6)==BST_CHECKED);
- Check7 = (IsDlgButtonChecked(hDlg,IDC_CHECKST7)==BST_CHECKED);
- Check8 = (IsDlgButtonChecked(hDlg,IDC_CHECKST8)==BST_CHECKED);
- Check9 = (IsDlgButtonChecked(hDlg,IDC_CHECKST9)==BST_CHECKED);
- WindowList_BroadcastAsync(YAMNVar.MessageWnds,WM_YAMN_CHANGESTATUSOPTION,0,0);
- EndDialog(hDlg,0);
- DestroyWindow(hDlg);
- break;
-
- case IDCANCEL:
- EndDialog(hDlg,0);
- DestroyWindow(hDlg);
- break;
-
- default:
- break;
- }
+ CheckDlgButton(hDlg,IDC_CHECKST0,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST1,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST2,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST3,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST4,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST5,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST6,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST7,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST8,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST9,BST_CHECKED);
}
- default:
+ TranslateDialogDefault(hDlg);
+ SendMessage(GetParent(hDlg),PSM_UNCHANGED,(WPARAM)hDlg,0);
+ return TRUE;
+
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDOK:
+ Check0 = (IsDlgButtonChecked(hDlg,IDC_CHECKST0)==BST_CHECKED);
+ Check1 = (IsDlgButtonChecked(hDlg,IDC_CHECKST1)==BST_CHECKED);
+ Check2 = (IsDlgButtonChecked(hDlg,IDC_CHECKST2)==BST_CHECKED);
+ Check3 = (IsDlgButtonChecked(hDlg,IDC_CHECKST3)==BST_CHECKED);
+ Check4 = (IsDlgButtonChecked(hDlg,IDC_CHECKST4)==BST_CHECKED);
+ Check5 = (IsDlgButtonChecked(hDlg,IDC_CHECKST5)==BST_CHECKED);
+ Check6 = (IsDlgButtonChecked(hDlg,IDC_CHECKST6)==BST_CHECKED);
+ Check7 = (IsDlgButtonChecked(hDlg,IDC_CHECKST7)==BST_CHECKED);
+ Check8 = (IsDlgButtonChecked(hDlg,IDC_CHECKST8)==BST_CHECKED);
+ Check9 = (IsDlgButtonChecked(hDlg,IDC_CHECKST9)==BST_CHECKED);
+ WindowList_BroadcastAsync(YAMNVar.MessageWnds,WM_YAMN_CHANGESTATUSOPTION,0,0);
+ EndDialog(hDlg,0);
+ DestroyWindow(hDlg);
break;
+
+ case IDCANCEL:
+ EndDialog(hDlg,0);
+ DestroyWindow(hDlg);
+ break;
+ }
}
return FALSE;
}
-
INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lParam)
{
BOOL Changed=FALSE;
@@ -1429,7 +1416,7 @@ INT_PTR CALLBACK DlgProcPOP3AccPopup(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPa case PSN_APPLY:
{
TCHAR Text[MAX_PATH];
- BOOL Translated,NewAcc=FALSE,CheckPopup,CheckPopupW;
+ BOOL Translated,CheckPopup,CheckPopupW;
BOOL CheckNPopup,CheckNPopupW,CheckFPopup,CheckFPopupW;
BOOL CheckPopN;
UINT Time,TimeN,TimeF;
|