ReactOS  0.4.15-dev-1177-g6cb3b62
available.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <windef.h>
4 #include <atlstr.h>
5 #include <atlsimpcoll.h>
6 #include <atlcoll.h>
7 
8 #include "misc.h"
9 
10 
11 #define MAX_SCRNSHOT_NUM 16
12 
14 {
21 };
22 
24 {
25  return (x >= LICENSE_MIN && x <= LICENSE_MAX);
26 }
27 
29 {
36 
38 };
39 
41 {
42 public:
44  //BOOL m_IsSelected;
46  ATL::CStringW m_szName; // software's display name.
57  ATL::CStringW m_szPkgName; // software's package name.
58 
60 
61  // Caching mechanism related entries
64 
65  // Optional integrity checks (SHA-1 digests are 160 bit = 40 characters in hex string form)
68 
69  // Create an object from file
70  CAvailableApplicationInfo(const ATL::CStringW& sFileNameParam, AvailableStrings& m_Strings);
71 
72  // Load all info from the file
74  BOOL HasLanguageInfo() const;
75  BOOL HasNativeLanguage() const;
76  BOOL HasEnglishLanguage() const;
77  BOOL IsInstalled() const;
78  BOOL HasInstalledVersion() const;
79  BOOL HasUpdate() const;
80  BOOL RetrieveScrnshot(UINT Index, ATL::CStringW& ScrnshotLocation) const;
82  // Set a timestamp
84 
85 private:
90 
91  inline BOOL GetString(LPCWSTR lpKeyName, ATL::CStringW& ReturnedString);
92 
93  // Lazily load general info from the file
100  inline BOOL FindInLanguages(LCID what) const;
101 };
102 
104 
106 {
109 
110 public:
112 
113  CAvailableApps();
114 
115  static BOOL UpdateAppsDB();
116  static BOOL ForceUpdateAppsDB();
117  static VOID DeleteCurrentAppsDB();
118 
120  BOOL Enum(INT EnumType, AVAILENUMPROC lpEnumProc, PVOID param);
121 
124 
126  int GetSelectedCount();
127 
130  //ATL::CSimpleArray<CAvailableApplicationInfo> GetSelected() const;
131 
132  const ATL::CStringW& GetFolderPath() const;
133  const ATL::CStringW& GetAppPath() const;
134  const ATL::CStringW& GetCabPath() const;
135 };
VOID RetrieveGeneralInfo(AvailableStrings &m_Strings)
Definition: available.cpp:37
ATL::CStringW m_sFileName
Definition: available.h:62
const ATL::CStringW & GetAppPath() const
Definition: available.cpp:613
ATL::CStringW m_szPkgName
Definition: available.h:57
ATL::CStringW m_szLicense
Definition: available.h:49
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
VOID RemoveAllSelected()
Definition: available.cpp:562
ATL::CSimpleArray< ATL::CStringW > m_szScrnshotLocation
Definition: available.h:55
#define CALLBACK
Definition: compat.h:35
BOOL HasInstalledVersion() const
Definition: available.cpp:269
ATL::CStringW m_szUrlSite
Definition: available.h:52
VOID SetLastWriteTime(FILETIME *ftTime)
Definition: available.cpp:299
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
DWORD LCID
Definition: nls.h:13
CAvailableApplicationInfo * FindAppByPkgName(const ATL::CStringW &szPkgName) const
Definition: available.cpp:573
BOOL IsLicenseType(INT x)
Definition: available.h:23
static BOOL UpdateAppsDB()
Definition: available.cpp:409
#define BOOL
Definition: nt_native.h:43
int32_t INT
Definition: typedefs.h:58
struct TraceInfo Info
BOOL GetString(LPCWSTR lpKeyName, ATL::CStringW &ReturnedString)
Definition: available.cpp:304
ATL::CStringW m_szDesc
Definition: available.h:50
ATL::CStringW szCabPath
Definition: available.h:31
ATL::CStringW m_szUrlDownload
Definition: available.h:53
unsigned int BOOL
Definition: ntddk_ex.h:94
ATL::CStringW m_szSize
Definition: available.h:51
VOID FreeCachedEntries()
Definition: available.cpp:345
BOOL FindInLanguages(LCID what) const
Definition: available.cpp:229
ATL::CSimpleArray< CAvailableApplicationInfo > FindAppsByPkgNameList(const ATL::CSimpleArray< ATL::CStringW > &arrAppsNames) const
Definition: available.cpp:594
const ATL::CStringW & GetFolderPath() const
Definition: available.cpp:608
BOOL HasEnglishLanguage() const
Definition: available.cpp:259
ATL::CSimpleArray< LCID > m_LanguageLCIDs
Definition: available.h:54
BOOL Enum(INT EnumType, AVAILENUMPROC lpEnumProc, PVOID param)
Definition: available.cpp:448
static AvailableStrings m_Strings
Definition: available.h:111
ATL::CStringW m_szVersion
Definition: available.h:48
GLfloat param
Definition: glext.h:5796
static const UCHAR Index[8]
Definition: usbohci.c:18
ATL::CStringW m_szInstalledVersion
Definition: available.h:67
static VOID DeleteCurrentAppsDB()
Definition: available.cpp:386
VOID RefreshAppInfo(AvailableStrings &m_Strings)
Definition: available.cpp:28
ATL::CStringW m_szRegName
Definition: available.h:47
int GetSelectedCount()
Definition: available.cpp:568
BOOL AddSelected(CAvailableApplicationInfo *AvlbInfo)
Definition: available.cpp:546
BOOL HasLanguageInfo() const
Definition: available.cpp:249
ATL::CStringW m_szName
Definition: available.h:46
BOOL(CALLBACK * AVAILENUMPROC)(CAvailableApplicationInfo *Info, BOOL bInitialCheckState, PVOID param)
Definition: available.h:103
LicenseType
Definition: available.h:13
static BOOL ForceUpdateAppsDB()
Definition: available.cpp:442
ATL::CStringW szCabDir
Definition: available.h:35
ATL::CAtlList< CAvailableApplicationInfo * > m_SelectedList
Definition: available.h:108
ATL::CAtlList< CAvailableApplicationInfo * > m_InfoList
Definition: available.h:107
ATL::CStringW szPath
Definition: available.h:30
BOOL RetrieveIcon(ATL::CStringW &IconLocation) const
Definition: available.cpp:289
CConfigParser * m_Parser
Definition: available.h:89
ATL::CStringW m_szIconLocation
Definition: available.h:56
unsigned int UINT
Definition: ndis.h:50
ATL::CStringW szAppsPath
Definition: available.h:32
unsigned int ULONG
Definition: retypes.h:1
LicenseType m_LicenseType
Definition: available.h:45
const ATL::CStringW & GetCabPath() const
Definition: available.cpp:618
ATL::CStringW m_szSHA1
Definition: available.h:66
ATL::CStringW szSearchPath
Definition: available.h:33
ATL::CStringW szCabName
Definition: available.h:34
BOOL RemoveSelected(CAvailableApplicationInfo *AvlbInfo)
Definition: available.cpp:551
BOOL RetrieveScrnshot(UINT Index, ATL::CStringW &ScrnshotLocation) const
Definition: available.cpp:279
BOOL HasNativeLanguage() const
Definition: available.cpp:254
CAvailableApplicationInfo(const ATL::CStringW &sFileNameParam, AvailableStrings &m_Strings)
Definition: available.cpp:21