diff options
author | George Hazan <george.hazan@gmail.com> | 2023-11-23 15:51:36 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-11-23 15:51:36 +0300 |
commit | 5ddd359f99bd383297f64cb1338c860ba66c80bb (patch) | |
tree | 4de6aef45c41414f6163cf1177429df59771cb25 | |
parent | b8fcbbd4a229485f217dde7d4fa641e8c708cdb7 (diff) |
code cleaning
-rw-r--r-- | protocols/NewsAggregator/Src/CheckFeed.cpp | 4 | ||||
-rw-r--r-- | protocols/NewsAggregator/Src/FeedEditor.cpp | 64 | ||||
-rw-r--r-- | protocols/NewsAggregator/Src/Menus.cpp | 29 | ||||
-rw-r--r-- | protocols/NewsAggregator/Src/NewsAggregator.cpp | 3 | ||||
-rw-r--r-- | protocols/NewsAggregator/Src/Options.cpp | 62 | ||||
-rw-r--r-- | protocols/NewsAggregator/Src/Services.cpp | 42 | ||||
-rw-r--r-- | protocols/NewsAggregator/Src/stdafx.h | 92 |
7 files changed, 151 insertions, 145 deletions
diff --git a/protocols/NewsAggregator/Src/CheckFeed.cpp b/protocols/NewsAggregator/Src/CheckFeed.cpp index e5a545ba6b..81413749b9 100644 --- a/protocols/NewsAggregator/Src/CheckFeed.cpp +++ b/protocols/NewsAggregator/Src/CheckFeed.cpp @@ -159,7 +159,7 @@ static void XmlToMsg(MCONTACT hContact, CMStringW &title, CMStringW &link, CMStr DBEVENTINFO olddbei = {}; bool MesExist = false; T2Utf pszTemp(message); - uint32_t cbMemoLen = 10000, cbOrigLen = (uint32_t)mir_strlen(pszTemp); + int cbMemoLen = 10000, cbOrigLen = (uint32_t)mir_strlen(pszTemp); uint8_t *pbBuffer = (uint8_t*)mir_alloc(cbMemoLen); DB::ECPTR pCursor(DB::EventsRev(hContact)); @@ -174,7 +174,7 @@ static void XmlToMsg(MCONTACT hContact, CMStringW &title, CMStringW &link, CMStr if (stamp > 0 && olddbei.timestamp < (uint32_t)stamp) break; - if ((uint32_t)mir_strlen((char*)olddbei.pBlob) == cbOrigLen && !mir_strcmp((char*)olddbei.pBlob, pszTemp)) { + if ((int)mir_strlen((char*)olddbei.pBlob) == cbOrigLen && !mir_strcmp((char*)olddbei.pBlob, pszTemp)) { MesExist = true; break; } diff --git a/protocols/NewsAggregator/Src/FeedEditor.cpp b/protocols/NewsAggregator/Src/FeedEditor.cpp index bcf6c3535f..74233edba6 100644 --- a/protocols/NewsAggregator/Src/FeedEditor.cpp +++ b/protocols/NewsAggregator/Src/FeedEditor.cpp @@ -17,7 +17,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "stdafx.h" -CFeedEditor::CFeedEditor(int iItem, CCtrlListView *m_feeds, MCONTACT Contact) : +static CDlgBase *pAddFeedDialog = nullptr; + +static LIST<class CFeedEditor> g_arFeeds(1, PtrKeySortT); + +///////////////////////////////////////////////////////////////////////////////////////// + +CFeedEditor::CFeedEditor(int iItem, CCtrlListView *feeds, MCONTACT Contact) : CSuper(g_plugin, IDD_ADDFEED), m_feedtitle(this, IDC_FEEDTITLE), m_feedurl(this, IDC_FEEDURL), m_checktime(this, IDC_CHECKTIME), m_checktimespin(this, IDC_TIMEOUT_VALUE_SPIN, 999), @@ -27,12 +33,15 @@ CFeedEditor::CFeedEditor(int iItem, CCtrlListView *m_feeds, MCONTACT Contact) : m_help(this, IDC_TAGHELP), m_iItem(iItem) { - m_list = m_feeds; + m_list = feeds; m_hContact = Contact; m_checkfeed.OnClick = Callback(this, &CFeedEditor::OnCheckFeed); m_useauth.OnChange = Callback(this, &CFeedEditor::OnUseAuth); m_reset.OnClick = Callback(this, &CFeedEditor::OnReset); m_help.OnClick = Callback(this, &CFeedEditor::OnHelp); + + if (feeds) + SetParent(feeds->GetParent()->GetHwnd()); } bool CFeedEditor::OnInitDialog() @@ -225,3 +234,54 @@ void CFeedEditor::OnUseAuth(CCtrlBase*) m_login.Enable(m_useauth.GetState()); m_password.Enable(m_useauth.GetState()); } + +///////////////////////////////////////////////////////////////////////////////////////// +// Module entry point + +INT_PTR AddFeed(WPARAM, LPARAM lParam) +{ + if (pAddFeedDialog == nullptr) { + pAddFeedDialog = new CFeedEditor(-1, (CCtrlListView *)lParam, NULL); + pAddFeedDialog->Show(); + } + else { + SetForegroundWindow(pAddFeedDialog->GetHwnd()); + SetFocus(pAddFeedDialog->GetHwnd()); + } + return 0; +} + +INT_PTR ChangeFeed(WPARAM hContact, LPARAM) +{ + CFeedEditor *pDlg = nullptr; + for (auto &it : g_arFeeds) + if (it->getContact() == hContact) + pDlg = it; + + if (pDlg == nullptr) { + pDlg = new CFeedEditor(-1, nullptr, hContact); + pDlg->Show(); + } + else { + SetForegroundWindow(pDlg->GetHwnd()); + SetFocus(pDlg->GetHwnd()); + } + return 0; +} + +CDlgBase* FindFeedEditor(const wchar_t *pwszNick, const wchar_t *pwszUrl) +{ + for (auto &it : g_arFeeds) { + ptrW dbNick(g_plugin.getWStringA(it->getContact(), "Nick")); + if (dbNick == nullptr || mir_wstrcmp(dbNick, pwszNick)) + continue; + + ptrW dbURL(g_plugin.getWStringA(it->getContact(), "URL")); + if (dbURL == nullptr || (mir_wstrcmp(dbURL, pwszUrl) != 0)) + continue; + + return it; + } + + return nullptr; +} diff --git a/protocols/NewsAggregator/Src/Menus.cpp b/protocols/NewsAggregator/Src/Menus.cpp index 16bd7163ef..d682415e4a 100644 --- a/protocols/NewsAggregator/Src/Menus.cpp +++ b/protocols/NewsAggregator/Src/Menus.cpp @@ -19,7 +19,7 @@ Boston, MA 02111-1307, USA. #include "stdafx.h" -HGENMENU hService2[7]; +HGENMENU hmiAutoUpdate; void InitMenu() { @@ -36,34 +36,34 @@ void InitMenu() mi.name.w = LPGENW("Auto Update Disabled"); mi.hIcolibItem = g_plugin.getIconHandle(IDI_ICON); mi.pszService = MS_NEWSAGGREGATOR_ENABLED; - hService2[0] = Menu_AddMainMenuItem(&mi); + hmiAutoUpdate = Menu_AddMainMenuItem(&mi); SET_UID(mi, 0x8076bb4d, 0x1e44, 0x43af, 0x97, 0x1e, 0x31, 0xd8, 0xa4, 0xe9, 0xb8, 0x37); mi.position = 20100001; mi.name.w = LPGENW("Check All Feeds"); mi.pszService = MS_NEWSAGGREGATOR_CHECKALLFEEDS; - hService2[1] = Menu_AddMainMenuItem(&mi); + Menu_AddMainMenuItem(&mi); SET_UID(mi, 0xb876484d, 0x28aa, 0x4e03, 0x9e, 0x98, 0xed, 0xbc, 0xd1, 0xcf, 0x31, 0x80); mi.position = 20100002; mi.hIcolibItem = g_plugin.getIconHandle(IDI_ADDFEED); mi.name.w = LPGENW("Add Feed"); mi.pszService = MS_NEWSAGGREGATOR_ADDFEED; - hService2[2] = Menu_AddMainMenuItem(&mi); + Menu_AddMainMenuItem(&mi); SET_UID(mi, 0x600bf2c2, 0xa974, 0x44d3, 0x98, 0xf9, 0xe6, 0x65, 0x7c, 0x1f, 0x63, 0x37); mi.position = 20100003; mi.hIcolibItem = g_plugin.getIconHandle(IDI_IMPORTFEEDS); mi.name.w = LPGENW("Import Feeds"); mi.pszService = MS_NEWSAGGREGATOR_IMPORTFEEDS; - hService2[3] = Menu_AddMainMenuItem(&mi); + Menu_AddMainMenuItem(&mi); SET_UID(mi, 0xc09c8119, 0x64c2, 0x49bd, 0x81, 0xf, 0x54, 0x20, 0x69, 0xd7, 0x30, 0xcf); mi.position = 20100004; mi.hIcolibItem = g_plugin.getIconHandle(IDI_EXPORTFEEDS); mi.name.w = LPGENW("Export Feeds"); mi.pszService = MS_NEWSAGGREGATOR_EXPORTFEEDS; - hService2[4] = Menu_AddMainMenuItem(&mi); + Menu_AddMainMenuItem(&mi); // adding contact menu items SET_UID(mi, 0x92be499c, 0x928c, 0x4789, 0x8f, 0x36, 0x28, 0xa2, 0x9f, 0xb7, 0x1a, 0x97); @@ -72,12 +72,23 @@ void InitMenu() mi.hIcolibItem = g_plugin.getIconHandle(IDI_CHECKFEED); mi.name.w = LPGENW("Check feed"); mi.pszService = MS_NEWSAGGREGATOR_CHECKFEED; - hService2[5] = Menu_AddContactMenuItem(&mi, MODULENAME); + Menu_AddContactMenuItem(&mi, MODULENAME); SET_UID(mi, 0x41a70fbc, 0x9241, 0x44c0, 0x90, 0x90, 0x87, 0xd2, 0xc5, 0x9f, 0xc9, 0xac); mi.name.w = LPGENW("Change feed"); mi.pszService = MS_NEWSAGGREGATOR_CHANGEFEED; - hService2[6] = Menu_AddContactMenuItem(&mi, MODULENAME); + Menu_AddContactMenuItem(&mi, MODULENAME); - Menu_ModifyItem(hService2[0], nullptr, g_plugin.getIconHandle(g_plugin.getByte("AutoUpdate", 1) ? IDI_ENABLED : IDI_DISABLED)); + Menu_ModifyItem(hmiAutoUpdate, nullptr, g_plugin.getIconHandle(g_plugin.getByte("AutoUpdate", 1) ? IDI_ENABLED : IDI_DISABLED)); +} + +void UpdateMenu(bool State) +{ + if (!State) // to enable auto-update + Menu_ModifyItem(hmiAutoUpdate, LPGENW("Auto Update Enabled"), g_plugin.getIconHandle(IDI_ENABLED)); + else // to disable auto-update + Menu_ModifyItem(hmiAutoUpdate, LPGENW("Auto Update Disabled"), g_plugin.getIconHandle(IDI_DISABLED)); + + CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTBButton, State ? TTBST_PUSHED : 0); + g_plugin.setByte("AutoUpdate", !State); } diff --git a/protocols/NewsAggregator/Src/NewsAggregator.cpp b/protocols/NewsAggregator/Src/NewsAggregator.cpp index e98bb66ae9..420cbd9ec6 100644 --- a/protocols/NewsAggregator/Src/NewsAggregator.cpp +++ b/protocols/NewsAggregator/Src/NewsAggregator.cpp @@ -20,12 +20,9 @@ Boston, MA 02111-1307, USA. #include "stdafx.h" HANDLE hPrebuildMenuHook = nullptr; -CDlgBase *pAddFeedDialog = nullptr; wchar_t tszRoot[MAX_PATH] = {0}; HANDLE hUpdateMutex; -LIST<CFeedEditor> g_arFeeds(1, PtrKeySortT); - CMPlugin g_plugin; ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/protocols/NewsAggregator/Src/Options.cpp b/protocols/NewsAggregator/Src/Options.cpp index 763f09dd9f..4caf6ce6eb 100644 --- a/protocols/NewsAggregator/Src/Options.cpp +++ b/protocols/NewsAggregator/Src/Options.cpp @@ -42,14 +42,14 @@ public: { CreateLink(m_checkonstartup, "StartupRetrieve", DBVT_BYTE, 1); - m_add.OnClick = Callback(this, &COptionsMain::OnAddButtonClick); - m_change.OnClick = Callback(this, &COptionsMain::OnChangeButtonClick); - m_delete.OnClick = Callback(this, &COptionsMain::OnDeleteButtonClick); - m_import.OnClick = Callback(this, &COptionsMain::OnImportButtonClick); - m_export.OnClick = Callback(this, &COptionsMain::OnExportButtonClick); - - m_feeds.OnItemChanged = Callback(this, &COptionsMain::OnFeedListItemChanged); - m_feeds.OnDoubleClick = Callback(this, &COptionsMain::OnFeedListDoubleClick); + m_add.OnClick = Callback(this, &COptionsMain::onClick_Add); + m_change.OnClick = Callback(this, &COptionsMain::onClick_Change); + m_delete.OnClick = Callback(this, &COptionsMain::onClick_Delete); + m_import.OnClick = Callback(this, &COptionsMain::onClick_Import); + m_export.OnClick = Callback(this, &COptionsMain::onClick_Export); + + m_feeds.OnItemChanged = Callback(this, &COptionsMain::ontItemChanged_Feeds); + m_feeds.OnDoubleClick = Callback(this, &COptionsMain::onDoubleClick_Feeds); } bool OnInitDialog() override @@ -83,42 +83,21 @@ public: return true; } - void OnAddButtonClick(CCtrlBase *) + void onClick_Add(CCtrlBase *) { - if (pAddFeedDialog == nullptr) { - pAddFeedDialog = new CFeedEditor(-1, &m_feeds, NULL); - pAddFeedDialog->SetParent(m_hwnd); - pAddFeedDialog->Show(); - } - else { - SetForegroundWindow(pAddFeedDialog->GetHwnd()); - SetFocus(pAddFeedDialog->GetHwnd()); - } + AddFeed(0, LPARAM(&m_feeds)); } - void OnChangeButtonClick(CCtrlBase *) + void onClick_Change(CCtrlBase *) { int isel = m_feeds.GetSelectionMark(); - CFeedEditor *pDlg = nullptr; - for (auto &it : g_arFeeds) { - wchar_t nick[MAX_PATH], url[MAX_PATH]; - m_feeds.GetItemText(isel, 0, nick, _countof(nick)); - m_feeds.GetItemText(isel, 1, url, _countof(url)); - - ptrW dbNick(g_plugin.getWStringA(it->getContact(), "Nick")); - if ((dbNick == NULL) || (mir_wstrcmp(dbNick, nick) != 0)) - continue; - - ptrW dbURL(g_plugin.getWStringA(it->getContact(), "URL")); - if ((dbURL == NULL) || (mir_wstrcmp(dbURL, url) != 0)) - continue; - - pDlg = it; - } + wchar_t nick[MAX_PATH], url[MAX_PATH]; + m_feeds.GetItemText(isel, 0, nick, _countof(nick)); + m_feeds.GetItemText(isel, 1, url, _countof(url)); + auto *pDlg = FindFeedEditor(nick, url); if (pDlg == nullptr) { pDlg = new CFeedEditor(isel, &m_feeds, NULL); - pDlg->SetParent(m_hwnd); pDlg->Show(); } else { @@ -127,7 +106,7 @@ public: } } - void OnDeleteButtonClick(CCtrlBase *) + void onClick_Delete(CCtrlBase *) { if (MessageBox(m_hwnd, TranslateT("Are you sure?"), TranslateT("Contact deleting"), MB_YESNO | MB_ICONWARNING) == IDYES) { wchar_t nick[MAX_PATH], url[MAX_PATH]; @@ -155,17 +134,17 @@ public: } } - void OnImportButtonClick(CCtrlBase *) + void onClick_Import(CCtrlBase *) { ImportFeeds(WPARAM(m_hwnd), 0); } - void OnExportButtonClick(CCtrlBase *) + void onClick_Export(CCtrlBase *) { ExportFeeds(WPARAM(m_hwnd), 0); } - void OnFeedListItemChanged(CCtrlListView::TEventInfo *evt) + void ontItemChanged_Feeds(CCtrlListView::TEventInfo *evt) { int isel = m_feeds.GetSelectionMark(); if (isel == -1) { @@ -180,12 +159,11 @@ public: NotifyChange(); } - void OnFeedListDoubleClick(CCtrlBase *) + void onDoubleClick_Feeds(CCtrlBase *) { int isel = m_feeds.GetHotItem(); if (isel != -1) { CFeedEditor *pDlg = new CFeedEditor(isel, &m_feeds, 0); - pDlg->SetParent(m_hwnd); pDlg->Show(); } } diff --git a/protocols/NewsAggregator/Src/Services.cpp b/protocols/NewsAggregator/Src/Services.cpp index 138f334005..aa1005d285 100644 --- a/protocols/NewsAggregator/Src/Services.cpp +++ b/protocols/NewsAggregator/Src/Services.cpp @@ -138,37 +138,6 @@ INT_PTR CheckAllFeeds(WPARAM, LPARAM lParam) return 0; } -INT_PTR AddFeed(WPARAM, LPARAM) -{ - if (pAddFeedDialog == nullptr) { - pAddFeedDialog = new CFeedEditor(-1, nullptr, NULL); - pAddFeedDialog->Show(); - } - else { - SetForegroundWindow(pAddFeedDialog->GetHwnd()); - SetFocus(pAddFeedDialog->GetHwnd()); - } - return 0; -} - -INT_PTR ChangeFeed(WPARAM hContact, LPARAM) -{ - CFeedEditor *pDlg = nullptr; - for (auto &it : g_arFeeds) - if (it->getContact() == hContact) - pDlg = it; - - if (pDlg == nullptr) { - pDlg = new CFeedEditor(-1, nullptr, (MCONTACT)hContact); - pDlg->Show(); - } - else { - SetForegroundWindow(pDlg->GetHwnd()); - SetFocus(pDlg->GetHwnd()); - } - return 0; -} - INT_PTR CheckFeed(WPARAM hContact, LPARAM) { if(IsMyContact((MCONTACT)hContact)) @@ -206,17 +175,6 @@ INT_PTR NewsAggrRecvMessage(WPARAM, LPARAM lParam) return 0; } -void UpdateMenu(bool State) -{ - if (!State) // to enable auto-update - Menu_ModifyItem(hService2[0], LPGENW("Auto Update Enabled"), g_plugin.getIconHandle(IDI_ENABLED)); - else // to disable auto-update - Menu_ModifyItem(hService2[0], LPGENW("Auto Update Disabled"), g_plugin.getIconHandle(IDI_DISABLED)); - - CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTBButton, State ? TTBST_PUSHED : 0); - g_plugin.setByte("AutoUpdate", !State); -} - // update the newsaggregator auto-update menu item when click on it INT_PTR EnableDisable(WPARAM, LPARAM) { diff --git a/protocols/NewsAggregator/Src/stdafx.h b/protocols/NewsAggregator/Src/stdafx.h index 5432743fc8..388f83ade2 100644 --- a/protocols/NewsAggregator/Src/stdafx.h +++ b/protocols/NewsAggregator/Src/stdafx.h @@ -58,10 +58,10 @@ Boston, MA 02111-1307, USA. #define DEFAULT_AVATARS_FOLDER "NewsAggregator" #define DEFAULT_UPDATE_TIME 60 -extern CDlgBase *pAddFeedDialog; extern HNETLIBUSER hNetlibUser; +extern HANDLE hTBButton; extern UINT_PTR timerId; -extern LIST<CFeedEditor> g_arFeeds; + // check if Feeds is currently updating extern bool ThreadRunning; extern bool UpdateListFlag; @@ -91,49 +91,51 @@ void UpdateListAdd(MCONTACT hContact); void UpdateThreadProc(void*); void DestroyUpdateList(void); -extern HANDLE hUpdateMutex; -extern HGENMENU hService2[7]; - -int NewsAggrInit(WPARAM wParam,LPARAM lParam); -int OptInit(WPARAM wParam, LPARAM lParam); -int NewsAggrPreShutdown(WPARAM wParam,LPARAM lParam); -void NetlibInit(); -void NetlibUnInit(); -void InitMenu(); -void InitIcons(); - -INT_PTR NewsAggrGetName(WPARAM wParam, LPARAM lParam); -INT_PTR NewsAggrGetCaps(WPARAM wp, LPARAM lp); -INT_PTR NewsAggrSetStatus(WPARAM wp, LPARAM /*lp*/); -INT_PTR NewsAggrGetStatus(WPARAM/* wp*/, LPARAM/* lp*/); -INT_PTR NewsAggrLoadIcon(WPARAM wParam, LPARAM lParam); -INT_PTR NewsAggrGetInfo(WPARAM wParam, LPARAM lParam); -INT_PTR NewsAggrGetAvatarInfo(WPARAM wParam, LPARAM lParam); -INT_PTR NewsAggrRecvMessage(WPARAM wParam, LPARAM lParam); - -INT_PTR CheckAllFeeds(WPARAM wParam, LPARAM lParam); -INT_PTR AddFeed(WPARAM wParam, LPARAM lParam); -INT_PTR ChangeFeed(WPARAM wParam, LPARAM lParam); -INT_PTR ImportFeeds(WPARAM wParam, LPARAM lParam); -INT_PTR ExportFeeds(WPARAM wParam, LPARAM lParam); -INT_PTR CheckFeed(WPARAM wParam, LPARAM lParam); -INT_PTR EnableDisable(WPARAM wParam, LPARAM lParam); -int OnToolbarLoaded(WPARAM wParam, LPARAM lParam); -void CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime); -void CALLBACK timerProc2(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime); - -bool IsMyContact(MCONTACT hContact); -void GetNewsData(wchar_t *szUrl, char **szData, MCONTACT hContact, CFeedEditor *pEditDlg); -time_t DateToUnixTime(const char *stamp, bool FeedType); -void CheckCurrentFeed(MCONTACT hContact); -void CheckCurrentFeedAvatar(MCONTACT hContact); -LPCTSTR CheckFeed(wchar_t* tszURL, CFeedEditor *pEditDlg); -void UpdateMenu(bool State); -LPCTSTR ClearText(CMStringW &value, const wchar_t *message); -bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal); -void CreateAuthString(char *auth, MCONTACT hContact, CFeedEditor *pDlg); -MCONTACT GetContactByNick(const wchar_t *nick); -MCONTACT GetContactByURL(const wchar_t *url); +extern HANDLE hUpdateMutex; + +int NewsAggrInit(WPARAM wParam,LPARAM lParam); +int OptInit(WPARAM wParam, LPARAM lParam); +int NewsAggrPreShutdown(WPARAM wParam,LPARAM lParam); +void NetlibInit(); +void NetlibUnInit(); +void InitMenu(); +void InitIcons(); + +INT_PTR NewsAggrGetName(WPARAM wParam, LPARAM lParam); +INT_PTR NewsAggrGetCaps(WPARAM wp, LPARAM lp); +INT_PTR NewsAggrSetStatus(WPARAM wp, LPARAM /*lp*/); +INT_PTR NewsAggrGetStatus(WPARAM/* wp*/, LPARAM/* lp*/); +INT_PTR NewsAggrLoadIcon(WPARAM wParam, LPARAM lParam); +INT_PTR NewsAggrGetInfo(WPARAM wParam, LPARAM lParam); +INT_PTR NewsAggrGetAvatarInfo(WPARAM wParam, LPARAM lParam); +INT_PTR NewsAggrRecvMessage(WPARAM wParam, LPARAM lParam); + +INT_PTR CheckAllFeeds(WPARAM wParam, LPARAM lParam); +INT_PTR AddFeed(WPARAM wParam, LPARAM lParam); +INT_PTR ChangeFeed(WPARAM wParam, LPARAM lParam); +INT_PTR ImportFeeds(WPARAM wParam, LPARAM lParam); +INT_PTR ExportFeeds(WPARAM wParam, LPARAM lParam); +INT_PTR CheckFeed(WPARAM wParam, LPARAM lParam); +INT_PTR EnableDisable(WPARAM wParam, LPARAM lParam); +int OnToolbarLoaded(WPARAM wParam, LPARAM lParam); +CDlgBase* FindFeedEditor(const wchar_t *pwszNick, const wchar_t *pwszUrl); + +bool IsMyContact(MCONTACT hContact); +void GetNewsData(wchar_t *szUrl, char **szData, MCONTACT hContact, CFeedEditor *pEditDlg); +time_t DateToUnixTime(const char *stamp, bool FeedType); +void CheckCurrentFeed(MCONTACT hContact); +void CheckCurrentFeedAvatar(MCONTACT hContact); +LPCTSTR CheckFeed(wchar_t* tszURL, CFeedEditor *pEditDlg); +void UpdateMenu(bool State); +LPCTSTR ClearText(CMStringW &value, const wchar_t *message); +bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal); +void CreateAuthString(char *auth, MCONTACT hContact, CFeedEditor *pDlg); +MCONTACT GetContactByNick(const wchar_t *nick); +MCONTACT GetContactByURL(const wchar_t *url); + +void CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime); +void CALLBACK timerProc2(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime); + // =============== NewsAggregator SERVICES ================ // Check all Feeds info |