mirror of
https://github.com/reactos/reactos.git
synced 2026-06-20 16:26:01 +08:00
Previously, there would be function duplication between installed and available applications. Now this is handled with polymorphism, which allows to re-use a lot of code. Additionally, toolbar buttons are properly disabled now. The mutex used to guard rapps' single instance is renamed, so that the 'new' and old rapps can be run at the same time for testing. CORE-18459
36 lines
648 B
C++
36 lines
648 B
C++
#pragma once
|
|
|
|
#include <atlcoll.h>
|
|
#include <atlpath.h>
|
|
|
|
#include "applicationinfo.h"
|
|
|
|
class CApplicationDB
|
|
{
|
|
private:
|
|
CPathW m_BasePath;
|
|
CAtlList<CApplicationInfo *> m_Available;
|
|
CAtlList<CApplicationInfo *> m_Installed;
|
|
|
|
BOOL
|
|
EnumerateFiles();
|
|
|
|
public:
|
|
CApplicationDB(const CStringW &path);
|
|
|
|
VOID
|
|
GetApps(CAtlList<CApplicationInfo *> &List, AppsCategories Type) const;
|
|
CApplicationInfo *
|
|
FindByPackageName(const CStringW &name);
|
|
|
|
VOID
|
|
UpdateAvailable();
|
|
VOID
|
|
UpdateInstalled();
|
|
VOID
|
|
RemoveCached();
|
|
|
|
BOOL
|
|
RemoveInstalledAppFromRegistry(const CApplicationInfo *Info);
|
|
};
|