2023-02-28 00:00:29 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <atlcoll.h>
|
|
|
|
#include <atlpath.h>
|
|
|
|
|
|
|
|
#include "appinfo.h"
|
|
|
|
|
|
|
|
class CAppDB
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
CPathW m_BasePath;
|
|
|
|
CAtlList<CAppInfo *> m_Available;
|
|
|
|
CAtlList<CAppInfo *> m_Installed;
|
|
|
|
|
|
|
|
BOOL
|
|
|
|
EnumerateFiles();
|
|
|
|
|
|
|
|
public:
|
|
|
|
CAppDB(const CStringW &path);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
GetApps(CAtlList<CAppInfo *> &List, AppsCategories Type) const;
|
|
|
|
CAppInfo *
|
|
|
|
FindByPackageName(const CStringW &name);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
UpdateAvailable();
|
|
|
|
VOID
|
|
|
|
UpdateInstalled();
|
|
|
|
VOID
|
|
|
|
RemoveCached();
|
|
|
|
|
|
|
|
BOOL
|
|
|
|
RemoveInstalledAppFromRegistry(const CAppInfo *Info);
|
2024-01-10 02:36:30 +00:00
|
|
|
|
|
|
|
size_t GetAvailableCount() const
|
|
|
|
{
|
|
|
|
return m_Available.GetCount();
|
|
|
|
}
|
2023-02-28 00:00:29 +00:00
|
|
|
};
|