diff --git a/base/applications/rapps/CMakeLists.txt b/base/applications/rapps/CMakeLists.txt index 0e22cea8134..5f3bbcc3cca 100644 --- a/base/applications/rapps/CMakeLists.txt +++ b/base/applications/rapps/CMakeLists.txt @@ -5,8 +5,8 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils) include_directories(include) list(APPEND SOURCE - applicationdb.cpp - applicationinfo.cpp + appdb.cpp + appinfo.cpp appview.cpp asyncinet.cpp cabinet.cpp @@ -19,8 +19,8 @@ list(APPEND SOURCE settingsdlg.cpp unattended.cpp winmain.cpp - include/applicationdb.h - include/applicationinfo.h + include/appdb.h + include/appinfo.h include/appview.h include/asyncinet.h include/configparser.h diff --git a/base/applications/rapps/applicationdb.cpp b/base/applications/rapps/appdb.cpp similarity index 87% rename from base/applications/rapps/applicationdb.cpp rename to base/applications/rapps/appdb.cpp index f1044c57ba8..b6fb33214ac 100644 --- a/base/applications/rapps/applicationdb.cpp +++ b/base/applications/rapps/appdb.cpp @@ -2,13 +2,13 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) * PURPOSE: Classes for working with available applications - * COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) - * Copyright 2020 He Yang (1160386205@qq.com) + * COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) + * Copyright 2020 He Yang (1160386205@qq.com) * Copyright 2021-2023 Mark Jansen */ #include "rapps.h" -#include "applicationdb.h" +#include "appdb.h" #include "configparser.h" #include "settings.h" @@ -18,29 +18,29 @@ static REGSAM g_RegSamEnum[3] = {KEY_WOW64_32KEY, KEY_WOW64_32KEY, KEY_WOW64_64K #define UNINSTALL_SUBKEY L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall" static VOID -ClearList(CAtlList &list) +ClearList(CAtlList &list) { POSITION InfoListPosition = list.GetHeadPosition(); while (InfoListPosition) { - CApplicationInfo *Info = list.GetNext(InfoListPosition); + CAppInfo *Info = list.GetNext(InfoListPosition); delete Info; } list.RemoveAll(); } -CApplicationDB::CApplicationDB(const CStringW &path) : m_BasePath(path) +CAppDB::CAppDB(const CStringW &path) : m_BasePath(path) { m_BasePath.Canonicalize(); } -CApplicationInfo * -CApplicationDB::FindByPackageName(const CStringW &name) +CAppInfo * +CAppDB::FindByPackageName(const CStringW &name) { POSITION CurrentListPosition = m_Available.GetHeadPosition(); while (CurrentListPosition) { - CApplicationInfo *Info = m_Available.GetNext(CurrentListPosition); + CAppInfo *Info = m_Available.GetNext(CurrentListPosition); if (Info->szIdentifier == name) { return Info; @@ -50,16 +50,16 @@ CApplicationDB::FindByPackageName(const CStringW &name) } void -CApplicationDB::GetApps(CAtlList &List, AppsCategories Type) const +CAppDB::GetApps(CAtlList &List, AppsCategories Type) const { const BOOL UseInstalled = IsInstalledEnum(Type); - const CAtlList &list = UseInstalled ? m_Installed : m_Available; + const CAtlList &list = UseInstalled ? m_Installed : m_Available; const BOOL IncludeAll = UseInstalled ? (Type == ENUM_ALL_INSTALLED) : (Type == ENUM_ALL_AVAILABLE); POSITION CurrentListPosition = list.GetHeadPosition(); while (CurrentListPosition) { - CApplicationInfo *Info = list.GetNext(CurrentListPosition); + CAppInfo *Info = list.GetNext(CurrentListPosition); if (IncludeAll || Type == Info->iCategory) { @@ -69,7 +69,7 @@ CApplicationDB::GetApps(CAtlList &List, AppsCategories Type) } BOOL -CApplicationDB::EnumerateFiles() +CAppDB::EnumerateFiles() { ClearList(m_Available); @@ -91,7 +91,7 @@ CApplicationDB::EnumerateFiles() PathRemoveExtensionW(szPkgName.GetBuffer(MAX_PATH)); szPkgName.ReleaseBuffer(); - CApplicationInfo *Info = FindByPackageName(szPkgName); + CAppInfo *Info = FindByPackageName(szPkgName); ATLASSERT(Info == NULL); if (!Info) { @@ -118,7 +118,7 @@ CApplicationDB::EnumerateFiles() } VOID -CApplicationDB::UpdateAvailable() +CAppDB::UpdateAvailable() { if (!CreateDirectoryW(m_BasePath, NULL) && GetLastError() != ERROR_ALREADY_EXISTS) return; @@ -142,7 +142,7 @@ CApplicationDB::UpdateAvailable() } VOID -CApplicationDB::UpdateInstalled() +CAppDB::UpdateInstalled() { // Remove all old entries ClearList(m_Installed); @@ -239,7 +239,7 @@ DeleteWithWildcard(const CPathW &Dir, const CStringW &Filter) } VOID -CApplicationDB::RemoveCached() +CAppDB::RemoveCached() { // Delete icons CPathW AppsPath = m_BasePath; @@ -263,7 +263,7 @@ CApplicationDB::RemoveCached() } BOOL -CApplicationDB::RemoveInstalledAppFromRegistry(const CApplicationInfo *Info) +CAppDB::RemoveInstalledAppFromRegistry(const CAppInfo *Info) { // Validate that this is actually an installed app / update ATLASSERT(Info->iCategory == ENUM_INSTALLED_APPLICATIONS || Info->iCategory == ENUM_UPDATES); diff --git a/base/applications/rapps/applicationinfo.cpp b/base/applications/rapps/appinfo.cpp similarity index 97% rename from base/applications/rapps/applicationinfo.cpp rename to base/applications/rapps/appinfo.cpp index 942668e05de..765f02016bb 100644 --- a/base/applications/rapps/applicationinfo.cpp +++ b/base/applications/rapps/appinfo.cpp @@ -2,20 +2,20 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) * PURPOSE: Classes for working with available applications - * COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) - * Copyright 2020 He Yang (1160386205@qq.com) + * COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) + * Copyright 2020 He Yang (1160386205@qq.com) * Copyright 2021-2023 Mark Jansen */ #include "rapps.h" #include "appview.h" -CApplicationInfo::CApplicationInfo(const CStringW &Identifier, AppsCategories Category) +CAppInfo::CAppInfo(const CStringW &Identifier, AppsCategories Category) : szIdentifier(Identifier), iCategory(Category) { } -CApplicationInfo::~CApplicationInfo() +CAppInfo::~CAppInfo() { } @@ -24,7 +24,7 @@ CAvailableApplicationInfo::CAvailableApplicationInfo( const CStringW &PkgName, AppsCategories Category, const CPathW &BasePath) - : CApplicationInfo(PkgName, Category), m_Parser(Parser), m_ScrnshotRetrieved(false), m_LanguagesLoaded(false) + : CAppInfo(PkgName, Category), m_Parser(Parser), m_ScrnshotRetrieved(false), m_LanguagesLoaded(false) { m_Parser->GetString(L"Name", szDisplayName); m_Parser->GetString(L"Version", szDisplayVersion); @@ -369,7 +369,7 @@ CInstalledApplicationInfo::CInstalledApplicationInfo( const CStringW &KeyName, AppsCategories Category, int KeyIndex) - : CApplicationInfo(KeyName, Category), m_hKey(Key), iKeyIndex(KeyIndex) + : CAppInfo(KeyName, Category), m_hKey(Key), iKeyIndex(KeyIndex) { if (GetApplicationRegString(L"DisplayName", szDisplayName)) { diff --git a/base/applications/rapps/appview.cpp b/base/applications/rapps/appview.cpp index 5c1c548b6a6..3157f7634e2 100644 --- a/base/applications/rapps/appview.cpp +++ b/base/applications/rapps/appview.cpp @@ -914,7 +914,7 @@ CAppInfoDisplay::Create(HWND hwndParent) } VOID -CAppInfoDisplay::ShowAppInfo(CApplicationInfo *Info) +CAppInfoDisplay::ShowAppInfo(CAppInfo *Info) { CStringW ScrnshotLocation; if (Info->RetrieveScreenshot(ScrnshotLocation)) @@ -1280,7 +1280,7 @@ CAppsListView::SetViewMode(DWORD ViewMode) } BOOL -CAppsListView::AddApplication(CApplicationInfo *AppInfo, BOOL InitialCheckState) +CAppsListView::AddApplication(CAppInfo *AppInfo, BOOL InitialCheckState) { if (ApplicationViewType == AppViewTypeInstalledApps) { @@ -1474,7 +1474,7 @@ CApplicationView::ProcessWindowMessage( if (ApplicationViewType == AppViewTypeAvailableApps) { m_MainWindow->InstallApplication( - (CApplicationInfo *)m_ListView->GetItemData(Item->iItem)); + (CAppInfo *)m_ListView->GetItemData(Item->iItem)); } } } @@ -1851,7 +1851,7 @@ CApplicationView::SetDisplayAppType(APPLICATION_VIEW_TYPE AppType) } BOOL -CApplicationView::AddApplication(CApplicationInfo *AppInfo, BOOL InitialCheckState) +CApplicationView::AddApplication(CAppInfo *AppInfo, BOOL InitialCheckState) { return m_ListView->AddApplication(AppInfo, InitialCheckState); } @@ -1897,7 +1897,7 @@ CApplicationView::ItemGetFocus(LPVOID CallbackParam) { if (CallbackParam) { - CApplicationInfo *Info = static_cast(CallbackParam); + CAppInfo *Info = static_cast(CallbackParam); m_AppsInfo->ShowAppInfo(Info); if (ApplicationViewType == AppViewTypeInstalledApps) diff --git a/base/applications/rapps/asyncinet.cpp b/base/applications/rapps/asyncinet.cpp index 08be4839c77..f254c0ff944 100644 --- a/base/applications/rapps/asyncinet.cpp +++ b/base/applications/rapps/asyncinet.cpp @@ -2,7 +2,7 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) * PURPOSE: Async Internet operation using WinINet - * COPYRIGHT: Copyright 2020 He Yang (1160386205@qq.com) + * COPYRIGHT: Copyright 2020 He Yang (1160386205@qq.com) */ #include "rapps.h" diff --git a/base/applications/rapps/cabinet.cpp b/base/applications/rapps/cabinet.cpp index 609f28faf5b..a86ad8cecc2 100644 --- a/base/applications/rapps/cabinet.cpp +++ b/base/applications/rapps/cabinet.cpp @@ -2,7 +2,7 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) * PURPOSE: Cabinet extraction using FDI API - * COPYRIGHT: Copyright 2018 Alexander Shaposhnikov (sanchaez@reactos.org) + * COPYRIGHT: Copyright 2018 Alexander Shaposhnikov (sanchaez@reactos.org) */ #include "rapps.h" #include diff --git a/base/applications/rapps/gui.cpp b/base/applications/rapps/gui.cpp index d457cf148e9..43c641f9e0a 100644 --- a/base/applications/rapps/gui.cpp +++ b/base/applications/rapps/gui.cpp @@ -2,9 +2,9 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) * PURPOSE: GUI classes for RAPPS - * COPYRIGHT: Copyright 2015 David Quintana (gigaherz@gmail.com) - * Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) - * Copyright 2020 He Yang (1160386205@qq.com) + * COPYRIGHT: Copyright 2015 David Quintana (gigaherz@gmail.com) + * Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) + * Copyright 2020 He Yang (1160386205@qq.com) */ #include "rapps.h" @@ -86,7 +86,7 @@ CSideTreeView::~CSideTreeView() // **** CMainWindow **** -CMainWindow::CMainWindow(CApplicationDB *db) : m_ClientPanel(NULL), m_Db(db), SelectedEnumType(ENUM_ALL_INSTALLED) +CMainWindow::CMainWindow(CAppDB *db) : m_ClientPanel(NULL), m_Db(db), SelectedEnumType(ENUM_ALL_INSTALLED) { } @@ -276,7 +276,7 @@ CMainWindow::RemoveSelectedAppFromRegistry() if (MessageBoxW(szMsgText, szMsgTitle, MB_YESNO | MB_ICONQUESTION) == IDYES) { - CApplicationInfo *InstalledApp = (CApplicationInfo *)m_ApplicationView->GetFocusedItemData(); + CAppInfo *InstalledApp = (CAppInfo *)m_ApplicationView->GetFocusedItemData(); if (!InstalledApp) return FALSE; @@ -292,7 +292,7 @@ CMainWindow::UninstallSelectedApp(BOOL bModify) if (!IsInstalledEnum(SelectedEnumType)) return FALSE; - CApplicationInfo *InstalledApp = (CApplicationInfo *)m_ApplicationView->GetFocusedItemData(); + CAppInfo *InstalledApp = (CAppInfo *)m_ApplicationView->GetFocusedItemData(); if (!InstalledApp) return FALSE; @@ -517,7 +517,7 @@ CMainWindow::OnCommand(WPARAM wParam, LPARAM lParam) } else { - CApplicationInfo *App = (CApplicationInfo *)m_ApplicationView->GetFocusedItemData(); + CAppInfo *App = (CAppInfo *)m_ApplicationView->GetFocusedItemData(); if (App) { InstallApplication(App); @@ -578,12 +578,12 @@ CMainWindow::UpdateStatusBarText() } VOID -CMainWindow::AddApplicationsToView(CAtlList &List) +CMainWindow::AddApplicationsToView(CAtlList &List) { POSITION CurrentListPosition = List.GetHeadPosition(); while (CurrentListPosition) { - CApplicationInfo *Info = List.GetNext(CurrentListPosition); + CAppInfo *Info = List.GetNext(CurrentListPosition); if (szSearchPattern.IsEmpty() || SearchPatternMatch(Info->szDisplayName, szSearchPattern) || SearchPatternMatch(Info->szComments, szSearchPattern)) { @@ -613,7 +613,7 @@ CMainWindow::UpdateApplicationsList(AppsCategories EnumType, BOOL bReload) // set the display type of application-view. this will remove all the item in application-view too. m_ApplicationView->SetDisplayAppType(AppViewTypeInstalledApps); - CAtlList List; + CAtlList List; m_Db->GetApps(List, EnumType); AddApplicationsToView(List); } @@ -632,7 +632,7 @@ CMainWindow::UpdateApplicationsList(AppsCategories EnumType, BOOL bReload) } else { - CAtlList List; + CAtlList List; m_Db->GetApps(List, EnumType); AddApplicationsToView(List); } @@ -697,7 +697,7 @@ CMainWindow::ItemCheckStateChanged(BOOL bChecked, LPVOID CallbackParam) if (bUpdating) return; - CApplicationInfo *Info = (CApplicationInfo *)CallbackParam; + CAppInfo *Info = (CAppInfo *)CallbackParam; if (bChecked) { @@ -720,7 +720,7 @@ CMainWindow::ItemCheckStateChanged(BOOL bChecked, LPVOID CallbackParam) // this function is called when one or more application(s) should be installed // if Info is not zero, this app should be installed. otherwise those checked apps should be installed BOOL -CMainWindow::InstallApplication(CApplicationInfo *Info) +CMainWindow::InstallApplication(CAppInfo *Info) { if (Info) { @@ -785,7 +785,7 @@ CMainWindow::HandleTabOrder(int direction) // **** CMainWindow **** VOID -MainWindowLoop(CApplicationDB *db, INT nShowCmd) +MainWindowLoop(CAppDB *db, INT nShowCmd) { HACCEL KeyBrd; MSG Msg; diff --git a/base/applications/rapps/include/appdb.h b/base/applications/rapps/include/appdb.h new file mode 100644 index 00000000000..4e9c5386b3b --- /dev/null +++ b/base/applications/rapps/include/appdb.h @@ -0,0 +1,35 @@ +#pragma once + +#include +#include + +#include "appinfo.h" + +class CAppDB +{ + private: + CPathW m_BasePath; + CAtlList m_Available; + CAtlList m_Installed; + + BOOL + EnumerateFiles(); + + public: + CAppDB(const CStringW &path); + + VOID + GetApps(CAtlList &List, AppsCategories Type) const; + CAppInfo * + FindByPackageName(const CStringW &name); + + VOID + UpdateAvailable(); + VOID + UpdateInstalled(); + VOID + RemoveCached(); + + BOOL + RemoveInstalledAppFromRegistry(const CAppInfo *Info); +}; diff --git a/base/applications/rapps/include/applicationinfo.h b/base/applications/rapps/include/appinfo.h similarity index 94% rename from base/applications/rapps/include/applicationinfo.h rename to base/applications/rapps/include/appinfo.h index fb152d26bba..7ea0c65e537 100644 --- a/base/applications/rapps/include/applicationinfo.h +++ b/base/applications/rapps/include/appinfo.h @@ -65,11 +65,11 @@ IsInstalledEnum(INT x) class CAppRichEdit; -class CApplicationInfo +class CAppInfo { public: - CApplicationInfo(const CStringW &Identifier, AppsCategories Category); - virtual ~CApplicationInfo(); + CAppInfo(const CStringW &Identifier, AppsCategories Category); + virtual ~CAppInfo(); const CStringW szIdentifier; // PkgName or KeyName const AppsCategories iCategory; @@ -97,7 +97,7 @@ class CApplicationInfo UninstallApplication(BOOL bModify) = 0; }; -class CAvailableApplicationInfo : public CApplicationInfo +class CAvailableApplicationInfo : public CAppInfo { class CConfigParser *m_Parser; CSimpleArray m_szScrnshotLocation; @@ -143,7 +143,7 @@ class CAvailableApplicationInfo : public CApplicationInfo UninstallApplication(BOOL bModify) override; }; -class CInstalledApplicationInfo : public CApplicationInfo +class CInstalledApplicationInfo : public CAppInfo { CRegKey m_hKey; CStringW m_szInstallDate; diff --git a/base/applications/rapps/include/applicationdb.h b/base/applications/rapps/include/applicationdb.h deleted file mode 100644 index c63b1698c05..00000000000 --- a/base/applications/rapps/include/applicationdb.h +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once - -#include -#include - -#include "applicationinfo.h" - -class CApplicationDB -{ - private: - CPathW m_BasePath; - CAtlList m_Available; - CAtlList m_Installed; - - BOOL - EnumerateFiles(); - - public: - CApplicationDB(const CStringW &path); - - VOID - GetApps(CAtlList &List, AppsCategories Type) const; - CApplicationInfo * - FindByPackageName(const CStringW &name); - - VOID - UpdateAvailable(); - VOID - UpdateInstalled(); - VOID - RemoveCached(); - - BOOL - RemoveInstalledAppFromRegistry(const CApplicationInfo *Info); -}; diff --git a/base/applications/rapps/include/appview.h b/base/applications/rapps/include/appview.h index fcf18a9d905..b563f2966e2 100644 --- a/base/applications/rapps/include/appview.h +++ b/base/applications/rapps/include/appview.h @@ -177,7 +177,7 @@ class CAppInfoDisplay : public CUiWindow> Create(HWND hwndParent); VOID - ShowAppInfo(CApplicationInfo *Info); + ShowAppInfo(CAppInfo *Info); VOID SetWelcomeText(); VOID @@ -263,7 +263,7 @@ class CAppsListView : public CUiWindow> SetViewMode(DWORD ViewMode); BOOL - AddApplication(CApplicationInfo *AppInfo, BOOL InitialCheckState); + AddApplication(CAppInfo *AppInfo, BOOL InitialCheckState); // this function is called when parent window receiving an notification about checkstate changing VOID @@ -397,7 +397,7 @@ class CApplicationView : public CUiWindow> SetDisplayAppType(APPLICATION_VIEW_TYPE AppType); BOOL - AddApplication(CApplicationInfo *InstAppInfo, BOOL InitialCheckState); + AddApplication(CAppInfo *InstAppInfo, BOOL InitialCheckState); VOID SetWatermark(const CStringW &Text); diff --git a/base/applications/rapps/include/dialogs.h b/base/applications/rapps/include/dialogs.h index 0301dbb7393..ee49f287d82 100644 --- a/base/applications/rapps/include/dialogs.h +++ b/base/applications/rapps/include/dialogs.h @@ -1,6 +1,6 @@ #pragma once -#include "applicationinfo.h" +#include "appinfo.h" #include #include @@ -11,12 +11,12 @@ CreateSettingsDlg(HWND hwnd); // Main window VOID -MainWindowLoop(class CApplicationDB *db, INT nShowCmd); +MainWindowLoop(class CAppDB *db, INT nShowCmd); // Download dialogs VOID DownloadApplicationsDB(LPCWSTR lpUrl, BOOL IsOfficial); BOOL -DownloadApplication(CApplicationInfo *pAppInfo); +DownloadApplication(CAppInfo *pAppInfo); BOOL -DownloadListOfApplications(const CAtlList &AppsList, BOOL bIsModal); +DownloadListOfApplications(const CAtlList &AppsList, BOOL bIsModal); diff --git a/base/applications/rapps/include/gui.h b/base/applications/rapps/include/gui.h index 48befeaf9f9..330f1118dac 100644 --- a/base/applications/rapps/include/gui.h +++ b/base/applications/rapps/include/gui.h @@ -54,8 +54,8 @@ class CMainWindow : public CWindowImpl CApplicationView *m_ApplicationView = NULL; - CApplicationDB *m_Db; - CAtlList m_Selected; + CAppDB *m_Db; + CAtlList m_Selected; BOOL bUpdating = FALSE; @@ -63,7 +63,7 @@ class CMainWindow : public CWindowImpl AppsCategories SelectedEnumType; public: - CMainWindow(CApplicationDB *db); + CMainWindow(CAppDB *db); ~CMainWindow(); @@ -106,7 +106,7 @@ class CMainWindow : public CWindowImpl VOID UpdateApplicationsList(AppsCategories EnumType, BOOL bReload = FALSE); VOID - AddApplicationsToView(CAtlList &List); + AddApplicationsToView(CAtlList &List); public: static ATL::CWndClassInfo & @@ -123,7 +123,7 @@ class CMainWindow : public CWindowImpl // this function is called when application-view is asked to install an application // if Info is not zero, this app should be installed. otherwise those checked apps should be installed BOOL - InstallApplication(CApplicationInfo *Info); + InstallApplication(CAppInfo *Info); // this function is called when search text is changed BOOL diff --git a/base/applications/rapps/include/rapps.h b/base/applications/rapps/include/rapps.h index 3a72072cadc..02cb22182ae 100644 --- a/base/applications/rapps/include/rapps.h +++ b/base/applications/rapps/include/rapps.h @@ -8,8 +8,8 @@ #include "defines.h" #include "dialogs.h" -#include "applicationinfo.h" -#include "applicationdb.h" +#include "appinfo.h" +#include "appdb.h" #include "misc.h" #include "configparser.h" diff --git a/base/applications/rapps/include/rosui.h b/base/applications/rapps/include/rosui.h index a68100a6118..48fb9a243a4 100644 --- a/base/applications/rapps/include/rosui.h +++ b/base/applications/rapps/include/rosui.h @@ -3,7 +3,7 @@ * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) * FILE: base/applications/rapps/include/rosui.h * PURPOSE: ATL Layout engine for RAPPS - * COPYRIGHT: Copyright 2015 David Quintana (gigaherz@gmail.com) + * COPYRIGHT: Copyright 2015 David Quintana (gigaherz@gmail.com) */ #pragma once diff --git a/base/applications/rapps/loaddlg.cpp b/base/applications/rapps/loaddlg.cpp index 618ac035e5c..9063954ece0 100644 --- a/base/applications/rapps/loaddlg.cpp +++ b/base/applications/rapps/loaddlg.cpp @@ -2,12 +2,12 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) * PURPOSE: Displaying a download dialog - * COPYRIGHT: Copyright 2001 John R. Sheets (for CodeWeavers) - * Copyright 2004 Mike McCormack (for CodeWeavers) - * Copyright 2005 Ge van Geldorp (gvg@reactos.org) - * Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org) + * COPYRIGHT: Copyright 2001 John R. Sheets (for CodeWeavers) + * Copyright 2004 Mike McCormack (for CodeWeavers) + * Copyright 2005 Ge van Geldorp (gvg@reactos.org) + * Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org) * Copyright 2015 Ismael Ferreras Morezuelas (swyterzone+ros@gmail.com) - * Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) + * Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) */ /* @@ -85,7 +85,7 @@ struct DownloadInfo DownloadInfo() { } - DownloadInfo(const CApplicationInfo &AppInfo) : DLType(DLTYPE_APPLICATION) + DownloadInfo(const CAppInfo &AppInfo) : DLType(DLTYPE_APPLICATION) { AppInfo.GetDownloadInfo(szUrl, szSHA1, SizeInBytes); szName = AppInfo.szDisplayName; @@ -1052,7 +1052,7 @@ CDownloadManager::LaunchDownloadDialog(BOOL bIsModal) // CDownloadManager BOOL -DownloadListOfApplications(const CAtlList &AppsList, BOOL bIsModal) +DownloadListOfApplications(const CAtlList &AppsList, BOOL bIsModal) { if (AppsList.IsEmpty()) return FALSE; @@ -1060,7 +1060,7 @@ DownloadListOfApplications(const CAtlList &AppsList, BOOL bI POSITION CurrentListPosition = AppsList.GetHeadPosition(); while (CurrentListPosition) { - const CApplicationInfo *Info = AppsList.GetNext(CurrentListPosition); + const CAppInfo *Info = AppsList.GetNext(CurrentListPosition); CDownloadManager::Add(DownloadInfo(*Info)); } @@ -1071,7 +1071,7 @@ DownloadListOfApplications(const CAtlList &AppsList, BOOL bI } BOOL -DownloadApplication(CApplicationInfo *pAppInfo) +DownloadApplication(CAppInfo *pAppInfo) { if (!pAppInfo) return FALSE; diff --git a/base/applications/rapps/misc.cpp b/base/applications/rapps/misc.cpp index 3d7311f8a1e..a5da21d45ce 100644 --- a/base/applications/rapps/misc.cpp +++ b/base/applications/rapps/misc.cpp @@ -2,9 +2,9 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) * PURPOSE: Misc functions - * COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org) + * COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org) * Copyright 2015 Ismael Ferreras Morezuelas (swyterzone+ros@gmail.com) - * Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) + * Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) */ #include "rapps.h" diff --git a/base/applications/rapps/settings.cpp b/base/applications/rapps/settings.cpp index bac3f908349..4a00186f2ec 100644 --- a/base/applications/rapps/settings.cpp +++ b/base/applications/rapps/settings.cpp @@ -2,7 +2,7 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) * PURPOSE: Functions to load / save settings from reg. - * COPYRIGHT: Copyright 2020 He Yang (1160386205@qq.com) + * COPYRIGHT: Copyright 2020 He Yang (1160386205@qq.com) */ #include "rapps.h" diff --git a/base/applications/rapps/settingsdlg.cpp b/base/applications/rapps/settingsdlg.cpp index c7db4c7c5dd..b75a136c0ff 100644 --- a/base/applications/rapps/settingsdlg.cpp +++ b/base/applications/rapps/settingsdlg.cpp @@ -2,8 +2,8 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) * PURPOSE: Settings Dialog - * COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org) - * Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) + * COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org) + * Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) */ #include "rapps.h" diff --git a/base/applications/rapps/unattended.cpp b/base/applications/rapps/unattended.cpp index 858f24ee23b..e5fe54ed2ea 100644 --- a/base/applications/rapps/unattended.cpp +++ b/base/applications/rapps/unattended.cpp @@ -3,7 +3,7 @@ * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) * PURPOSE: Functions to parse command-line flags and process them * COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) - * Copyright 2020 He Yang (1160386205@qq.com) + * Copyright 2020 He Yang (1160386205@qq.com) */ #include "rapps.h" @@ -44,7 +44,7 @@ InitRappsConsole() } static BOOL -HandleInstallCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) +HandleInstallCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) { if (argcLeft < 1) { @@ -53,11 +53,11 @@ HandleInstallCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR return FALSE; } - CAtlList Applications; + CAtlList Applications; for (int i = 0; i < argcLeft; i++) { LPCWSTR PackageName = argvLeft[i]; - CApplicationInfo *AppInfo = db->FindByPackageName(PackageName); + CAppInfo *AppInfo = db->FindByPackageName(PackageName); if (AppInfo) { Applications.AddTail(AppInfo); @@ -68,7 +68,7 @@ HandleInstallCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR } static BOOL -HandleSetupCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) +HandleSetupCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) { if (argcLeft != 1) { @@ -77,7 +77,7 @@ HandleSetupCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *a return FALSE; } - CAtlList Applications; + CAtlList Applications; HINF InfHandle = SetupOpenInfFileW(argvLeft[0], NULL, INF_STYLE_WIN4, NULL); if (InfHandle == INVALID_HANDLE_VALUE) { @@ -92,7 +92,7 @@ HandleSetupCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *a { if (SetupGetStringFieldW(&Context, 1, szPkgName, _countof(szPkgName), NULL)) { - CApplicationInfo *AppInfo = db->FindByPackageName(szPkgName); + CAppInfo *AppInfo = db->FindByPackageName(szPkgName); if (AppInfo) { Applications.AddTail(AppInfo); @@ -106,7 +106,7 @@ HandleSetupCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *a } static BOOL -HandleFindCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) +HandleFindCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) { if (argcLeft < 1) { @@ -114,7 +114,7 @@ HandleFindCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *ar return FALSE; } - CAtlList List; + CAtlList List; db->GetApps(List, ENUM_ALL_AVAILABLE); for (int i = 0; i < argcLeft; i++) @@ -125,7 +125,7 @@ HandleFindCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *ar POSITION CurrentListPosition = List.GetHeadPosition(); while (CurrentListPosition) { - CApplicationInfo *Info = List.GetNext(CurrentListPosition); + CAppInfo *Info = List.GetNext(CurrentListPosition); if (SearchPatternMatch(Info->szDisplayName, lpszSearch) || SearchPatternMatch(Info->szComments, lpszSearch)) { @@ -140,7 +140,7 @@ HandleFindCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *ar } static BOOL -HandleInfoCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) +HandleInfoCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) { if (argcLeft < 1) { @@ -151,7 +151,7 @@ HandleInfoCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *ar for (int i = 0; i < argcLeft; i++) { LPCWSTR PackageName = argvLeft[i]; - CApplicationInfo *AppInfo = db->FindByPackageName(PackageName); + CAppInfo *AppInfo = db->FindByPackageName(PackageName); if (!AppInfo) { ConResMsgPrintf(StdOut, NULL, IDS_CMD_PACKAGE_NOT_FOUND, PackageName); @@ -231,7 +231,7 @@ ParseCmdAndExecute(LPWSTR lpCmdLine, BOOL bIsFirstLaunch, int nCmdShow) CStringW Directory; GetStorageDirectory(Directory); - CApplicationDB db(Directory); + CAppDB db(Directory); if (SettingsInfo.bUpdateAtStart || bIsFirstLaunch) { diff --git a/base/applications/rapps/winmain.cpp b/base/applications/rapps/winmain.cpp index cf3285a2783..3fb8e23d4b1 100644 --- a/base/applications/rapps/winmain.cpp +++ b/base/applications/rapps/winmain.cpp @@ -2,9 +2,9 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) * PURPOSE: Main program - * COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org) + * COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org) * Copyright 2015 Ismael Ferreras Morezuelas (swyterzone+ros@gmail.com) - * Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) + * Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org) */ #include "rapps.h" #include "unattended.h"