1#pragma once 2 3#include <atlcoll.h> 4#include <atlpath.h> 5 6#include "appinfo.h" 7 8class CAppDB 9{ 10 private: 11 CPathW m_BasePath; 12 CAtlList<CAppInfo *> m_Available; 13 CAtlList<CAppInfo *> m_Installed; 14 15 BOOL 16 EnumerateFiles(); 17
| 1#pragma once 2 3#include <atlcoll.h> 4#include <atlpath.h> 5 6#include "appinfo.h" 7 8class 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 static CInstalledApplicationInfo * 19 EnumerateRegistry(CAtlList<CAppInfo *> *List, LPCWSTR Name); 20 static CInstalledApplicationInfo * 21 CreateInstalledAppByRegistryKey(LPCWSTR KeyName, HKEY hKeyParent, UINT KeyIndex); 22
|
18 public: 19 CAppDB(const CStringW &path); 20 21 VOID 22 GetApps(CAtlList<CAppInfo *> &List, AppsCategories Type) const;
| 23 public: 24 CAppDB(const CStringW &path); 25 26 VOID 27 GetApps(CAtlList<CAppInfo *> &List, AppsCategories Type) const;
|
| 28 CAvailableApplicationInfo * 29 FindAvailableByPackageName(const CStringW &name);
|
23 CAppInfo *
| 30 CAppInfo *
|
24 FindByPackageName(const CStringW &name);
| 31 FindByPackageName(const CStringW &name) { return FindAvailableByPackageName(name); }
|
25 26 VOID 27 UpdateAvailable(); 28 VOID 29 UpdateInstalled(); 30 VOID 31 RemoveCached(); 32
| 32 33 VOID 34 UpdateAvailable(); 35 VOID 36 UpdateInstalled(); 37 VOID 38 RemoveCached(); 39
|
33 BOOL
| 40 static DWORD
|
34 RemoveInstalledAppFromRegistry(const CAppInfo *Info); 35
| 41 RemoveInstalledAppFromRegistry(const CAppInfo *Info); 42
|
| 43 static CInstalledApplicationInfo * 44 CreateInstalledAppByRegistryKey(LPCWSTR Name); 45 static CInstalledApplicationInfo * 46 CreateInstalledAppInstance(LPCWSTR KeyName, BOOL User, REGSAM WowSam); 47 static HKEY 48 EnumInstalledRootKey(UINT Index, REGSAM &RegSam); 49
|
36 size_t GetAvailableCount() const 37 { 38 return m_Available.GetCount(); 39 } 40};
| 50 size_t GetAvailableCount() const 51 { 52 return m_Available.GetCount(); 53 } 54};
|