1 #pragma once 2 3 #include <atlcoll.h> 4 #include <atlpath.h> 5 6 #include "appinfo.h" 7 8 class CAppDB 9 { 10 private: 11 CPathW m_BasePath; 12 CAtlList<CAppInfo *> m_Available; 13 CAtlList<CAppInfo *> m_Installed; 14 15 BOOL 16 EnumerateFiles(); 17 18 public: 19 CAppDB(const CStringW &path); 20 21 VOID 22 GetApps(CAtlList<CAppInfo *> &List, AppsCategories Type) const; 23 CAppInfo * 24 FindByPackageName(const CStringW &name); 25 26 VOID 27 UpdateAvailable(); 28 VOID 29 UpdateInstalled(); 30 VOID 31 RemoveCached(); 32 33 BOOL 34 RemoveInstalledAppFromRegistry(const CAppInfo *Info); 35 36 size_t GetAvailableCount() const 37 { 38 return m_Available.GetCount(); 39 } 40 }; 41